| 99 | CUfunction _memMapIpc_kernel; |
| 100 | |
| 101 | static void barrierWait(volatile int *barrier, volatile int *sense, unsigned int n) |
| 102 | { |
| 103 | int count; |
| 104 | |
| 105 | // Check-in |
| 106 | count = cpu_atomic_add32(barrier, 1); |
| 107 | if (count == n) { // Last one in |
| 108 | *sense = 1; |
| 109 | } |
| 110 | while (!*sense) |
| 111 | ; |
| 112 | |
| 113 | // Check-out |
| 114 | count = cpu_atomic_add32(barrier, -1); |
| 115 | if (count == 0) { // Last one out |
| 116 | *sense = 0; |
| 117 | } |
| 118 | while (*sense) |
| 119 | ; |
| 120 | } |
| 121 | |
| 122 | // Windows-specific LPSECURITYATTRIBUTES |
| 123 | void getDefaultSecurityDescriptor(CUmemAllocationProp *prop) |
no outgoing calls
no test coverage detected