Changeset 213 in flair-src for trunk/lib/FlairCore/src/SharedMem_impl.cpp
- Timestamp:
- Jan 30, 2018, 5:47:12 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairCore/src/SharedMem_impl.cpp
r206 r213 29 29 sem(self,1,"/" + name + "_mutex"), sem_producer(self,0,"/" + name + "_producer"),sem_consumer(self,0,"/" + name + "_consumer") { 30 30 31 char errorMsg[256];32 33 31 #ifdef __XENO__ 34 32 heap_binded = false; … … 40 38 } 41 39 if (status != 0) { 40 char errorMsg[256]; 42 41 self->Err("rt_heap_create error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg))); 43 42 return; … … 47 46 status = rt_heap_alloc(&heap, 0, TM_NONBLOCK, &ptr); 48 47 if (status != 0) { 48 char errorMsg[256]; 49 49 self->Err("rt_heap_alloc error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg))); 50 50 } … … 68 68 SharedMem_impl::~SharedMem_impl() { 69 69 int status; 70 char errorMsg[256];71 70 72 71 #ifdef __XENO__ … … 75 74 status = rt_heap_delete(&heap); 76 75 if (status != 0) { 76 char errorMsg[256]; 77 77 self->Err("rt_heap_delete error (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg))); 78 78 } … … 82 82 status = munmap(mem_segment, size); 83 83 if (status != 0) { 84 char errorMsg[256]; 84 85 self->Err("Failed to unmap memory (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg))); 85 86 } … … 87 88 status = close(fd); 88 89 if (status != 0) { 90 char errorMsg[256]; 89 91 self->Err("Failed to close file (%s)\n", strerror_r(-status, errorMsg, sizeof(errorMsg))); 90 92 } … … 94 96 if(status!=0) 95 97 { 98 char errorMsg[256]; 96 99 self->Err("Failed to unlink memory (%s)\n",strerror_r(-status, errorMsg, sizeof(errorMsg))); 97 100 }
Note:
See TracChangeset
for help on using the changeset viewer.