LWN.net Logo

Threadlets

Threadlets

Posted Mar 2, 2007 6:27 UTC (Fri) by roelofs (guest, #2599)
Parent article: Threadlets

The above description has left out a couple of details, mostly related to the management of user-space stacks.

I hope the left-out part includes something that rationalizes this comment:

The stack argument is thus a pointer (despite its unsigned long type) ...

Generally speaking, of course, mixing pointers and integers is Considered Harmful, insofar as the former may be larger than the latter on some architectures (even when the latter are long ints). Perhaps the "pointer" here is more of an offset that gets added to a (true) base pointer somewhere else?

Greg


(Log in to post comments)

Threadlets

Posted Mar 2, 2007 16:06 UTC (Fri) by sbishop (guest, #33061) [Link]

The LDD book covers this, if I understand your question
correctly--unsigned ints vs pointers. It's on page 289:

http://lwn.net/images/pdf/LDD3/ch11.pdf

Hope this helps,
Sam

Threadlets

Posted Mar 2, 2007 18:07 UTC (Fri) by roelofs (guest, #2599) [Link]

The LDD book covers this, if I understand your question correctly--unsigned ints vs pointers. It's on page 289:

Ahhhh...very helpful indeed. I've been reading LWN's kernel page for years and years, and somehow I never picked up on that point before.

Many thanks,
Greg

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds