| 1477 | #ifndef MUTEX_SAFE |
| 1478 | |
| 1479 | static pid_t mutex_gettid(void) |
| 1480 | { |
| 1481 | // Warning: this assumes the thread ID is stored at %fs:0x2d0. |
| 1482 | pid_t tid; |
| 1483 | asm volatile ( |
| 1484 | "mov %%fs:0x2d0,%0\n" : "=a"(tid) |
| 1485 | ); |
| 1486 | return tid; |
| 1487 | } |
| 1488 | |
| 1489 | static void mutex_settid(pid_t tid) |
| 1490 | { |
no outgoing calls
no test coverage detected