From 799c767d319d65c94b3770e82490c8dd4dc80378 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 2 Nov 1999 18:00:15 +0000 Subject: Split the POSIX semaphore manager into multiple files. --- cpukit/posix/src/semaphoredeletesupp.c | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 cpukit/posix/src/semaphoredeletesupp.c (limited to 'cpukit/posix/src/semaphoredeletesupp.c') diff --git a/cpukit/posix/src/semaphoredeletesupp.c b/cpukit/posix/src/semaphoredeletesupp.c new file mode 100644 index 0000000000..04f0d1ad93 --- /dev/null +++ b/cpukit/posix/src/semaphoredeletesupp.c @@ -0,0 +1,49 @@ +/* + * $Id$ + */ + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +/*PAGE + * + * _POSIX_Semaphore_Delete + */ + +void _POSIX_Semaphore_Delete( + POSIX_Semaphore_Control *the_semaphore +) +{ + if ( !the_semaphore->linked && !the_semaphore->open_count ) { + _POSIX_Semaphore_Free( the_semaphore ); + +#if defined(RTEMS_MULTIPROCESSING) + if ( the_semaphore->process_shared == PTHREAD_PROCESS_SHARED ) { + + _Objects_MP_Close( + &_POSIX_Semaphore_Information, + the_semaphore->Object.id + ); + + _POSIX_Semaphore_MP_Send_process_packet( + POSIX_SEMAPHORE_MP_ANNOUNCE_DELETE, + the_semaphore->Object.id, + 0, /* Not used */ + 0 /* Not used */ + ); + } +#endif + + } +} -- cgit v1.2.3