erlang's global lock
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
342 B

  1. #include "erl_nif.h"
  2. #include <stdio.h>
  3. static ERL_NIF_TERM termInt(ErlNifEnv *env, int argc, const ERL_NIF_TERM argv[]) {
  4. ErlNifUInt64 TermInt = (ErlNifUInt64)argv[0];
  5. return enif_make_uint64(env, TermInt);
  6. }
  7. static ErlNifFunc nif_funcs[] = {
  8. {"termInt", 1, termInt}
  9. };
  10. ERL_NIF_INIT(termInt, nif_funcs, NULL, NULL, NULL, NULL);