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
| Greg Kroah-Hartman | [PATCH 004/196] Chinese: add translation of SubmittingPatches |
| Alan Stern | Re: 2.6.22-rc2-mm1 |
| Satyam Sharma | Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures |
| William Lee Irwin III | Re: [Announce] [patch] Modular Scheduler Core and Completely Fair Scheduler [CFS] |
git: | |
| Dale Farnsworth | Re: [PATCH 03/39] mv643xx_eth: shorten reg names |
| Jarek Poplawski | Re: HTB accuracy for high speed |
| Gerrit Renker | [PATCH 15/37] dccp: Set per-connection CCIDs via socket options |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
