home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / sun / misc / 3404 < prev    next >
Encoding:
Text File  |  1992-07-30  |  1.1 KB  |  26 lines

  1. Newsgroups: comp.sys.sun.misc
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!newsaintmail
  3. From: sim@mdtf14.fnal.gov (Jim Sim)
  4. Subject: lightweight processes
  5. Message-ID: <SIM.92Jul30175133@mdtf14.fnal.gov>
  6. Sender: daemon@linac.fnal.gov (The Background Man)
  7. Nntp-Posting-Host: mdtf14.fnal.gov
  8. Organization: Fermilab, Batavia, IL
  9. Distribution: usa
  10. Date: Thu, 30 Jul 1992 23:51:33 GMT
  11. Lines: 13
  12.  
  13. I am interested in using lightweight processes (threads) for a project.
  14. The man page for lwp_create says that arguments passed to the thread
  15. being created must be int's.  I am interested in using it in a fashion in
  16. which I also pass pointers to the thread.
  17.  
  18. I wrote a program in which I passed a pointer to an int as one of the 
  19. arguments to lwp_create, then in the thread I received it as a pointer to 
  20. an int.  The code in the thread received the correct pointer, as I could 
  21. examine the contents of the address.  
  22.  
  23. My program probably only works because the pointer uses the same amount of 
  24. space as an int.  Am I asking for trouble by trying to pass pointers to the 
  25. thread?  Any helpful comments would be appreciated.
  26.