| #ifndef TOKSVC_INIT_IMPL_H |
| #define TOKSVC_INIT_IMPL_H |
| |
| #include <ntapi/ntapi.h> |
| #include <ntapi/nt_atomic.h> |
| |
| extern const ntapi_vtbl * toks_ntapi; |
| |
| static inline int toks_init(void) |
| { |
| int32_t status; |
| ntapi_vtbl * pvtbl; |
| |
| if ((status = ntapi_init(&pvtbl))) |
| return status; |
| |
| at_locked_cas( |
| (intptr_t *)&toks_ntapi, |
| 0,(intptr_t)pvtbl); |
| |
| return 0; |
| } |
| |
| #endif |