Syntaktische korektur
This commit is contained in:
parent
b0f99af8d7
commit
8bdee40ef3
|
@ -1,25 +1,25 @@
|
|||
#include "SharedMemory.h"
|
||||
|
||||
//Shared-Memory-Segment erstellen oder öffnen – shmget()
|
||||
void shared-memory-init(){
|
||||
memmory-id = shmget(IPC_PRIVATE, SHMMAXSIZE, IPC_CREAT | IPC_EXCL);
|
||||
void shared_memory_init(){
|
||||
memory_id = shmget(IPC_PRIVATE, SHMMAXSIZE, IPC_CREAT | IPC_EXCL);
|
||||
}
|
||||
|
||||
//Ein Shared-Memory-Segment abfragen, ändern oder löschen – shmctl()
|
||||
void delet-shared-memory(){
|
||||
int shmctl(memmory-id, IPC_RMID, 0);
|
||||
void delet_shared_memory(){
|
||||
int shmctl(memory_id, IPC_RMID, 0);
|
||||
}
|
||||
|
||||
//Shared-Memory-Segment an einen Prozess anbinden (attach) – shmat()
|
||||
void attach-process(char *myProcess){
|
||||
if(( myProcess = shmat( memmory-id, (char *)0, 0 )) < (char *)0 ){
|
||||
void attach_process(char *myProcess){
|
||||
if(( myProcess = shmat( memmory_id, (char *)0, 0 )) < (char *)0 ){
|
||||
perror("Fehler beim Ankoppeln des gemeinsamen Speicher Segments");
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
//Ein Shared-Memory-Segment loslösen – shmdt()
|
||||
void release-memory‚(){
|
||||
void release_memory(){
|
||||
int shmdt(void *myProcess);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,21 +6,21 @@
|
|||
#include <sys/shm.h>
|
||||
|
||||
//ID-Speicherbereich
|
||||
#define int speicher-id
|
||||
#define int memory_id
|
||||
//Größe des Speicherbereichs hier 8MB (64bit)
|
||||
#define SHMMAXSIZE 64
|
||||
|
||||
|
||||
//Shared-Memory-Segment erstellen oder öffnen – shmget()
|
||||
void shared-memory-init();
|
||||
void shared_memory_init();
|
||||
|
||||
//Ein Shared-Memory-Segment abfragen, ändern oder löschen – shmctl()
|
||||
void delet-shared-memory();
|
||||
void delet_shared_memory();
|
||||
|
||||
//Shared-Memory-Segment an einen Prozess anbinden (attach) – shmat()
|
||||
void attach-process(char *myProcess);
|
||||
void attach_process(char *myProcess);
|
||||
|
||||
//Ein Shared-Memory-Segment loslösen – shmdt()
|
||||
void release-memory();
|
||||
void release_memory();
|
||||
|
||||
#endif //SHARED_MEMORY_H
|
||||
|
|
Loading…
Reference in New Issue