home *** CD-ROM | disk | FTP | other *** search
- 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
- From: ransom@perelandra.austin.ibm.com (Jeff Peek)
- Newsgroups: comp.unix.aix
- Subject: Re: swap instruction in assembler?
- Keywords: n
- Message-ID: <1992Nov6.165216.652@awdprime.austin.ibm.com>
- Date: 6 Nov 92 16:52:16 GMT
- References: <471@bertha.HyperDesk.com>
- Sender: news@awdprime.austin.ibm.com (USENET News)
- Organization: IBM PSPA - Austin, TX
- Lines: 18
-
- The hardware doesn't have a test-and-set instruction available. However,
- the operating system has implemented in AIX 3.2 a fast SVC called cs().
- The prototype is int cs(int *, int, int). This does cause a "trap" to the
- OS, but this code is fast pathed through the system call handler and is
- coded in a few assembler instruction that will atomically do the operation.
- As long as the address passed is not misaligned, there should be no problem.
-
- >
- >Thanks for your help,
- > Andy Dennie
- >--
-
-
- --
- Jeff Peek
- AIX Operating System Architecture -- IBM Personal Systems Programming
- ransom@perelandra.austin.ibm.com VNET PEEK at AUSVM6 T/L 678-3913
- Austin, TX
-