blob: 52cab174158c20330f464c1393faeb7616ce2249 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#ifndef CCMMC_HEADER_REGISTER_H
#define CCMMC_HEADER_REGISTER_H
typedef struct CcmmcRegStruct CcmmcReg;
typedef struct CcmmcTmpStruct {
CcmmcReg *reg;
int addr;
} CcmmcTmp;
typedef struct CcmmcRegStruct {
CcmmcTmp *tmp;
int lock;
const char *name;
} CcmmcReg;
typedef struct CcmmcRegPoolStruct {
CcmmcReg **list;
int num;
int lock_cnt;
int lock_max;
int top;
int exceed;
} CcmmcRegPool;
CcmmcRegPool *ccmmc_register_init (void);
CcmmcTmp *ccmmc_register_alloc (CcmmcRegPool *pool);
const char *ccmmc_register_lock (CcmmcRegPool *pool,
CcmmcTmp *tmp);
void ccmmc_register_unlock (CcmmcRegPool *pool,
CcmmcTmp *tmp);
void ccmmc_register_free (CcmmcRegPool *pool,
CcmmcTmp *tmp);
void ccmmc_register_caller_save (CcmmcRegPool *pool);
void ccmmc_register_caller_load (CcmmcRegPool *pool);
void ccmmc_register_fini (CcmmcRegPool *pool);
#endif
// vim: set sw=4 ts=4 sts=4 et:
|