projects
/
gapil.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Aggiornate le date nelle note di copyright
[gapil.git]
/
listati
/
MemShared.c
diff --git
a/listati/MemShared.c
b/listati/MemShared.c
index dfeea8db164abea0cd65daa4e62e69576dff8fca..fa72c32a07d79fe327cb0c89c862634d53b0b09b 100644
(file)
--- a/
listati/MemShared.c
+++ b/
listati/MemShared.c
@@
-6,7
+6,7
@@
void * CreateShm(char * shm_name, off_t shm_size, mode_t perm, int fill)
int flag;
/* first open the object, creating it if not existent */
flag = O_CREAT|O_EXCL|O_RDWR;
int flag;
/* first open the object, creating it if not existent */
flag = O_CREAT|O_EXCL|O_RDWR;
- fd = shm_open(shm_name, flag, perm);
/* get object file descriptor */
+ fd = shm_open(shm_name, flag, perm); /* get object file descriptor */
if (fd < 0) {
return NULL;
}
if (fd < 0) {
return NULL;
}
@@
-19,14
+19,14
@@
void * CreateShm(char * shm_name, off_t shm_size, mode_t perm, int fill)
if (shm_ptr == MAP_FAILED) {
return NULL;
}
if (shm_ptr == MAP_FAILED) {
return NULL;
}
- memset((void *) shm_ptr, fill, shm_size);
/* fill segment */
+ memset((void *) shm_ptr, fill, shm_size); /* fill segment */
return shm_ptr;
}
/* Function FindShm: Find a POSIX shared memory segment */
void * FindShm(char * shm_name, off_t shm_size)
{
void * shm_ptr;
return shm_ptr;
}
/* Function FindShm: Find a POSIX shared memory segment */
void * FindShm(char * shm_name, off_t shm_size)
{
void * shm_ptr;
- int fd;
/* ID of the IPC shared memory segment */
+ int fd; /* ID of the IPC shared memory segment */
/* find shared memory ID */
if ((fd = shm_open(shm_name, O_RDWR|O_EXCL, 0)) < 0) {
return NULL;
/* find shared memory ID */
if ((fd = shm_open(shm_name, O_RDWR|O_EXCL, 0)) < 0) {
return NULL;