tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ucontext
On Tuesday 15 December 2009 00:32:21 Joerg Sonnenberger wrote:
> On Mon, Dec 14, 2009 at 10:51:46PM +0000, Sad Clouds wrote:
> > Can anyone tell me what ucontext(2) and related functions can be used
> > for? Reading man pages it seems to suggest that you can get and set
> > threads context. Would this be similar to creating a new thread with
> > pthread_create()?
>
> You can use them to implement a 1:m thread library like FreeBSD's libc_r
> as machine independent code.
>
> Joerg
>
Below is the extract from makecontext(3). Can anyone elaborate on that? What
limitations and what would happen when calling makecontext from a threaded
program?
Due to limitations in the current pthread implementation, makecontext should
not be used in programs which link against the pthread(3) library (whether
threads are used or not).
Home |
Main Index |
Thread Index |
Old Index