Good morning,
I want to allocate memory by using shmget,I want this memory to consist of 4 integers and three semaphores(type sem_t) which are going to have access to the same buffer.
How can ido that?
Thanks, in advance!
Printable View
Good morning,
I want to allocate memory by using shmget,I want this memory to consist of 4 integers and three semaphores(type sem_t) which are going to have access to the same buffer.
How can ido that?
Thanks, in advance!
Create a struct containing those items, then allocate sizeof(struct) amount of shared memory.