Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
8622 | Boppan | 1 | #include |
2 | #include |
||
3 | #include |
||
4 | |||
5 | static char buf[FILENAME_MAX + 1]; |
||
6 | static int static_index = 0; |
||
7 | |||
8 | char *tmpnam(char *name) { |
||
9 | ksys_proc_table_t table; |
||
10 | _ksys_process_info(&table, -1); |
||
11 | |||
12 | char *out = name ? name : buf; |
||
13 | // PID is also unique for each thread |
||
14 | sprintf(out, "/tmp0/1/%x_%x.tmp", table.pid, static_index++); |
||
15 | return out; |
||
16 | } |