Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef SHMOPERATIONS_H
- #define SHMOPERATIONS_H
- #include "header.h"
- int delSharedMem(int sharedMem) {
- if(shmctl(sharedMem, IPC_RMID, NULL) == ERRCODE) {
- perror("shmctl");
- return EXIT_FAILURE;
- }
- return EXIT_SUCCESS;
- }
- int detachSharedMem(void *attachedMem) {
- if(shmdt(attachedMem) == ERRCODE) {
- perror("shmdt");
- return EXIT_FAILURE;
- }
- return EXIT_SUCCESS;
- }
- #endif // !SHMOPERATIONS_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement