3 ms·
> So you ask for pthread_mutex and now it's ten times bigger and you're regretting your life choices. It's 36 bytes bigger. Unless you're for some reason doin
by arinlen 4y ago
> So you ask for pthread_mutex and now it's ten times bigger and you're regretting your life choices.
It's 36 bytes bigger.
Unless you're for some reason doing embedded development with a resource constrained system running a UNIX-like OS, that is not a concern that registers anywhere.
And you get standard code that runs anywhere.
Arguing about 36 bytes per critical section makes no sense. You waste far more than that by handling a string.
- gpderetta 4y agoIt is very much a concern as you can't as easily fit your mutex protected data on the same cacheline as the mutex.