haiku/headers/private/kernel/posix/xsi_semaphore.h
Salvatore Benedetto 51daeb7147 - Fixed warnings
- Fixed deadlock in xsi_sem_undo - RecordUndo
- Fixed issue in xsi_sem_undo: if the semaphore set does not exist
anymore, ignore the request but do remove the process from the sUndoList,
which wasn't previously done.
- free() in ClearUndos was called with interrupts disabled
- when a semaphore set ends to exist, remove all it's sem_undo request as it's ID
will be reused in the future.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26727 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 11:30:55 +00:00

32 lines
714 B
C

/*
* Copyright 2008, Haiku Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef KERNEL_XSI_SEMAPHORE_H
#define KERNEL_XSI_SEMAPHORE_H
#include <sys/sem.h>
#include <sys/cdefs.h>
#include <OS.h>
#include <kernel.h>
#include <posix/xsi_semaphore_defs.h>
__BEGIN_DECLS
extern void xsi_ipc_init();
extern void xsi_sem_undo(team_id teamID, int32 numberOfUndos);
/* user calls */
int _user_xsi_semget(key_t key, int numberOfSemaphores, int flags);
int _user_xsi_semctl(int semaphoreID, int semaphoreNumber, int command,
union semun* args);
status_t _user_xsi_semop(int semaphoreID, struct sembuf *semOps,
size_t numSemOps);
__END_DECLS
#endif /* KERNEL_XSI_SEMAPHORE_H */