[PATCH] posix: Implement self-contained POSIX rwlocks
POSIX rwlocks are now available in all configurations and no longer depend on --enable-posix. Update #2514. Update #3115. --- cpukit/libcsupport/include/rtems/libcsupport.h| 1 - cpukit/libcsupport/src/resource_snapshot.c| 2 - cpukit/posix/Makefile.am | 15 +- cpukit/posix/include/rtems/posix/config.h | 6 - cpukit/posix/include/rtems/posix/rwlock.h | 63 -- cpukit/posix/include/rtems/posix/rwlockimpl.h | 54 ++--- cpukit/posix/preinstall.am| 12 +- cpukit/posix/src/prwlock.c| 48 - cpukit/posix/src/prwlockdestroy.c | 20 +- cpukit/posix/src/prwlockinit.c| 81 +++ cpukit/posix/src/prwlockrdlock.c | 9 +- cpukit/posix/src/prwlocktimedrdlock.c | 9 +- cpukit/posix/src/prwlocktimedwrlock.c | 9 +- cpukit/posix/src/prwlocktryrdlock.c | 9 +- cpukit/posix/src/prwlocktrywrlock.c | 9 +- cpukit/posix/src/prwlockunlock.c | 26 ++- cpukit/posix/src/prwlockwrlock.c | 11 +- cpukit/rtems/src/rtemsobjectgetapiclassname.c | 1 - cpukit/sapi/include/confdefs.h| 26 --- cpukit/score/Makefile.am | 8 +- cpukit/score/include/rtems/score/corerwlock.h | 77 --- cpukit/score/include/rtems/score/corerwlockimpl.h | 68 -- cpukit/score/include/rtems/score/objectimpl.h | 1 - cpukit/score/include/rtems/sysinit.h | 1 - cpukit/score/preinstall.am| 13 +- cpukit/score/src/corerwlock.c | 3 +- cpukit/score/src/corerwlockobtainread.c | 17 +- cpukit/score/src/corerwlockobtainwrite.c | 7 +- cpukit/score/src/corerwlockrelease.c | 20 +- testsuites/psxtests/psxconfig01/init.c| 13 -- testsuites/psxtests/psxrwlock01/main.c| 1 - testsuites/psxtests/psxrwlock01/psxrwlock01.scn | 5 +- testsuites/psxtests/psxrwlock01/test.c| 252 +- testsuites/psxtmtests/psxtmrwlock01/init.c| 1 - testsuites/psxtmtests/psxtmrwlock02/init.c| 1 - testsuites/psxtmtests/psxtmrwlock03/init.c| 1 - testsuites/psxtmtests/psxtmrwlock04/init.c| 1 - testsuites/psxtmtests/psxtmrwlock05/init.c| 1 - testsuites/psxtmtests/psxtmrwlock06/init.c| 1 - testsuites/psxtmtests/psxtmrwlock07/init.c| 1 - testsuites/sptests/spsysinit01/init.c | 16 -- testsuites/sptests/spthreadq01/init.c | 19 -- 42 files changed, 389 insertions(+), 550 deletions(-) delete mode 100644 cpukit/posix/include/rtems/posix/rwlock.h delete mode 100644 cpukit/posix/src/prwlock.c delete mode 100644 cpukit/score/include/rtems/score/corerwlock.h diff --git a/cpukit/libcsupport/include/rtems/libcsupport.h b/cpukit/libcsupport/include/rtems/libcsupport.h index ace61c5c0d..3246209bad 100644 --- a/cpukit/libcsupport/include/rtems/libcsupport.h +++ b/cpukit/libcsupport/include/rtems/libcsupport.h @@ -114,7 +114,6 @@ typedef struct { uint32_t active_condition_variables; uint32_t active_message_queues; uint32_t active_mutexes; - uint32_t active_rwlocks; uint32_t active_semaphores; uint32_t active_threads; uint32_t active_timers; diff --git a/cpukit/libcsupport/src/resource_snapshot.c b/cpukit/libcsupport/src/resource_snapshot.c index 87d4a0108a..243ffd33cd 100644 --- a/cpukit/libcsupport/src/resource_snapshot.c +++ b/cpukit/libcsupport/src/resource_snapshot.c @@ -47,7 +47,6 @@ #include #include #include - #include #include #include #endif @@ -72,7 +71,6 @@ static const struct { { OBJECTS_POSIX_API, OBJECTS_POSIX_CONDITION_VARIABLES }, { OBJECTS_POSIX_API, OBJECTS_POSIX_MESSAGE_QUEUES }, { OBJECTS_POSIX_API, OBJECTS_POSIX_MUTEXES }, -{ OBJECTS_POSIX_API, OBJECTS_POSIX_RWLOCKS }, { OBJECTS_POSIX_API, OBJECTS_POSIX_SEMAPHORES }, { OBJECTS_POSIX_API, OBJECTS_POSIX_THREADS }, { OBJECTS_POSIX_API, OBJECTS_POSIX_TIMERS } diff --git a/cpukit/posix/Makefile.am b/cpukit/posix/Makefile.am index 153f684029..531acde156 100644 --- a/cpukit/posix/Makefile.am +++ b/cpukit/posix/Makefile.am @@ -22,6 +22,7 @@ include_rtems_posix_HEADERS += include/rtems/posix/keyimpl.h include_rtems_posix_HEADERS += include/rtems/posix/config.h include_rtems_posix_HEADERS += include/rtems/posix/posixapi.h include_rtems_posix_HEADERS += include/rtems/posix/priorityimpl.h +include_rtems_posix_HEADERS += include/rtems/posix/rwlockimpl.h include_rtems_posix_HEADERS += include/rtems/posix/semaphore.h include_rtems_posix_HEADERS += include/rtems/posix/semaphoreimpl.h include_rtems_posix_HEADERS += include/rtems/posix/spinlockimpl.h @@ -50,8 +51,6 @@ include_rtems_posix_HEADERS += include/rtems/posix/shmimpl.h include_rtems_posix_HEADERS += include/rtems/posi
[PATCH] RTEMS: Make pthread_rwlock_t self-contained
Signed-off-by: Sebastian Huber --- newlib/libc/sys/rtems/include/sys/_pthreadtypes.h | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/newlib/libc/sys/rtems/include/sys/_pthreadtypes.h b/newlib/libc/sys/rtems/include/sys/_pthreadtypes.h index 6ffedaebf..9ee443407 100644 --- a/newlib/libc/sys/rtems/include/sys/_pthreadtypes.h +++ b/newlib/libc/sys/rtems/include/sys/_pthreadtypes.h @@ -206,9 +206,14 @@ typedef struct { /* POSIX Reader/Writer Lock Types */ #if defined(_POSIX_READER_WRITER_LOCKS) -typedef __uint32_t pthread_rwlock_t; /* POSIX RWLock Object */ +typedef struct { + unsigned long _flags; + unsigned int _current_state; + unsigned int _number_of_readers; + struct _Thread_queue_Queue _Queue; +} pthread_rwlock_t; -#define _PTHREAD_RWLOCK_INITIALIZER ((pthread_rwlock_t) 0x) +#define _PTHREAD_RWLOCK_INITIALIZER { 0, 0, 0, _THREAD_QUEUE_INITIALIZER } typedef struct { int is_initialized; /* is this structure initialized? */ -- 2.12.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
RTEMS and Google Code-In
Hi Google Code-In is a program sponsored by the Google Open Source Program Office like Google Summer of Code but targeted to high school students. The projects are small taking no more than a few days. In order to be available to as many students as possible, many are non-coding. Open source organizations like RTEMS must have mentors and a fairly extensive task list. We have done this multiple times in the past. It is rewarding but hectic and we need as many mentors as possible. Mentors can be anyone technically capable of using RTEMS. GCI spans late November to mid-January and we need people who can handle tasks for different periods of that. GSoC students would be highly encouraged to exercise their newly gained knowledge and be mentors. GCI is a lot of fun and rewarding. We have gotten a lot of good work from students in the past. For example, much of the Doxygen per file boiler plate was added by GCI students. Repetitive tasks which are not scriptable but need to be done lots of times are good candidates. If you want more info, could mentor, or could recruit someone who uses RTEMS who doesn't pop up on the list, please speak up. Thanks. --joel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: RTEMS and Google Code-In
There is also the Outreachy project, does RTEMS participate in it? 2017-09-22 18:35 GMT+02:00 Joel Sherrill : > Hi > > Google Code-In is a program sponsored by the Google Open Source > Program Office like Google Summer of Code but targeted to high school > students. The projects are small taking no more than a few days. In order > to be available to as many students as possible, many are non-coding. > > Open source organizations like RTEMS must have mentors and a > fairly extensive task list. We have done this multiple times in the past. > It is rewarding but hectic and we need as many mentors as possible. > > Mentors can be anyone technically capable of using RTEMS. GCI > spans late November to mid-January and we need people who can > handle tasks for different periods of that. > > GSoC students would be highly encouraged to exercise their newly > gained knowledge and be mentors. > > GCI is a lot of fun and rewarding. We have gotten a lot of good work > from students in the past. For example, much of the Doxygen per > file boiler plate was added by GCI students. Repetitive tasks which > are not scriptable but need to be done lots of times are good candidates. > > If you want more info, could mentor, or could recruit someone who uses > RTEMS who doesn't pop up on the list, please speak up. > > Thanks. > > --joel > > ___ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel > -- Regards, Denis Obrezkov ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Recent IOP Changes and IPV4 TCP/IP Stack
Hi I don't see any changes to libnetworking/rtems. I thought there would be some impact but don't see it. I expected some impact but there are no recent changes to this directory. Looking for an explanation. Thanks. --joel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Recent IOP Changes and IPV4 TCP/IP Stack
- Joel Sherrill schrieb: > Hi > > I don't see any changes to libnetworking/rtems. I thought > there would be some impact but don't see it. > > I expected some impact but there are no recent changes to > this directory. > > Looking for an explanation. Here are the changes: https://git.rtems.org/rtems/log/cpukit/libnetworking/rtems/rtems_syscall.c -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.huber at embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Recent IOP Changes and IPV4 TCP/IP Stack
On Fri, Sep 22, 2017 at 1:10 PM, Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > > - Joel Sherrill schrieb: > > Hi > > > > I don't see any changes to libnetworking/rtems. I thought > > there would be some impact but don't see it. > > > > I expected some impact but there are no recent changes to > > this directory. > > > > Looking for an explanation. > > Here are the changes: > > https://git.rtems.org/rtems/log/cpukit/libnetworking/rtems/rtems_syscall.c > > Thanks. Weird that git log didn't show anything recent. The first few changes look quite subtle so I can see where I missed spotting them just scanning the code. > -- > Sebastian Huber, embedded brains GmbH > > Address : Dornierstr. 4, D-82178 Puchheim, Germany > Phone : +49 89 189 47 41-16 > Fax : +49 89 189 47 41-09 > E-Mail : sebastian.huber at embedded-brains.de > PGP : Public key available on request. > > Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. > ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: RTEMS and Google Code-In
On Fri, Sep 22, 2017 at 11:47 AM, Denis Obrezkov wrote: > There is also the Outreachy project, does RTEMS participate in it? > > There are categories of tasks and Outreach is one of them. In the past, we have had students make new logos, gather information on RTEMS science missions for flyers, make a video of building RTEMS explaining that to others, etc. It is a broad category and each task is often repeatable by multiple students. Unlike GSoC, there are "repeatable" tasks. A lot of students can do a task but each only once. The GSoC hello is always one of these. For tasks like these, any RTEMS user should be able to review the work. Also mentors are a "pool" and respond to students as they need us. Basically, they ask a question, submit work for review, etc. Whichever mentor gets to it first, handles it. A special case is when work must be merged. Someone either needs to merge it or accept responsibility for submitting it and tracking it through merger. It is better not to close those tasks before merged. --joel > 2017-09-22 18:35 GMT+02:00 Joel Sherrill : > >> Hi >> >> Google Code-In is a program sponsored by the Google Open Source >> Program Office like Google Summer of Code but targeted to high school >> students. The projects are small taking no more than a few days. In order >> to be available to as many students as possible, many are non-coding. >> >> Open source organizations like RTEMS must have mentors and a >> fairly extensive task list. We have done this multiple times in the past. >> It is rewarding but hectic and we need as many mentors as possible. >> >> Mentors can be anyone technically capable of using RTEMS. GCI >> spans late November to mid-January and we need people who can >> handle tasks for different periods of that. >> >> GSoC students would be highly encouraged to exercise their newly >> gained knowledge and be mentors. >> >> GCI is a lot of fun and rewarding. We have gotten a lot of good work >> from students in the past. For example, much of the Doxygen per >> file boiler plate was added by GCI students. Repetitive tasks which >> are not scriptable but need to be done lots of times are good candidates. >> >> If you want more info, could mentor, or could recruit someone who uses >> RTEMS who doesn't pop up on the list, please speak up. >> >> Thanks. >> >> --joel >> >> ___ >> devel mailing list >> devel@rtems.org >> http://lists.rtems.org/mailman/listinfo/devel >> > > > > -- > Regards, Denis Obrezkov > ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: RTEMS and Google Code-In
Oh, I have meant this project: https://www.outreachy.org/ 2017-09-22 21:13 GMT+02:00 Joel Sherrill : > > > On Fri, Sep 22, 2017 at 11:47 AM, Denis Obrezkov > wrote: > >> There is also the Outreachy project, does RTEMS participate in it? >> >> > There are categories of tasks and Outreach is one of them. In the past, > we have had students make new logos, gather information on RTEMS > science missions for flyers, make a video of building RTEMS explaining > that to others, etc. It is a broad category and each task is often > repeatable > by multiple students. > > Unlike GSoC, there are "repeatable" tasks. A lot of students can do > a task but each only once. The GSoC hello is always one of these. > > For tasks like these, any RTEMS user should be able to review the > work. > > Also mentors are a "pool" and respond to students as they need > us. Basically, they ask a question, submit work for review, etc. Whichever > mentor gets to it first, handles it. > > A special case is when work must be merged. Someone either needs > to merge it or accept responsibility for submitting it and tracking it > through merger. It is better not to close those tasks before merged. > > --joel > > >> 2017-09-22 18:35 GMT+02:00 Joel Sherrill : >> >>> Hi >>> >>> Google Code-In is a program sponsored by the Google Open Source >>> Program Office like Google Summer of Code but targeted to high school >>> students. The projects are small taking no more than a few days. In order >>> to be available to as many students as possible, many are non-coding. >>> >>> Open source organizations like RTEMS must have mentors and a >>> fairly extensive task list. We have done this multiple times in the past. >>> It is rewarding but hectic and we need as many mentors as possible. >>> >>> Mentors can be anyone technically capable of using RTEMS. GCI >>> spans late November to mid-January and we need people who can >>> handle tasks for different periods of that. >>> >>> GSoC students would be highly encouraged to exercise their newly >>> gained knowledge and be mentors. >>> >>> GCI is a lot of fun and rewarding. We have gotten a lot of good work >>> from students in the past. For example, much of the Doxygen per >>> file boiler plate was added by GCI students. Repetitive tasks which >>> are not scriptable but need to be done lots of times are good candidates. >>> >>> If you want more info, could mentor, or could recruit someone who uses >>> RTEMS who doesn't pop up on the list, please speak up. >>> >>> Thanks. >>> >>> --joel >>> >>> ___ >>> devel mailing list >>> devel@rtems.org >>> http://lists.rtems.org/mailman/listinfo/devel >>> >> >> >> >> -- >> Regards, Denis Obrezkov >> > > -- Regards, Denis Obrezkov ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: RTEMS and Google Code-In
Oh. That looks like a good opportunity. On Fri, Sep 22, 2017 at 2:19 PM, Denis Obrezkov wrote: > Oh, I have meant this project: https://www.outreachy.org/ > > 2017-09-22 21:13 GMT+02:00 Joel Sherrill : > >> >> >> On Fri, Sep 22, 2017 at 11:47 AM, Denis Obrezkov > > wrote: >> >>> There is also the Outreachy project, does RTEMS participate in it? >>> >>> >> There are categories of tasks and Outreach is one of them. In the past, >> we have had students make new logos, gather information on RTEMS >> science missions for flyers, make a video of building RTEMS explaining >> that to others, etc. It is a broad category and each task is often >> repeatable >> by multiple students. >> >> Unlike GSoC, there are "repeatable" tasks. A lot of students can do >> a task but each only once. The GSoC hello is always one of these. >> >> For tasks like these, any RTEMS user should be able to review the >> work. >> >> Also mentors are a "pool" and respond to students as they need >> us. Basically, they ask a question, submit work for review, etc. Whichever >> mentor gets to it first, handles it. >> >> A special case is when work must be merged. Someone either needs >> to merge it or accept responsibility for submitting it and tracking it >> through merger. It is better not to close those tasks before merged. >> >> --joel >> >> >>> 2017-09-22 18:35 GMT+02:00 Joel Sherrill : >>> Hi Google Code-In is a program sponsored by the Google Open Source Program Office like Google Summer of Code but targeted to high school students. The projects are small taking no more than a few days. In order to be available to as many students as possible, many are non-coding. Open source organizations like RTEMS must have mentors and a fairly extensive task list. We have done this multiple times in the past. It is rewarding but hectic and we need as many mentors as possible. Mentors can be anyone technically capable of using RTEMS. GCI spans late November to mid-January and we need people who can handle tasks for different periods of that. GSoC students would be highly encouraged to exercise their newly gained knowledge and be mentors. GCI is a lot of fun and rewarding. We have gotten a lot of good work from students in the past. For example, much of the Doxygen per file boiler plate was added by GCI students. Repetitive tasks which are not scriptable but need to be done lots of times are good candidates. If you want more info, could mentor, or could recruit someone who uses RTEMS who doesn't pop up on the list, please speak up. Thanks. --joel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel >>> >>> >>> >>> -- >>> Regards, Denis Obrezkov >>> >> >> > > > -- > Regards, Denis Obrezkov > ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel