home *** CD-ROM | disk | FTP | other *** search
- Subject: LWPs version 1.02 Beta
- Date: 19 Dec 88
- From: Matt Dillon <dillon@postgres.berkeley.edu>
-
- Much changed LWPs ...
-
- * no more register restrictions
- * assembly calls lmalloc() by default instead of malloc() so
- those using 16 bit integers can use it.
- * better docs
- * changed a call. Removed InitLWP() and added ForkLWP(). It
- allows the subroutine's parent to return through normal channels
- (and restore saved registers) which is why there are no more
- restrictions.
-
- Trivia time: What does this do?
-
- main()
- {
- chuckles();
- puts("running...");
- RunLWP();
- puts("");
- }
-
- chuckles()
- {
- short i;
-
- if (ForkLWP(2048L, 0L))
- return;
- for (i = 0; i < 3; ++i) {
- ForkLWP(2048L, 0L);
- printf("%d", i);
- }
- }
-
- (The answer is actually semi-specific since the execution order
- is not guarenteed, but you get the idea)
-
- -Matt
-
-