3 ms·
You don't need to allocate pthread_mutex_t instances on heap, you can include them into the struct directly - struct foo { pthread_mutex_t bar; .
by eps 12y ago
You don't need to allocate pthread_mutex_t instances on heap, you can include them into the struct directly -
struct foo
{
pthread_mutex_t bar;
...
};
- tylertreat 12y agoGot it, that makes more sense.