include: deprecate syscalls leftovers
[cavatools.git] / cachesim / utilities.h
1
2 // utilities.h
3 // simpleADL
4 //
5 // Created by pete on 1/17/17.
6 // Copyright © 2017 Kiva Design. All rights reserved.
7 //
8 // edited or touched Nov 6 2018
9
10 #ifndef utilities_h
11 #define utilities_h
12
13 #include <stdio.h>
14 #include "types.h"
15
16 char * utilityTitleAndVersion(void);
17
18 uint64 timenow(void);
19 void findent(FILE * f, int depth) ;
20
21 void * teqAlloc(char * msg, uint64 size);
22 void teqFree(char * msg, void * ptr);
23
24 char * utGetNameFromPath(char * p);
25 uint32 isqrt(uint32 n);
26 uint32 uniform(uint32 stream, uint32 base, uint32 limit);
27 uint32 triangular(uint32 stream, uint32 base, uint32 limit, uint32 mode);
28 void initUniform(void);
29 void findent(FILE * f, int depth);
30
31 int64 sext(uint32 n, uint64 v);
32 void allocError(uint64 n, char * thing, char * filename, int32 linenumber);
33
34 #endif /* utilities_h */