home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / aix / 11354 < prev    next >
Encoding:
Internet Message Format  |  1992-11-07  |  1.9 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!saimiri.primate.wisc.edu!caen!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!mmm.serc.3m.com!mmc.mmmg.com!timbuk.cray.com!shamash!ems!ems.cdc.com!jsemrad
  2. From: jsemrad@ems.cdc.com (Joe Semrad)
  3. Newsgroups: comp.unix.aix
  4. Subject: Re: swap instruction in assembler?
  5. Message-ID: <30136@nntp_server.ems.cdc.com>
  6. Date: 6 Nov 92 15:33:58 GMT
  7. References: <471@bertha.HyperDesk.com> <1992Nov06.014521.65797@watson.ibm.com>
  8. Sender: sys@ems.ems.cdc.com
  9. Reply-To: jsemrad@ems.cdc.com
  10. Organization: Empros Systems International, a division of CDC
  11. Lines: 25
  12. Nntp-Posting-Host: aurora.ems.cdc.com
  13.  
  14. In article <1992Nov06.014521.65797@watson.ibm.com>, gerth@watson.ibm.com (John Gerth) writes:
  15. |> Actually you don't have go to assembler yourself to do this.
  16. |> The C library provides cs(a,b,c) which does an atomic operation
  17. |> to compare the 'b' to '*a' and if equal to store 'c'.
  18. |> 
  19. |> -- 
  20. |> John Gerth     gerth@watson.ibm.com        (914) 784-7639
  21.  
  22. How portable is this?  Is this an IBMism?  While this works very nice on
  23. AIX, I can't find a man page for it on an HP, for example.  I'd like to
  24. use it but I would like to stay away from something that isn't portable,
  25. so I've been using semaphores instead (I know, "if you want to be portable
  26. why are you using AIX in the first place?" :-)
  27.  
  28. Joe
  29. -- 
  30. ================================================================
  31. = C. Joseph Semrad                  =   Phone: 612-553-4758    =
  32. = EMPOWER Development               =   FAX:   612-553-4018    =
  33. = Empros Systems International      =   jsemrad@ems.cdc.com    =
  34. ================================================================
  35. =    "My basic view on tackle and equipment costs is that      =
  36. =     fly fishers as a group spend too much and spin           =
  37. =     fishers spend too little" - Stream Smallmouth Fishing    =
  38. ================================================================
  39.