It only gets worse, too. There's not just 1 way to spell "set name of thread" in pthreads.
There's fucking five.
- pthread_setname_np(pthread_t thrd, const char* name);
- pthread_set_name_np(pthread_t thrd, const char* format, const char* name); // ??? HUH
- pthread_set_name_np(pthread_t thrd, const char* name);
- pthread_setname_np(const char* name); // Apple doesn't let you pick the thread, because Of Course They Don't
- pthread_attr_setname_np(pthread_attr_t* attrs, const char* name); // This is the correct way, but only available on specific IBM platforms
I also haven't included ANY of the return values (because for some of them, it's different for some fucking reason).
These people couldn't design a good API if it spit on their face.