Advertisement
Luis_Pedro

Untitled

Nov 8th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. struct armazem *memoriaPartilhada;
  2.     int shmid;
  3.     shmid=shmget(1234,(sizeof(struct armazem)*(config->numero_armazens_sistema)),0777|IPC_CREAT);
  4.     memoriaPartilhada=shmat(shmid, NULL, 0);
  5.     for (int i=0;i<config->numero_armazens_sistema;i++){
  6.         memoriaPartilhada[i]=config->armazensSistema[i];
  7.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement