| 85 | // helper |
| 86 | |
| 87 | inline void ThreadLocalCheckReturn(int ret, const char *funcName) { |
| 88 | if (ret != 0) { |
| 89 | // This is used from global constructors so the safest thing to do is just |
| 90 | // print to stderr and exit(). |
| 91 | fprintf(stderr, "%s returned %d", funcName, ret); |
| 92 | exit(1); |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | inline void ThreadLocalCreateKey(pthread_key_t *key, void (*del)(void*)) { |
| 97 | int ret = pthread_key_create(key, del); |
no test coverage detected