Changeset 213 in flair-src for trunk/lib/FlairCore/src/SharedMem_impl.cpp


Ignore:
Timestamp:
Jan 30, 2018, 5:47:12 PM (7 years ago)
Author:
Sanahuja Guillaume
Message:

thread stack size rework
add Matrix class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/SharedMem_impl.cpp

    r206 r213  
    2929                               sem(self,1,"/" + name + "_mutex"), sem_producer(self,0,"/" + name + "_producer"),sem_consumer(self,0,"/" + name + "_consumer") {
    3030
    31   char errorMsg[256];
    32 
    3331#ifdef __XENO__
    3432  heap_binded = false;
     
    4038  }
    4139  if (status != 0) {
     40    char errorMsg[256];
    4241    self->Err("rt_heap_create error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
    4342    return;
     
    4746  status = rt_heap_alloc(&heap, 0, TM_NONBLOCK, &ptr);
    4847  if (status != 0) {
     48    char errorMsg[256];
    4949    self->Err("rt_heap_alloc error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
    5050  }
     
    6868SharedMem_impl::~SharedMem_impl() {
    6969  int status;
    70         char errorMsg[256];
    7170       
    7271#ifdef __XENO__
     
    7574    status = rt_heap_delete(&heap);
    7675    if (status != 0) {
     76      char errorMsg[256];
    7777      self->Err("rt_heap_delete error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
    7878    }
     
    8282  status = munmap(mem_segment, size);
    8383  if (status != 0) {
     84    char errorMsg[256];
    8485    self->Err("Failed to unmap memory (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
    8586  }
     
    8788  status = close(fd);
    8889  if (status != 0) {
     90    char errorMsg[256];
    8991    self->Err("Failed to close file (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg)));
    9092  }
     
    9496   if(status!=0)
    9597   {
     98      char errorMsg[256];
    9699       self->Err("Failed to unlink memory (%s)\n",strerror_r(-status, errorMsg, sizeof(errorMsg)));
    97100   }
Note: See TracChangeset for help on using the changeset viewer.