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

  1. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!cs.utexas.edu!ut-emx!ibmchs!auschs!portal.austin.ibm.com!awdprime.austin.ibm.com!perelandra.austin.ibm.com!ransom
  2. From: ransom@perelandra.austin.ibm.com (Jeff Peek)
  3. Newsgroups: comp.unix.aix
  4. Subject: Re: swap instruction in assembler?
  5. Keywords: n
  6. Message-ID: <1992Nov6.165216.652@awdprime.austin.ibm.com>
  7. Date: 6 Nov 92 16:52:16 GMT
  8. References: <471@bertha.HyperDesk.com>
  9. Sender: news@awdprime.austin.ibm.com (USENET News)
  10. Organization: IBM PSPA - Austin, TX
  11. Lines: 18
  12.  
  13. The hardware doesn't have a test-and-set instruction available. However,
  14. the operating system has implemented in AIX 3.2 a fast SVC called cs().
  15. The prototype is int cs(int *, int, int). This does cause a "trap" to the
  16. OS, but this code is fast pathed through the system call handler and is
  17. coded in a few assembler instruction that will atomically do the operation.
  18. As long as the address passed is not misaligned, there should be no problem.
  19.  
  20. >
  21. >Thanks for your help,
  22. >     Andy Dennie
  23. >-- 
  24.  
  25.  
  26. -- 
  27. Jeff Peek
  28. AIX Operating System Architecture -- IBM Personal Systems Programming        
  29. ransom@perelandra.austin.ibm.com     VNET PEEK at AUSVM6 T/L 678-3913
  30. Austin, TX
  31.