home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 199.lha / LWP_v1.02 / POSTER < prev   
Encoding:
Text File  |  1988-12-27  |  990 b   |  43 lines

  1. Subject: LWPs version 1.02 Beta
  2. Date: 19 Dec 88
  3. From: Matt Dillon <dillon@postgres.berkeley.edu>
  4.  
  5.     Much changed LWPs ...
  6.  
  7.     * no more register restrictions
  8.     * assembly calls lmalloc() by default instead of malloc() so
  9.       those using 16 bit integers can use it.
  10.     * better docs
  11.     * changed a call.  Removed InitLWP() and added ForkLWP().  It
  12.       allows the subroutine's parent to return through normal channels
  13.       (and restore saved registers) which is why there are no more
  14.       restrictions.
  15.  
  16.     Trivia time:  What does this do?
  17.  
  18.     main()
  19.     {
  20.         chuckles();
  21.         puts("running...");
  22.         RunLWP();
  23.         puts("");
  24.     }
  25.  
  26.     chuckles()
  27.     {
  28.         short i;
  29.  
  30.         if (ForkLWP(2048L, 0L))
  31.         return;
  32.         for (i = 0; i < 3; ++i) {
  33.         ForkLWP(2048L, 0L);
  34.         printf("%d", i);
  35.         }
  36.     }
  37.  
  38.     (The answer is actually semi-specific since the execution order
  39.      is not guarenteed, but you get the idea)
  40.  
  41.                 -Matt
  42.  
  43.