Tags

,

Linux semaphore is go by set, Windows not.

Sem create:
linux – key_t, semget, IPC_CREAT
win – SECURITY_ATTRIBUTES, CreateSemaphore

Sem open:
linux – semget
win – OpenSemaphore

Sem op:
linux – semop
win – WaitForSingelObject, ReleaseSemaphore

Sem close:
linux – semctl
win – CloseHandle

Sem free:
linux – semctl, IPC_RMID
win – CloseHandle, free

Windows has no real shared memory, use FileMapping instead.

Shared mem create:
linux – key_t, shmget, IPC_CREAT, shmat
win – SECURITY_ATTRIBUTES, CreateFileMapping, MapViewOfFile

Shared mem open:
linux – key_t, shmat(attach)
win – OpenFileMapping, MapViewOfFile

Shared mem close:
linux – shmdt(detach)
win – UnmapViewOfFile

Shared mem free:
linux – shmdt, shmctl, IPC_RMID
win – UnmapViewOfFile, CloseHandle, free

Advertisements