home *** CD-ROM | disk | FTP | other *** search
- 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
- From: jsemrad@ems.cdc.com (Joe Semrad)
- Newsgroups: comp.unix.aix
- Subject: Re: swap instruction in assembler?
- Message-ID: <30136@nntp_server.ems.cdc.com>
- Date: 6 Nov 92 15:33:58 GMT
- References: <471@bertha.HyperDesk.com> <1992Nov06.014521.65797@watson.ibm.com>
- Sender: sys@ems.ems.cdc.com
- Reply-To: jsemrad@ems.cdc.com
- Organization: Empros Systems International, a division of CDC
- Lines: 25
- Nntp-Posting-Host: aurora.ems.cdc.com
-
- In article <1992Nov06.014521.65797@watson.ibm.com>, gerth@watson.ibm.com (John Gerth) writes:
- |> Actually you don't have go to assembler yourself to do this.
- |> The C library provides cs(a,b,c) which does an atomic operation
- |> to compare the 'b' to '*a' and if equal to store 'c'.
- |>
- |> --
- |> John Gerth gerth@watson.ibm.com (914) 784-7639
-
- How portable is this? Is this an IBMism? While this works very nice on
- AIX, I can't find a man page for it on an HP, for example. I'd like to
- use it but I would like to stay away from something that isn't portable,
- so I've been using semaphores instead (I know, "if you want to be portable
- why are you using AIX in the first place?" :-)
-
- Joe
- --
- ================================================================
- = C. Joseph Semrad = Phone: 612-553-4758 =
- = EMPOWER Development = FAX: 612-553-4018 =
- = Empros Systems International = jsemrad@ems.cdc.com =
- ================================================================
- = "My basic view on tackle and equipment costs is that =
- = fly fishers as a group spend too much and spin =
- = fishers spend too little" - Stream Smallmouth Fishing =
- ================================================================
-