untrack CommandCtx
| 221 | |
| 222 | // untrack CommandCtx |
| 223 | void Globals_UntrackCommandCtx |
| 224 | ( |
| 225 | const CommandCtx *ctx // CommandCtx to untrack |
| 226 | ) { |
| 227 | ASSERT(ctx != NULL); |
| 228 | ASSERT(_globals.command_ctxs != NULL); |
| 229 | |
| 230 | int tid = ThreadPools_GetThreadID(); |
| 231 | |
| 232 | // acuire read lock |
| 233 | pthread_rwlock_rdlock(&_globals.lock); |
| 234 | |
| 235 | ASSERT(_globals.command_ctxs[tid] == ctx); |
| 236 | |
| 237 | // clear ctx at the current thread entry |
| 238 | // CommandCtx_Free will free it eventually |
| 239 | _globals.command_ctxs[tid] = NULL; |
| 240 | |
| 241 | // release lock |
| 242 | pthread_rwlock_unlock(&_globals.lock); |
| 243 | } |
| 244 | |
| 245 | // get all currently tracked CommandCtxs |
| 246 | void Globals_GetCommandCtxs |
no test coverage detected