home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / os2 / programm / 7106 < prev    next >
Encoding:
Internet Message Format  |  1992-12-18  |  1.5 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!sdd.hp.com!hpscit.sc.hp.com!kitchin
  2. From: kitchin@lf.hp.com (Bruce Kitchin)
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: Re: OS/2 libraries thread-safe ?
  5. Date: 17 Dec 1992 21:30:38 GMT
  6. Organization: Hewlett Packard Santa Clara Site
  7. Lines: 22
  8. Message-ID: <1gqrhuINNh4u@hpscit.sc.hp.com>
  9. References: <1992Dec16.221352.26031@cs.tu-berlin.de>
  10. NNTP-Posting-Host: eden.avo.hp.com
  11. X-Newsreader: TIN [version 1.1.2 PL7]
  12.  
  13. Ernst Kloecker (ernst@opal.cs.tu-berlin.de) wrote:
  14.  
  15. The C library has been pretty well handled by the other responses.
  16. If you compile properly with IBM C Set/2 (set the multithreaded
  17. compile option) you should be completely safe except from your
  18. own multithreaded errors (simultaneous access of shared globals
  19. without semaphore protection).
  20.  
  21. : Or are the only safe functions the OS-functions in 'bsedos.h' ?
  22. : Or are even those functions not completely thread-safe ?
  23. All functions declared through including os2.h (includes bse*.h,
  24. pm*.h, etc) are safe.  They are part of or attached to the
  25. operating system which is designed for such problems.  They are
  26. not part of the C library.  Again, you can get into trouble due
  27. to sharing your own variables.  But I believe that every Dos, Win, Gpi,
  28. Mou, Kbd, Vio, etc call is atomic to the extent that anything that
  29. it depends on in the system (such as file buffers) are modified
  30. without the chance of another thread getting in.  However, two
  31. DosWrite's in a row may be split by a DosWRite from another thread.
  32.  
  33.