nckernel  0.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
common.c
Go to the documentation of this file.
1 #include <stdint.h>
2 #include <sys/types.h>
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include <stddef.h>
6 
7 #include <list.h>
8 #include <object.h>
9 #include <thread.h>
10 
12 {
13  char *tmp;
14  uint32_t tcb_sz;
15 
16  tmp = getenv("tcb_sz");
17  if (!tmp) {
18  return 0;
19  }
20 
21  tcb_sz = atoi(tmp);
22  if (tcb_sz < sizeof(struct local_tcb)) {
23  return 0;
24  }
25 
26  return tcb_sz;
27 }
28 
29 /* End of a file */