LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 03-01-2009, 02:35 AM   #1
lennyk
LQ Newbie
 
Registered: Jan 2009
Posts: 18

Rep: Reputation: 0
Windows API atomic operation compatibility in Linux


Hi,

I'm looking for a Linux counterpart of the following windows API calls:
InterlockedExchangePointer
InterlockedCompareExchangePointer

I'm familiar with the atomic_ops library, but it doesn't support the atomic operation I've mentioned above.

Thanks,
Lenny.
 
Old 03-01-2009, 08:17 PM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

AFAIK, there's no exact equivalent API - but you should be able to create an equivalent in three or four lines: all the necessary primitives are available.

atomic ops is certainly a good place to start.

This link might help:
http://www.linuxquestions.org/questi...-linux-672852/
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
licensed windows API in linux??? Person_1873 Linux - Software 12 05-26-2008 09:09 PM
LXer: This week at LWN: Atomic context and kernel API design LXer Syndicated Linux News 0 04-08-2008 11:41 PM
pipes - reading buffer less than PIPE_BUF is atomic operation? gal_netanel Programming 2 12-18-2007 12:28 AM
Atomic operation question PatrickNew Programming 4 05-12-2007 12:11 AM
windows api in a linux distro???? ronanio Linux - Games 2 10-04-2005 08:57 AM


All times are GMT -5. The time now is 02:24 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration