[rtems commit] posix: Change sem_t to the 32-bit object type
Sebastian Huber
sebh at rtems.org
Tue Mar 10 08:11:12 UTC 2015
Module: rtems
Branch: master
Commit: 77e682ec8511f4bd2cde6f340cb938d60d38edd9
Changeset: http://git.rtems.org/rtems/commit/?id=77e682ec8511f4bd2cde6f340cb938d60d38edd9
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Mon Mar 9 13:18:33 2015 +0100
posix: Change sem_t to the 32-bit object type
This change is also valid for 16-bit object type architectures since in
this case POSIX_Semaphore_Control::Semaphore_id is used as a proxy.
---
cpukit/posix/include/semaphore.h | 2 +-
cpukit/posix/src/semopen.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cpukit/posix/include/semaphore.h b/cpukit/posix/include/semaphore.h
index 502150b..7349270 100644
--- a/cpukit/posix/include/semaphore.h
+++ b/cpukit/posix/include/semaphore.h
@@ -40,7 +40,7 @@ extern "C" {
/*
* 11.1 Semaphore Characteristics, P1003.1b-1993, p.219
*/
-typedef int sem_t;
+typedef uint32_t sem_t;
/*
* Bad semaphore Id
diff --git a/cpukit/posix/src/semopen.c b/cpukit/posix/src/semopen.c
index 0568ee6..4e5b61c 100644
--- a/cpukit/posix/src/semopen.c
+++ b/cpukit/posix/src/semopen.c
@@ -139,6 +139,6 @@ return_id:
the_semaphore->Semaphore_id = the_semaphore->Object.id;
return &the_semaphore->Semaphore_id;
#else
- return (sem_t *)&the_semaphore->Object.id;
+ return &the_semaphore->Object.id;
#endif
}
More information about the vc
mailing list