source: trunk/IPs/systemC/Environment/Sim2OS/src/Sim2OS_service_lseek.cpp @ 87

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