Blame src/internal/toksvc_init_impl.h

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