Last change
on this file since 89 was
81,
checked in by rosiere, 16 years ago
|
- Finish Environment (and test)
- Continue predictor_unit
- Add external tools
- svn keyword "Id" set
|
-
Property svn:keywords set to
Id
|
File size:
884 bytes
|
Line | |
---|
1 | #ifndef SERVICE_CONVERSION_H |
---|
2 | #define SERVICE_CONVERSION_H |
---|
3 | |
---|
4 | #include "service.h" |
---|
5 | |
---|
6 | namespace hierarchy_memory |
---|
7 | { |
---|
8 | namespace sim2os |
---|
9 | { |
---|
10 | namespace service |
---|
11 | { |
---|
12 | |
---|
13 | int service2int(service_t num_service) |
---|
14 | { |
---|
15 | return (int)num_service; |
---|
16 | } |
---|
17 | |
---|
18 | service_t int2service (int val) |
---|
19 | { |
---|
20 | switch (val) |
---|
21 | { |
---|
22 | case SERVICE_OPEN : return SERVICE_OPEN ; |
---|
23 | case SERVICE_CLOSE : return SERVICE_CLOSE; |
---|
24 | case SERVICE_READ : return SERVICE_READ ; |
---|
25 | case SERVICE_WRITE : return SERVICE_WRITE; |
---|
26 | case SERVICE_TIME : return SERVICE_TIME ; |
---|
27 | case SERVICE_CLOCK : return SERVICE_CLOCK; |
---|
28 | case SERVICE_LSEEK : return SERVICE_LSEEK; |
---|
29 | case SERVICE_UNIMPLEMENTED : return SERVICE_UNIMPLEMENTED; |
---|
30 | default : return SERVICE_UNDEFINED; |
---|
31 | }//end switch |
---|
32 | } |
---|
33 | |
---|
34 | };};}; |
---|
35 | #endif //SERVICE_CONVERSION_H |
---|
Note: See
TracBrowser
for help on using the repository browser.