home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Programming / tek / kn / elate / exec / dispatch.c < prev    next >
Encoding:
C/C++ Source or Header  |  2001-05-12  |  407 b   |  31 lines

  1.  
  2. #include "tek/kn/elate/exec.h"
  3. #include <stdlib.h>
  4.  
  5. /* 
  6. **    TEKlib
  7. **    (C) 2001 TEK neoscientists
  8. **    all rights reserved.
  9. **
  10. **    elate thread dispatcher
  11. **
  12. */
  13.  
  14. int main(int argc, char **argv)
  15. {
  16.     if (argc == 2)
  17.     {
  18.         struct elatethread *t = (struct elatethread *) atoi(argv[1]);
  19.         if (t)
  20.         {
  21.             kn_proc_sleep(-1);
  22.             if (t->initok)
  23.             {
  24.                 (*t->function)(t->data);
  25.             }
  26.             kn_proc_exit(0);
  27.         }
  28.     }
  29.     return 0;
  30. }
  31.