Re: [Tux3] Bug? Atom refcounting redux

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Daniel Phillips <phillips@...>
Cc: <tux3@...>, <james_avera@...>
Date: Tuesday, December 2, 2008 - 5:44 am

Daniel Phillips writes:

> ...or:

It would work if kernel reserved that range as kernel space like linux.
Well, if we want to make sure it, I think we can reserve the address
range for it.

e.g. maybe

error_base = mmap(,MAX_ERRNO + 1,PROT_NONE,,,);

ERR_PTR(err)
assert(err < 0);
return error_base + -err;

PTR_ERR(ptr)
return -(long)(ptr - error_base);

IS_ERR(ptr)
return (error_base < ptr && ptr <= error_base + MAX_ERRNO);
--
OGAWA Hirofumi

_______________________________________________
Tux3 mailing list
Tux3@tux3.org
http://tux3.org/cgi-bin/mailman/listinfo/tux3

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[Tux3] Bug? Atom refcounting redux, Jim Avera, (Mon Dec 1, 10:38 pm)
[Tux3] Page cache emulation now up and running, Daniel Phillips, (Sun Aug 10, 7:14 am)
Re: [Tux3] Bug? Atom refcounting redux, Daniel Phillips, (Tue Dec 2, 1:04 am)
Re: [Tux3] Bug? Atom refcounting redux, Daniel Phillips, (Tue Dec 2, 1:19 am)
Re: [Tux3] Bug? Atom refcounting redux, OGAWA Hirofumi, (Tue Dec 2, 5:44 am)
Re: [Tux3] Bug? Atom refcounting redux, Daniel Phillips, (Tue Dec 2, 4:07 pm)
Re: [Tux3] Bug? Atom refcounting redux, Daniel Phillips, (Tue Dec 2, 12:56 am)