threads for C/C++ under Unix?

Dave Jones djones at megatest.UUCP
Fri Oct 13 10:40:34 AEST 1989


>From article <MONTNARO.89Oct12124156 at sprite.crd.ge.com>, by montnaro at sprite.crd.ge.com (Skip Montanaro):
> 
> You can't have preemptive lightweight processes without kernel support.
>

Hmmm. What kind of kernel support do you need? All that's necessary, I think,
is that it have a "select" routine which can wake up when potentially
blocking system calls would not block. Like Unix does.

You must write a centralized scheduler that knows about I/O, signals,
etc... LWP's would either have to forego standard system calls, or you
would need a lookalike library that substitutes scheduler-based routines
for the blocking calls like getchar(), etc..  But I think it can be done
easily enough under BSD Unix, which has never been advertized as having
kernel support for LWP's.



More information about the Comp.lang.c mailing list