Jump to content
  • Advertisement
Sign in to follow this  
deffer

futex - how/where?

This topic is 4325 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I figured I could experiment somewhat with futexes (futices?), as I do have lots of synchronisation in the project I'm currently involved with. I hit the wall pretty quick, namely: 1. I don't know where the headers are, I know about <linux/futex.h>, but I'm not sure if it's not exclusively for kernel developers 2. Even if I use the aforementioned header, I get undefined references - I have no idea what library to link agains. I tried googling, but I was flooded with worthless techno babble. Any help?

Share this post


Link to post
Share on other sites
Advertisement
There isn't really a userland API for futexes (futexen?)

The NPTL pthreads implementation's mutex objects are lightweight wrappers around futexes, so there isn't really much advantage to writing your own, unless you're trying to come up with a new IPC layer or you gain profound physical pleasure from self-inflicted pain.

Share this post


Link to post
Share on other sites
Quote:
Original post by Bregma
The NPTL pthreads implementation's mutex objects are lightweight wrappers around futexes


Ugh. I didn't know that...
Is NPTL the default implementation in latest unix systems? (Or does it depend on the kernel? I certainly lack knowledge in this area).

On the other hand, I program on embeeded devices, so pthread implementation might differ, which might force me to implement the synchronisation primitives myself (but I doubt it will come to that, and no, I don't enjoy inflicting pain on myself).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!