Last change
on this file since 84 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:
1.2 KB
|
Rev | Line | |
---|
[2] | 1 | #ifndef SERVICE_LSEEK_H |
---|
| 2 | #define SERVICE_LSEEK_H |
---|
| 3 | |
---|
| 4 | #include "../sim2os.h" |
---|
| 5 | |
---|
| 6 | namespace hierarchy_memory { |
---|
| 7 | namespace sim2os { |
---|
| 8 | |
---|
| 9 | //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~[ service_lseek ]~~~~~ |
---|
| 10 | void * |
---|
| 11 | Sim2os :: |
---|
| 12 | service_lseek () |
---|
| 13 | { |
---|
| 14 | if (have_all_arguments(3) == false) |
---|
| 15 | { |
---|
| 16 | cerr << "<" << NAME << "> Usage : off_t lseek(int fildes, off_t offset, int whence);" << endl; |
---|
| 17 | return NULL; |
---|
| 18 | } |
---|
| 19 | |
---|
| 20 | int flides = (int) arguments[1]; |
---|
| 21 | off_t offset = (off_t) arguments[2]; |
---|
| 22 | int whence = (int) arguments[3]; |
---|
| 23 | void * result = (void *) lseek(flides,offset,whence); |
---|
| 24 | error = errno; |
---|
| 25 | |
---|
| 26 | // No swap -> because no access memory |
---|
| 27 | |
---|
| 28 | cout << "\n\t***** service : lseek *****" << endl; |
---|
| 29 | cout << "\tflides : " << (unsigned int) flides << endl; |
---|
| 30 | cout << "\toffset : " << (unsigned int) offset << endl; |
---|
| 31 | cout << "\twhence : " << (unsigned int) whence << endl; |
---|
| 32 | cout << "\tresult : " << (unsigned int) result << endl; |
---|
| 33 | cout << "\terrno : " << (unsigned int) error << endl; |
---|
| 34 | |
---|
| 35 | return result; |
---|
| 36 | } |
---|
| 37 | |
---|
| 38 | };}; |
---|
| 39 | #endif //SERVICE_LSEEK_H |
---|
Note: See
TracBrowser
for help on using the repository browser.