Unix Technical Forum

Re: rthreads patch #4: eliminate pointer<->long type punning

This is a discussion on Re: rthreads patch #4: eliminate pointer<->long type punning within the mailing.openbsd.tech forums, part of the OpenBSD category; --> On Sunday, May 4, "Ted Unangst" wrote: > On 5/3/08, Philip Guenther <guenther@gmail.com> wrote: > > Change "long p_thrslpid;" ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > mailing.openbsd.tech

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-05-2008, 05:50 AM
Tobias Weingartner
 
Posts: n/a
Default Re: rthreads patch #4: eliminate pointer<->long type punning

On Sunday, May 4, "Ted Unangst" wrote:
> On 5/3/08, Philip Guenther <guenther@gmail.com> wrote:
> > Change "long p_thrslpid;" in struct proc to "void *p_thrslparg;" to
> > eliminate pointer->long punning in sys_thrsleep() and sys_thrwakeup(). (Thi

> s
> > is required for the next patch (#5) too.)

>
> Why is it necessary? It's an int to make it clear that the kernel
> does not and will not interpret the pointer. That the userland
> interface uses a pointer was done only as a convenience, but in the
> kernel I'd prefer to retain the conversion.


If that's the case, please use a long. Otherwise I32LP64 machines will
loose 1/2 that pointer.

--Toby.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 01:39 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com