Hacker News new | past | comments | ask | show | jobs | submit login

> Its name unfortunately looks similar to mutex but it's not a lock.

Hmm, looking at the latest source code, my original quote has been split, but:

* Fast Userspace Mutexes (which I call "Futexes!").

* (C) Rusty Russell, IBM 2002

...

* "The futexes are also cursed."

* "But they come in a choice of three flavours!"

https://github.com/torvalds/linux/blob/master/kernel/futex/c...




Thanks for the creation! But sorry man, the historic description unfortunately added to the confusion. When I read the original description, I thought it’s a user mode lock and was thoroughly confused. Only after I read the implementation of futex in kernel and its usage in the implementation of pthread_mutex_lock in user mode, that I realized futex was not a lock. It’s a waiting and signaling operation.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: