#
55b2baf2 |
|
21-Sep-2023 |
Augustin Cavalier <waddlesplash@gmail.com> |
kernel: Use correct type for semaphore numbers. It must be unsigned short, otherwise in some places we would use negative offsets and wind up out-of-bounds. Fixes #18586.
|
#
959d9cd0 |
|
21-Sep-2023 |
Augustin Cavalier <waddlesplash@gmail.com> |
kernel: Cleanups to the XSI message queue & semaphore implementations. * Remove unused/unneeded parameters to Dequeue. * Make use of StackOrHeapArray. * Reorder syscall-entry checks for efficiency. * Inline the unlock-block method and unset variables in the process. * Reorder code for clarity and to reduce indentation.
|
#
8540053c |
|
26-Apr-2023 |
Augustin Cavalier <waddlesplash@gmail.com> |
xsi_message_queue & xsi_semaphore: Downgrade a lot of traces. Reduces syslog spam.
|
#
6acd708e |
|
26-Apr-2023 |
Augustin Cavalier <waddlesplash@gmail.com> |
xsi_message_queue & xsi_semaphore: Use condition variables to wait. This removes a lot of custom logic for managing waiting threads, which was not even correct in all cases (and the code actually acknowledged this with a big TODO about it, which weinhold added all the way back in 2008!)
|
#
50a4c186 |
|
18-Dec-2021 |
Jérôme Duval <jerome.duval@gmail.com> |
kernel/xsi_semaphore: set otime when semop() succeeds used by PR_OpenSemaphore in NSPR to check the creator inited. Change-Id: I626c6ab0d50896c94224718ca4fa0788f74ae27a Reviewed-on: https://review.haiku-os.org/c/haiku/+/4824 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
|
#
899fdd04 |
|
23-Jul-2021 |
Adrien Destugues <adrien.destugues@opensource.viveris.fr> |
XSI semaphores: Do not insert invalid sem_keys in key map. Semaphore keys were added to the key map a bit early, before all error checking had been done. As a result, we could have keys in the map that would not point to a valid semaphore. Fixes the root issue in #16741. A previous patch in hrev54878 had already fixed the panic when trying to access such a key, but it was still possible to generate one. Change-Id: I7449e295fdbe2a48b554cbc0508683d042f6ca48 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4240 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
|
#
b181ea96 |
|
10-Jan-2021 |
Adrien Destugues <adrien.destugues@opensource.viveris.fr> |
xsi_semget: fix possible way to crash the kernel I don't know if the behavior makes sense, but anything is better than a kernel crash. The ticket is an example calling the syscall directly, so there is no user-oriented guarantee on how we behave here. Fixes #16741. Change-Id: I803596004d005c8c0e058c5422c4b0f7c78cfad8 Reviewed-on: https://review.haiku-os.org/c/haiku/+/3623 Reviewed-by: Rene Gollent <rene@gollent.com>
|
#
c62142a7 |
|
18-Feb-2019 |
Augustin Cavalier <waddlesplash@gmail.com> |
kernel: Add missing NULL check to _user_xsi_semget. Private semaphores will have a key of -1, but IPC_PRIVATE is 0, meaning it is possible to wind up here and get a NULL semaphoreSet if someone passes us an argument of -1. Reported on Twitter.
|
#
80be7d09 |
|
23-Sep-2018 |
Augustin Cavalier <waddlesplash@gmail.com> |
kernel: Handle the user buffers properly in _user_xsi_semctl. Should fix #14512.
|
#
bec80c1c |
|
10-Feb-2018 |
Jérôme Duval <jerome.duval@gmail.com> |
white space cleanup
|
#
718d7149 |
|
10-Feb-2018 |
Jérôme Duval <jerome.duval@gmail.com> |
white space cleanup
|
#
c73d1301 |
|
08-Nov-2015 |
Michael Lotz <mmlr@mlotz.ch> |
kernel: Use anonymous namespaces to avoid type collisions. The anonymous namespace makes type definitions local to the translation unit (like static does for objects). For pretty much any type not shared across multiple files this is what one wants to happen (and might erroneously expect to happen automatically). This commit solves some actual collisions that were present: * The VFS and the rootfs both used an incompatible VnodeHash struct for their BOpenHashTable. * XSI semaphores and message queues both used queued_thread, Ipc and IpcHashTableDefinition. For release builds these did not cause problems as the types were fully inlined. Debug builds would crash at boot however because parts of a BOpenHashTable<VnodeHash> from the rootfs meant to operate on struct rootfs_vnode would be applied to one from the VFS expecting struct vnode. As such collisions are violations of the one definition rule, the code is at fault and unfortunatley the compiler isn't required to diagnose such problems across translation units (which isn't actually trivial). This can lead to subtle and hard to debug problems and it's therefore best to avoid leaking types into the global namespace whenever possible.
|
#
ba0b0f23 |
|
21-Jul-2014 |
Adrien Destugues <pulkomandy@pulkomandy.tk> |
Sorry, I didn't mean to commit this.
|
#
043178a0 |
|
21-Jul-2014 |
Adrien Destugues <pulkomandy@pulkomandy.tk> |
Add WizzNic * Update sdl_image_x86 to a version that can load PNG files * Update giflib_x86 to match what's required by the new SDL_image package
|
#
01fbdbab |
|
30-May-2014 |
Jessica Hamilton <jessica.l.hamilton@gmail.com> |
xsi_semaphore: use MemoryDeleter instead of multiple free()
|
#
d0592a11 |
|
24-Dec-2013 |
Puck Meerburg <puck@puckipedia.nl> |
Fix Coverity bug 605892: Resource leak Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
|
#
20ded5c2 |
|
06-Nov-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
kernel/posix: Do not use thread_block_locked()
|
#
73ad2473 |
|
05-Nov-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
Remove remaining unnecessary 'volatile' qualifiers
|
#
c8dd9f77 |
|
29-Oct-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
kernel: Add thread_unblock() and use it where possible
|
#
4be4fc6b |
|
15-Jun-2012 |
Alex Smith <alex@alex-smith.me.uk> |
More 64-bit compilation/safety fixes.
|
#
24df6592 |
|
11-Jun-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Merged signals-merge branch into trunk with the following changes: * Reorganized the kernel locking related to threads and teams. * We now discriminate correctly between process and thread signals. Signal handlers have been moved to teams. Fixes #5679. * Implemented real-time signal support, including signal queuing, SA_SIGINFO support, sigqueue(), sigwaitinfo(), sigtimedwait(), waitid(), and the addition of the real-time signal range. Closes #1935 and #2695. * Gave SIGBUS a separate signal number. Fixes #6704. * Implemented <time.h> clock and timer support, and fixed/completed alarm() and [set]itimer(). Closes #5682. * Implemented support for thread cancellation. Closes #5686. * Moved send_signal() from <signal.h> to <OS.h>. Fixes #7554. * Lots over smaller more or less related changes. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42116 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4535495d |
|
10-Jan-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Merged the signals branch into trunk, with these changes: * The team and thread kernel structures have been renamed to Team and Thread respectively and moved into the new BKernel namespace. * Several (kernel add-on) sources have been converted from C to C++ since private kernel headers are included that are no longer C compatible. Changes after merging: * Fixed gcc 2 build (warnings mainly in the scary firewire bus manager). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40196 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
cee04e80 |
|
08-Feb-2010 |
Artur Wyszynski <aljen-mlists@o2.pl> |
Fixed various errors/warnings reported by cppcheck: * memory leaks * resource leaks * added const's to getters * removed a few reundant conditions git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35433 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5147963d |
|
26-Jul-2009 |
Stephan Aßmus <superstippi@gmx.de> |
headers/private/kernel/util/OpenHashTable.h, Hugo's version, is a bit nicer than Tracker's OpenHashTable.h which it should eventually replace. We've renamed the class to BOpenHashTable and changed the interface slightly so that HashTableLink became superfluous. Adapted all the code that used it. Since the OpenHashTables no longer clash, this should fix the GCC4 build. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31791 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8a05bb86 |
|
16-Oct-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Added TODO regarding serious locking problem. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28192 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
9cab5f54 |
|
11-Sep-2008 |
Salvatore Benedetto <salvatore.benedetto@gmail.com> |
* Order members alphabetically. No functional changes git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27420 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c0c7a73d |
|
03-Sep-2008 |
Salvatore Benedetto <salvatore.benedetto@gmail.com> |
* split Wait() method into Enqueue() - BlockAndUnlock() - Deque() in order to remove a race condition pointed out by Ingo, hopefully in a clean way. The set is now unlocked right before blocking * Reworked the way ID were assgned: the current time is now used as ID. This lower quite a lot the probability of having an ID reused. * Introduced a sequence number field in the set class as a second ID, as suggested by Ingo. It is used on wake up in order not to confuse a no more existing set with a new one with the same ID * Removed a now unnecessary UnsetID() method * Increased the arbitraty limit of max sempahore allowed in the system, and introduced a new one for the total number of set. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27320 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
dc0cdfb2 |
|
01-Sep-2008 |
Salvatore Benedetto <salvatore.benedetto@gmail.com> |
* Fix a potential race condition when deleting a semaphore set: previously only the ipc hash table lock along with the semaphore set hash table lock were hold, thinking (wrongly) that the semaphore set lock itself was not needed. What could happen was that another process on semop could have gained the lock of the set itself, and then release the semaphore set hash table lock. This would make it think that the set was still valid, while it could have actually been deleted right after it release the semaphore set hash table lock. Same would have happened for any other processes waiting on the semaphore set mutex queue. By calling the lock on the mutex when deleting the set, it *should be* safe to assume that there is no one else waiting on its queue, since the list of waiters is handled in a FIFO way. As far as I can see from the mutex_destroy code, it looks safe to hold the lock when calling this function. Please confirm. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27268 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f273b13d |
|
31-Aug-2008 |
Salvatore Benedetto <salvatore.benedetto@gmail.com> |
* Renamed xsi_ipc_init() to xsi_sem_init() as there will be a xsi_msg_init() for message queue * Removed unnecessary header Vector.h * Removed HasSemaphoreSet method: since there will be an IPC table for each subsystem, if a key exist, it already has a semaphore set associated with it git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27256 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6ae7f687 |
|
16-Aug-2008 |
Salvatore Benedetto <salvatore.benedetto@gmail.com> |
* Reworked the way sem_undo requests are processed by following Ingo suggestions: instead of having one global sem_undo list, we now have two local list, one per semaphore set and one per team which is held in its xsi_sem_context structure, along with a mutex. A mutex has also been added to the semaphore set class in order to protect the local list, but also in order to (hopefully) improve concurrency. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26993 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
79f556e5 |
|
05-Aug-2008 |
Salvatore Benedetto <salvatore.benedetto@gmail.com> |
* Check for wake ups on Revert() * Fix TRACE() output * Check for IPC_CREAT in xsi_semget when IPC does not yet exist * Fix bound checking * Fix setpid call git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26814 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
15374c5d |
|
02-Aug-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Renamed thread_spinlock and team_spinlock to gThreadSpinlock and gTeamSpinlock. * Renamed the static global variables in smp.c to match our style guide. * Minor other cleanup. * Removed superfluous white space. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26730 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
51daeb71 |
|
02-Aug-2008 |
Salvatore Benedetto <salvatore.benedetto@gmail.com> |
- 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
|
#
47ca7595 |
|
28-Jul-2008 |
Axel Dörfler <axeld@pinc-software.de> |
First patch by Salvatore to implement XSI semaphores with a few changes by myself: * renamed xsi_do_undo() to xsi_sem_undo() (there is more to XSI than sems). * Fixed coding style issues in sys/sem.h and xsi_sem.cpp. * Added _kern_*() syscall prototypes to syscalls.h. * Added a TODO in xsi_sem.cpp and xsi_semaphore.h about moving union semun to a shared header. * Made the team::xsi_sem_undo_requests int32 - due to padding, it would have needed 4 bytes anyway; please always use specific types over int/short/long. * xsi_sem_undo() now checks if it needs to do anything - the calls in team.cpp no longer needs to do this. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26676 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ba0b0f2319047908ef6bde9c3c77d15648ed8765 |
|
21-Jul-2014 |
Adrien Destugues <pulkomandy@pulkomandy.tk> |
Sorry, I didn't mean to commit this.
|
#
043178a06317ccc9cd36ceda21bf6c6153986b0f |
|
21-Jul-2014 |
Adrien Destugues <pulkomandy@pulkomandy.tk> |
Add WizzNic * Update sdl_image_x86 to a version that can load PNG files * Update giflib_x86 to match what's required by the new SDL_image package
|
#
01fbdbab832e607c7923c886bd3ae850386e6ffc |
|
30-May-2014 |
Jessica Hamilton <jessica.l.hamilton@gmail.com> |
xsi_semaphore: use MemoryDeleter instead of multiple free()
|
#
d0592a11644a9f9d1161cee3124e15c956770a41 |
|
24-Dec-2013 |
Puck Meerburg <puck@puckipedia.nl> |
Fix Coverity bug 605892: Resource leak Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
|
#
20ded5c2eb7b51da4e34c40078de2903243ef56f |
|
06-Nov-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
kernel/posix: Do not use thread_block_locked()
|
#
73ad2473e7874b3702cf5b0fdf4c81b747812ed9 |
|
05-Nov-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
Remove remaining unnecessary 'volatile' qualifiers
|
#
c8dd9f7780c426e592a3ccb231e6bfab51f15eb9 |
|
29-Oct-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
kernel: Add thread_unblock() and use it where possible
|
#
4be4fc6b1faddbd037146214a0011d320842b4f3 |
|
15-Jun-2012 |
Alex Smith <alex@alex-smith.me.uk> |
More 64-bit compilation/safety fixes.
|
#
24df65921befcd0ad0c5c7866118f922da61cb96 |
|
11-Jun-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Merged signals-merge branch into trunk with the following changes: * Reorganized the kernel locking related to threads and teams. * We now discriminate correctly between process and thread signals. Signal handlers have been moved to teams. Fixes #5679. * Implemented real-time signal support, including signal queuing, SA_SIGINFO support, sigqueue(), sigwaitinfo(), sigtimedwait(), waitid(), and the addition of the real-time signal range. Closes #1935 and #2695. * Gave SIGBUS a separate signal number. Fixes #6704. * Implemented <time.h> clock and timer support, and fixed/completed alarm() and [set]itimer(). Closes #5682. * Implemented support for thread cancellation. Closes #5686. * Moved send_signal() from <signal.h> to <OS.h>. Fixes #7554. * Lots over smaller more or less related changes. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42116 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4535495d80c86e19e2610e7444a4fcefe3e0f8e6 |
|
10-Jan-2011 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Merged the signals branch into trunk, with these changes: * The team and thread kernel structures have been renamed to Team and Thread respectively and moved into the new BKernel namespace. * Several (kernel add-on) sources have been converted from C to C++ since private kernel headers are included that are no longer C compatible. Changes after merging: * Fixed gcc 2 build (warnings mainly in the scary firewire bus manager). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40196 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
cee04e8074ec61fd8c6dac3539c5b821c3618888 |
|
08-Feb-2010 |
Artur Wyszynski <aljen-mlists@o2.pl> |
Fixed various errors/warnings reported by cppcheck: * memory leaks * resource leaks * added const's to getters * removed a few reundant conditions git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35433 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5147963dcd57fefa4f63c484eb88e9eaf4002976 |
|
26-Jul-2009 |
Stephan Aßmus <superstippi@gmx.de> |
headers/private/kernel/util/OpenHashTable.h, Hugo's version, is a bit nicer than Tracker's OpenHashTable.h which it should eventually replace. We've renamed the class to BOpenHashTable and changed the interface slightly so that HashTableLink became superfluous. Adapted all the code that used it. Since the OpenHashTables no longer clash, this should fix the GCC4 build. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31791 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
8a05bb865f8402bd40875b2f477f122f38094309 |
|
16-Oct-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Added TODO regarding serious locking problem. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28192 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
9cab5f544812277e465d57cea14a535c8aff8dbc |
|
11-Sep-2008 |
Salvatore Benedetto <salvatore.benedetto@gmail.com> |
* Order members alphabetically. No functional changes git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27420 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c0c7a73dbefe3d2f930680e0679e374bc1ec57dc |
|
03-Sep-2008 |
Salvatore Benedetto <salvatore.benedetto@gmail.com> |
* split Wait() method into Enqueue() - BlockAndUnlock() - Deque() in order to remove a race condition pointed out by Ingo, hopefully in a clean way. The set is now unlocked right before blocking * Reworked the way ID were assgned: the current time is now used as ID. This lower quite a lot the probability of having an ID reused. * Introduced a sequence number field in the set class as a second ID, as suggested by Ingo. It is used on wake up in order not to confuse a no more existing set with a new one with the same ID * Removed a now unnecessary UnsetID() method * Increased the arbitraty limit of max sempahore allowed in the system, and introduced a new one for the total number of set. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27320 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
dc0cdfb2f0bdc7e7c48bea2352d7c3c796f97d7a |
|
01-Sep-2008 |
Salvatore Benedetto <salvatore.benedetto@gmail.com> |
* Fix a potential race condition when deleting a semaphore set: previously only the ipc hash table lock along with the semaphore set hash table lock were hold, thinking (wrongly) that the semaphore set lock itself was not needed. What could happen was that another process on semop could have gained the lock of the set itself, and then release the semaphore set hash table lock. This would make it think that the set was still valid, while it could have actually been deleted right after it release the semaphore set hash table lock. Same would have happened for any other processes waiting on the semaphore set mutex queue. By calling the lock on the mutex when deleting the set, it *should be* safe to assume that there is no one else waiting on its queue, since the list of waiters is handled in a FIFO way. As far as I can see from the mutex_destroy code, it looks safe to hold the lock when calling this function. Please confirm. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27268 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f273b13ddb6c92afd516f79f92447c1106a47238 |
|
31-Aug-2008 |
Salvatore Benedetto <salvatore.benedetto@gmail.com> |
* Renamed xsi_ipc_init() to xsi_sem_init() as there will be a xsi_msg_init() for message queue * Removed unnecessary header Vector.h * Removed HasSemaphoreSet method: since there will be an IPC table for each subsystem, if a key exist, it already has a semaphore set associated with it git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27256 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6ae7f6879ff2131f94b47b14764f65115d9bfdbc |
|
16-Aug-2008 |
Salvatore Benedetto <salvatore.benedetto@gmail.com> |
* Reworked the way sem_undo requests are processed by following Ingo suggestions: instead of having one global sem_undo list, we now have two local list, one per semaphore set and one per team which is held in its xsi_sem_context structure, along with a mutex. A mutex has also been added to the semaphore set class in order to protect the local list, but also in order to (hopefully) improve concurrency. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26993 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
79f556e5a6ebd13fbc8e39b275919551b6349c39 |
|
05-Aug-2008 |
Salvatore Benedetto <salvatore.benedetto@gmail.com> |
* Check for wake ups on Revert() * Fix TRACE() output * Check for IPC_CREAT in xsi_semget when IPC does not yet exist * Fix bound checking * Fix setpid call git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26814 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
15374c5dbdb2c6b700bb2191887cadad7ef9eb73 |
|
02-Aug-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Renamed thread_spinlock and team_spinlock to gThreadSpinlock and gTeamSpinlock. * Renamed the static global variables in smp.c to match our style guide. * Minor other cleanup. * Removed superfluous white space. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26730 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
51daeb7147ec5e457bca3a3acb7643ec92318d83 |
|
02-Aug-2008 |
Salvatore Benedetto <salvatore.benedetto@gmail.com> |
- 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
|
#
47ca7595ca54e08dac7482950a35b045e6ad8801 |
|
28-Jul-2008 |
Axel Dörfler <axeld@pinc-software.de> |
First patch by Salvatore to implement XSI semaphores with a few changes by myself: * renamed xsi_do_undo() to xsi_sem_undo() (there is more to XSI than sems). * Fixed coding style issues in sys/sem.h and xsi_sem.cpp. * Added _kern_*() syscall prototypes to syscalls.h. * Added a TODO in xsi_sem.cpp and xsi_semaphore.h about moving union semun to a shared header. * Made the team::xsi_sem_undo_requests int32 - due to padding, it would have needed 4 bytes anyway; please always use specific types over int/short/long. * xsi_sem_undo() now checks if it needs to do anything - the calls in team.cpp no longer needs to do this. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26676 a95241bf-73f2-0310-859d-f6bbb57e9c96
|