[PATCH 1/2] libdl: Use 64-bit ELF on 64-bit targets
Update #3155. --- cpukit/libdl/rtl-elf.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cpukit/libdl/rtl-elf.h b/cpukit/libdl/rtl-elf.h index e3ac07f7ed..cee01804e0 100644 --- a/cpukit/libdl/rtl-elf.h +++ b/cpukit/libdl/rtl-elf.h @@ -29,9 +29,13 @@ extern "C" { **/ /* - * Always 32bit for RTEMS at the moment. Do not add '()'. Leave plain. + * Do not add '()'. Leave plain. */ +#if defined(__powerpc64__) || defined(__arch64__) +#define ELFSIZE 64 +#else #define ELFSIZE 32 +#endif /* * Define _STANDALONE then remove after. -- 2.12.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 2/2] libdl: Fix warnings
Update #3155. --- cpukit/libdl/rtl-elf.c | 26 +++- cpukit/libdl/rtl-mdreloc-powerpc.c | 5 ++-- cpukit/libdl/rtl-obj.c | 3 ++- cpukit/libdl/rtl-rap.c | 50 -- cpukit/libdl/rtl-shell.c | 2 +- 5 files changed, 47 insertions(+), 39 deletions(-) diff --git a/cpukit/libdl/rtl-elf.c b/cpukit/libdl/rtl-elf.c index be2f06a7ba..c2bac9f69d 100644 --- a/cpukit/libdl/rtl-elf.c +++ b/cpukit/libdl/rtl-elf.c @@ -84,7 +84,7 @@ rtems_rtl_elf_find_symbol (rtems_rtl_obj_t* obj, return false; } -*value = (Elf_Word) symbol->value; +*value = (Elf_Addr) symbol->value; return true; } @@ -95,7 +95,7 @@ rtems_rtl_elf_find_symbol (rtems_rtl_obj_t* obj, return false; } - *value = sym->st_value + (Elf_Word) sect->base; + *value = sym->st_value + (Elf_Addr) sect->base; return true; } @@ -250,9 +250,10 @@ rtems_rtl_elf_relocator (rtems_rtl_obj_t* obj, if (is_rela) { if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC)) - printf ("rtl: rela: sym:%s(%d)=%08lx type:%d off:%08lx addend:%d\n", - symname, (int) ELF_R_SYM (rela->r_info), symvalue, - (int) ELF_R_TYPE (rela->r_info), rela->r_offset, (int) rela->r_addend); + printf ("rtl: rela: sym:%s(%d)=%08jx type:%d off:%08jx addend:%d\n", + symname, (int) ELF_R_SYM (rela->r_info), + (uintmax_t) symvalue, (int) ELF_R_TYPE (rela->r_info), + (uintmax_t) rela->r_offset, (int) rela->r_addend); if (!rtems_rtl_elf_relocate_rela (obj, rela, targetsect, symname, sym.st_info, symvalue)) return false; @@ -260,9 +261,10 @@ rtems_rtl_elf_relocator (rtems_rtl_obj_t* obj, else { if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC)) - printf ("rtl: rel: sym:%s(%d)=%08lx type:%d off:%08lx\n", - symname, (int) ELF_R_SYM (rel->r_info), symvalue, - (int) ELF_R_TYPE (rel->r_info), rel->r_offset); + printf ("rtl: rel: sym:%s(%d)=%08jx type:%d off:%08jx\n", + symname, (int) ELF_R_SYM (rel->r_info), + (uintmax_t) symvalue, (int) ELF_R_TYPE (rel->r_info), + (uintmax_t) rel->r_offset); if (!rtems_rtl_elf_relocate_rel (obj, rel, targetsect, symname, sym.st_info, symvalue)) return false; @@ -304,9 +306,9 @@ rtems_rtl_obj_relocate_unresolved (rtems_rtl_unresolv_reloc_t* reloc, rela.r_info = reloc->rel[REL_R_INFO]; rela.r_addend = reloc->rel[REL_R_ADDEND]; if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC)) - printf ("rtl: rela: sym:%d type:%d off:%08lx addend:%d\n", + printf ("rtl: rela: sym:%d type:%d off:%08jx addend:%d\n", (int) ELF_R_SYM (rela.r_info), (int) ELF_R_TYPE (rela.r_info), - rela.r_offset, (int) rela.r_addend); + (uintmax_t) rela.r_offset, (int) rela.r_addend); if (!rtems_rtl_elf_relocate_rela (reloc->obj, &rela, sect, sym->name, sym->data, symvalue)) return false; @@ -317,9 +319,9 @@ rtems_rtl_obj_relocate_unresolved (rtems_rtl_unresolv_reloc_t* reloc, rel.r_offset = reloc->rel[REL_R_OFFSET]; rel.r_info = reloc->rel[REL_R_INFO]; if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC)) - printf ("rtl: rel: sym:%d type:%d off:%08lx\n", + printf ("rtl: rel: sym:%d type:%d off:%08jx\n", (int) ELF_R_SYM (rel.r_info), (int) ELF_R_TYPE (rel.r_info), - rel.r_offset); + (uintmax_t) rel.r_offset); if (!rtems_rtl_elf_relocate_rel (reloc->obj, &rel, sect, sym->name, sym->data, symvalue)) return false; diff --git a/cpukit/libdl/rtl-mdreloc-powerpc.c b/cpukit/libdl/rtl-mdreloc-powerpc.c index 978a2e8999..a3cb6b333a 100644 --- a/cpukit/libdl/rtl-mdreloc-powerpc.c +++ b/cpukit/libdl/rtl-mdreloc-powerpc.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -183,12 +184,12 @@ rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj, break; default: - printf ("rtl: reloc unknown: sym = %lu, type = %lu, offset = %p, " + printf ("rtl: reloc unknown: sym = %lu, type = %" PRIu32 ", offset = %p, " "contents = %p\n", ELF_R_SYM(rela->r_info), (uint32_t) ELF_R_TYPE(rela->r_info), (void *)rela->r_offset, (void *)*where); rtems_rtl_set_error (EINVAL, - "%s: Unsupported relocation type %ld " + "%s: Unsupported relocation type %" PRId32 "in non-PLT relocations", sect->name, (uint32_t) ELF_R_TYPE(rela->r_info)); return false; diff --git a/cpukit/libdl/rtl-obj.
Re: [PATCH 1/2] libdl: Use 64-bit ELF on 64-bit targets
> On 6 Oct 2017, at 6:17 pm, Sebastian Huber > wrote: > > Update #3155. All OK. Please push. Thank you. Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH] c-user: Clarify that confdefs.h is mandatory
--- c-user/configuring_a_system.rst | 24 +++- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/c-user/configuring_a_system.rst b/c-user/configuring_a_system.rst index 17c8a85..bed95cf 100644 --- a/c-user/configuring_a_system.rst +++ b/c-user/configuring_a_system.rst @@ -21,14 +21,11 @@ initialization tasks, the task scheduling algorithm to be used, and the device drivers in the application. Although this information is contained in data structures that are used by -RTEMS at system initialization time, the data structures themselves should only -rarely to be generated by hand. RTEMS provides a set of macros system which -provides a simple standard mechanism to automate the generation of these -structures. +RTEMS at system initialization time, the data structures themselves must not be +generated by hand. RTEMS provides a set of macros system which provides a +simple standard mechanism to automate the generation of these structures. .. index:: confdefs.h -.. index:: confdefs.h -.. index:: .. index:: The RTEMS header file is at the core of the automatic @@ -5090,18 +5087,3 @@ DESCRIPTION: NOTES: The Go language support is experimental - -.. COMMENT: === Configuration Data Structures === - -Configuration Data Structures -= - -It is recommended that applications be configured using -as it is simpler and insulates applications from changes in the underlying data -structures. However, it is sometimes important to understand the data -structures that are automatically filled in by the configuration parameters. -This section describes the primary configuration data structures. - -If the user wishes to see the details of a particular data structure, they are -are advised to look at the source code. After all, that is one of the -advantages of RTEMS. -- 2.12.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH] c-user: Add obsolete configuration options section
Update #3112. Update #3113. Update #3114. Update #3115. Update #3116. --- c-user/configuring_a_system.rst | 257 +++- 1 file changed, 93 insertions(+), 164 deletions(-) diff --git a/c-user/configuring_a_system.rst b/c-user/configuring_a_system.rst index bed95cf..6f30912 100644 --- a/c-user/configuring_a_system.rst +++ b/c-user/configuring_a_system.rst @@ -1182,62 +1182,6 @@ NOTES: All POSIX threads have floating point enabled. -.. COMMENT: XXX - Add xref to CONFIGURE_MAXIMUM_TASKS. - -.. COMMENT: === CONFIGURE_MAXIMUM_POSIX_MUTEXES === - -.. _Specify Maximum POSIX API Mutexes: - -Specify Maximum POSIX API Mutexes -- -.. index:: CONFIGURE_MAXIMUM_POSIX_MUTEXES - -CONSTANT: -``CONFIGURE_MAXIMUM_POSIX_MUTEXES`` - -DATA TYPE: -Unsigned integer (``uint32_t``). - -RANGE: -Zero or positive. - -DEFAULT VALUE: -The default value is 0. - -DESCRIPTION: -``CONFIGURE_MAXIMUM_POSIX_MUTEXES`` is the maximum number of POSIX API -Mutexes that can be concurrently active. - -NOTES: -This object class can be configured in unlimited allocation mode. - -.. COMMENT: === CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES === - -.. _Specify Maximum POSIX API Condition Variables: - -Specify Maximum POSIX API Condition Variables -- -.. index:: CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES - -CONSTANT: -``CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES`` - -DATA TYPE: -Unsigned integer (``uint32_t``). - -RANGE: -Zero or positive. - -DEFAULT VALUE: -The default value is 0. - -DESCRIPTION: -``CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES`` is the maximum number of -POSIX API Condition Variables that can be concurrently active. - -NOTES: -This object class can be configured in unlimited allocation mode. - .. COMMENT: === CONFIGURE_MAXIMUM_POSIX_KEYS === .. _Specify Maximum POSIX API Keys: @@ -1348,114 +1292,6 @@ DESCRIPTION: NOTES: This object class can be configured in unlimited allocation mode. -.. COMMENT: === CONFIGURE_MAXIMUM_POSIX_SEMAPHORES === - -.. _Specify Maximum POSIX API Semaphores: - -Specify Maximum POSIX API Semaphores - -.. index:: CONFIGURE_MAXIMUM_POSIX_SEMAPHORES - -CONSTANT: -``CONFIGURE_MAXIMUM_POSIX_SEMAPHORES`` - -DATA TYPE: -Unsigned integer (``uint32_t``). - -RANGE: -Zero or positive. - -DEFAULT VALUE: -The default value is 0. - -DESCRIPTION: -``CONFIGURE_MAXIMUM_POSIX_SEMAPHORES`` is the maximum number of POSIX API -Semaphores that can be concurrently active. - -NOTES: -None. - -.. COMMENT: === CONFIGURE_MAXIMUM_POSIX_BARRIERS === - -.. _Specify Maximum POSIX API Barriers: - -Specify Maximum POSIX API Barriers --- -.. index:: CONFIGURE_MAXIMUM_POSIX_BARRIERS - -CONSTANT: -``CONFIGURE_MAXIMUM_POSIX_BARRIERS`` - -DATA TYPE: -Unsigned integer (``uint32_t``). - -RANGE: -Zero or positive. - -DEFAULT VALUE: -The default value is 0. - -DESCRIPTION: -``CONFIGURE_MAXIMUM_POSIX_BARRIERS`` is the maximum number of POSIX API -Barriers that can be concurrently active. - -NOTES: -This object class can be configured in unlimited allocation mode. - -.. COMMENT: === CONFIGURE_MAXIMUM_POSIX_SPINLOCKS === - -.. _Specify Maximum POSIX API Spinlocks: - -Specify Maximum POSIX API Spinlocks -.. index:: CONFIGURE_MAXIMUM_POSIX_SPINLOCKS - -CONSTANT: -``CONFIGURE_MAXIMUM_POSIX_SPINLOCKS`` - -DATA TYPE: -Unsigned integer (``uint32_t``). - -RANGE: -Zero or positive. - -DEFAULT VALUE: -The default value is 0. - -DESCRIPTION: -``CONFIGURE_MAXIMUM_POSIX_SPINLOCKS`` is the maximum number of POSIX API -Spinlocks that can be concurrently active. - -NOTES: -This object class can be configured in unlimited allocation mode. - -.. COMMENT: === CONFIGURE_MAXIMUM_POSIX_RWLOCKS === - -.. _Specify Maximum POSIX API Read/Write Locks: - -Specify Maximum POSIX API Read/Write Locks --- -.. index:: CONFIGURE_MAXIMUM_POSIX_RWLOCKS - -CONSTANT: -``CONFIGURE_MAXIMUM_POSIX_RWLOCKS`` - -DATA TYPE: -Unsigned integer (``uint32_t``). - -RANGE: -Zero or positive. - -DEFAULT VALUE: -The default value is 0. - -DESCRIPTION: -``CONFIGURE_MAXIMUM_POSIX_RWLOCKS`` is the maximum number of POSIX API -Read/Write Locks that can be concurrently active. - -NOTES: -This object class can be configured in unlimited allocation mode. - .. COMMENT: === POSIX Initialization Threads Table Configuration === POSIX Initialization Threads Table Configuration @@ -5087,3 +4923,96 @@ DESCRIPTION: NOTES: The Go language support is experimental + +Obsolete Configuration Options +== + +CONFIGURE_BDBUF_BUFFER_COUNT + +.. index:: CONFIGURE_BDBUF_BUFFER_COUNT + +This configuration option was introduced in
Re: RTEMS 4.12 tool chain update required
On 05/10/17 15:45, Joel Sherrill wrote: This set of changes looks like it should have some impact on documentation. Any idea on the changes needed to reflect the POSIX changes? Only the configuration options come into my mind. Maybe we need a chapter for self-contained synchronization objects. -- 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.hu...@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
[PATCH 3/3] score: Change Timestamp_Control to sbintime_t
The timestamp are based on the uptime. There is no need for a 64-bit seconds part. The signed 32-bit seconds part of the sbintime_t limits the uptime to roughly 68 years. Close #2740. --- cpukit/score/include/rtems/score/timecounter.h | 7 cpukit/score/include/rtems/score/timestamp.h | 46 +- cpukit/score/include/rtems/score/todimpl.h | 5 ++- cpukit/score/src/kern_tc.c | 19 +++ 4 files changed, 43 insertions(+), 34 deletions(-) diff --git a/cpukit/score/include/rtems/score/timecounter.h b/cpukit/score/include/rtems/score/timecounter.h index f00a33ba70..f7912a5fd8 100644 --- a/cpukit/score/include/rtems/score/timecounter.h +++ b/cpukit/score/include/rtems/score/timecounter.h @@ -69,6 +69,13 @@ void _Timecounter_Microtime( struct timeval *tv ); void _Timecounter_Binuptime( struct bintime *bt ); /** + * @brief Returns the uptime in the sbintime_t format. + * + * @return Returns the uptime. + */ +sbintime_t _Timecounter_Sbinuptime( void ); + +/** * @brief Returns the uptime in the timespec format. * * @param[out] ts Returns the uptime. diff --git a/cpukit/score/include/rtems/score/timestamp.h b/cpukit/score/include/rtems/score/timestamp.h index ec297f93e8..6fc17ced9c 100644 --- a/cpukit/score/include/rtems/score/timestamp.h +++ b/cpukit/score/include/rtems/score/timestamp.h @@ -52,7 +52,7 @@ extern "C" { /** * Define the Timestamp control type. */ -typedef struct bintime Timestamp_Control; +typedef sbintime_t Timestamp_Control; /** * @brief Set timestamp to specified seconds and nanoseconds. @@ -75,7 +75,7 @@ RTEMS_INLINE_ROUTINE void _Timestamp_Set( _ts.tv_sec = _seconds; _ts.tv_nsec = _nanoseconds; - timespec2bintime( &_ts, _time ); + *_time = tstosbt(_ts); } /** @@ -91,8 +91,7 @@ RTEMS_INLINE_ROUTINE void _Timestamp_Set_to_zero( Timestamp_Control *_time ) { - _time->sec = 0; - _time->frac = 0; + *_time = 0; } /** @@ -112,13 +111,7 @@ RTEMS_INLINE_ROUTINE bool _Timestamp_Less_than( const Timestamp_Control *_rhs ) { - if ( _lhs->sec < _rhs->sec ) -return true; - - if ( _lhs->sec > _rhs->sec ) -return false; - - return _lhs->frac < _rhs->frac; + return *_lhs < *_rhs; } /** @@ -138,13 +131,7 @@ RTEMS_INLINE_ROUTINE bool _Timestamp_Greater_than( const Timestamp_Control *_rhs ) { - if ( _lhs->sec > _rhs->sec ) -return true; - - if ( _lhs->sec < _rhs->sec ) -return false; - - return _lhs->frac > _rhs->frac; + return *_lhs > *_rhs; } /** @@ -164,7 +151,7 @@ RTEMS_INLINE_ROUTINE bool _Timestamp_Equal_to( const Timestamp_Control *_rhs ) { - return _lhs->sec == _rhs->sec && _lhs->frac == _rhs->frac; + return *_lhs == *_rhs; } /** @@ -181,7 +168,7 @@ RTEMS_INLINE_ROUTINE void _Timestamp_Add_to( const Timestamp_Control *_add ) { - bintime_add( _time, _add ); + *_time += *_add; } /** @@ -203,10 +190,7 @@ RTEMS_INLINE_ROUTINE void _Timestamp_Subtract( Timestamp_Control *_result ) { - _result->sec = _end->sec; - _result->frac = _end->frac; - - bintime_sub( _result, _start ); + *_result = *_end - *_start; } /** @@ -232,8 +216,8 @@ RTEMS_INLINE_ROUTINE void _Timestamp_Divide( struct timespec _ts_left; struct timespec _ts_right; - bintime2timespec( _lhs, &_ts_left ); - bintime2timespec( _rhs, &_ts_right ); + _ts_left = sbttots( *_lhs ); + _ts_right = sbttots( *_rhs ); _Timespec_Divide( &_ts_left, @@ -256,7 +240,7 @@ RTEMS_INLINE_ROUTINE time_t _Timestamp_Get_seconds( const Timestamp_Control *_time ) { - return _time->sec; + return (*_time >> 32); } /** @@ -274,7 +258,7 @@ RTEMS_INLINE_ROUTINE uint32_t _Timestamp_Get_nanoseconds( { struct timespec _ts; - bintime2timespec( _time, &_ts ); + _ts = sbttots( *_time ); return (uint32_t) _ts.tv_nsec; } @@ -294,7 +278,7 @@ RTEMS_INLINE_ROUTINE uint64_t _Timestamp_Get_as_nanoseconds( { struct timespec _ts; - bintime2timespec( _time, &_ts ); + _ts = sbttots( *_time ); return _Timespec_Get_as_nanoseconds( &_ts ); } @@ -312,7 +296,7 @@ RTEMS_INLINE_ROUTINE void _Timestamp_To_timespec( struct timespec *_timespec ) { - bintime2timespec( _timestamp, _timespec ); + *_timespec = sbttots( *_timestamp ); } /** @@ -326,7 +310,7 @@ RTEMS_INLINE_ROUTINE void _Timestamp_To_timeval( struct timeval *_timeval ) { - bintime2timeval( _timestamp, _timeval ); + *_timeval = sbttotv( *_timestamp ); } #ifdef __cplusplus diff --git a/cpukit/score/include/rtems/score/todimpl.h b/cpukit/score/include/rtems/score/todimpl.h index f5dba85f8c..de4dc93430 100644 --- a/cpukit/score/include/rtems/score/todimpl.h +++ b/cpukit/score/include/rtems/score/todimpl.h @@ -201,7 +201,7 @@ static inline void _TOD_Get_uptime( Timestamp_Control *time ) { - _Timecounter_Binuptime( time ); + *time = _Timecounter_Sbinuptime(); } /** @@ -216,8 +216,7 @@ static inline void _TOD_Get_zero_based_uptime( Timestamp_Control *t
[PATCH 1/3] score: Simplify _Timestamp_Add_to()
Update #2740. --- cpukit/score/include/rtems/score/timestamp.h | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/cpukit/score/include/rtems/score/timestamp.h b/cpukit/score/include/rtems/score/timestamp.h index 8b1a73816a..ec297f93e8 100644 --- a/cpukit/score/include/rtems/score/timestamp.h +++ b/cpukit/score/include/rtems/score/timestamp.h @@ -175,19 +175,13 @@ RTEMS_INLINE_ROUTINE bool _Timestamp_Equal_to( * * @param[in] _time points to the base time to be added to * @param[in] _add points to the timestamp to add to the first argument - * - * @retval This method returns the number of seconds @a time increased by. */ -RTEMS_INLINE_ROUTINE time_t _Timestamp_Add_to( +RTEMS_INLINE_ROUTINE void _Timestamp_Add_to( Timestamp_Control *_time, const Timestamp_Control *_add ) { - time_t seconds = _time->sec; - bintime_add( _time, _add ); - - return _time->sec - seconds; } /** -- 2.12.3 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 2/3] score: Use struct timespec for TOD
Use the timestamps only for uptime based values. Use struct timespec for the absolute time values (TOD). Update #2740. --- cpukit/posix/src/clockgettime.c| 2 +- cpukit/posix/src/clocksettime.c| 7 +++- cpukit/posix/src/timersettime.c| 4 +-- cpukit/score/include/rtems/score/todimpl.h | 54 +- cpukit/score/src/coretodabsolutetimeout.c | 2 +- cpukit/score/src/coretodadjust.c | 8 ++--- cpukit/score/src/coretodset.c | 12 +++ 7 files changed, 28 insertions(+), 61 deletions(-) diff --git a/cpukit/posix/src/clockgettime.c b/cpukit/posix/src/clockgettime.c index b3adbc4713..4f6c583ff1 100644 --- a/cpukit/posix/src/clockgettime.c +++ b/cpukit/posix/src/clockgettime.c @@ -37,7 +37,7 @@ int clock_gettime( rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { -_TOD_Get_as_timespec(tp); +_TOD_Get(tp); return 0; } #ifdef CLOCK_MONOTONIC diff --git a/cpukit/posix/src/clocksettime.c b/cpukit/posix/src/clocksettime.c index 8eb616c8b5..a0fdd9109f 100644 --- a/cpukit/posix/src/clocksettime.c +++ b/cpukit/posix/src/clocksettime.c @@ -36,10 +36,15 @@ int clock_settime( rtems_set_errno_and_return_minus_one( EINVAL ); if ( clock_id == CLOCK_REALTIME ) { +ISR_lock_Context lock_context; + if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) rtems_set_errno_and_return_minus_one( EINVAL ); -_TOD_Set_with_timespec( tp ); +_TOD_Lock(); +_TOD_Acquire( &lock_context ); +_TOD_Set( tp, &lock_context ); +_TOD_Unlock(); } #ifdef _POSIX_CPUTIME else if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) diff --git a/cpukit/posix/src/timersettime.c b/cpukit/posix/src/timersettime.c index 698a47a6b7..1f98a7a08c 100644 --- a/cpukit/posix/src/timersettime.c +++ b/cpukit/posix/src/timersettime.c @@ -39,7 +39,7 @@ static void _POSIX_Timer_Insert( ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; /* Store the time when the timer was started again */ - _TOD_Get_as_timespec( &ptimer->time ); + _TOD_Get( &ptimer->time ); _Watchdog_Insert( &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ], @@ -132,7 +132,7 @@ int timer_settime( /* Convert absolute to relative time */ if (flags == TIMER_ABSTIME) { struct timespec now; -_TOD_Get_as_timespec( &now ); +_TOD_Get( &now ); /* Check for seconds in the past */ if ( _Timespec_Greater_than( &now, &normalize.it_value ) ) rtems_set_errno_and_return_minus_one( EINVAL ); diff --git a/cpukit/score/include/rtems/score/todimpl.h b/cpukit/score/include/rtems/score/todimpl.h index 03f25b5ae0..f5dba85f8c 100644 --- a/cpukit/score/include/rtems/score/todimpl.h +++ b/cpukit/score/include/rtems/score/todimpl.h @@ -164,65 +164,27 @@ static inline void _TOD_Acquire( ISR_lock_Context *lock_context ) * * The caller must be the owner of the TOD lock. * - * @param tod_as_timestamp The new time of day in timestamp format representing + * @param tod The new time of day in timespec format representing * the time since UNIX Epoch. * @param lock_context The ISR lock context used for the corresponding * _TOD_Acquire(). The caller must be the owner of the TOD lock. This * function will release the TOD lock. */ void _TOD_Set( - const Timestamp_Control *tod_as_timestamp, - ISR_lock_Context*lock_context + const struct timespec *tod, + ISR_lock_Context *lock_context ); /** - * @brief Sets the time of day with timespec format. - * - * @param tod_as_timespec The new time of day in timespec format. - * - * @see _TOD_Set(). - */ -static inline void _TOD_Set_with_timespec( - const struct timespec *tod_as_timespec -) -{ - Timestamp_Control tod_as_timestamp; - ISR_lock_Context lock_context; - - _Timestamp_Set( -&tod_as_timestamp, -tod_as_timespec->tv_sec, -tod_as_timespec->tv_nsec - ); - - _TOD_Lock(); - _TOD_Acquire( &lock_context ); - _TOD_Set( &tod_as_timestamp, &lock_context ); - _TOD_Unlock(); -} - -/** - * @brief Gets the current time in the bintime format. - * - * @param[out] time is the value gathered by the bintime request - */ -static inline void _TOD_Get( - Timestamp_Control *time -) -{ - _Timecounter_Bintime(time); -} - -/** * @brief Gets the current time in the timespec format. * - * @param[out] time is the value gathered by the nanotime request + * @param[out] time is the value gathered by the request */ -static inline void _TOD_Get_as_timespec( - struct timespec *time +static inline void _TOD_Get( + struct timespec *tod ) { - _Timecounter_Nanotime(time); + _Timecounter_Nanotime( tod ); } /** @@ -324,7 +286,7 @@ RTEMS_INLINE_ROUTINE void _TOD_Get_timeval( * @param[in] delta is the amount to adjust */ void _TOD_Adjust( - const Timestamp_Control *delta + const struct timespec *delta ); /** diff --git a/cpukit/score/src/coretodabsolutetimeout.c b/cpukit/score/src/coretodabsolutetimeou
Build Failure on All BSPs on Master
Hi Every BSP (> 100 so far) in my build sweep is failing when linking psx02 with this: /home/joel/rtems-work/rtems-testing/rtems/build-arm-tms570ls3137_hdk-rtems/arm-rtems4.12/c/tms570ls3137_hdk/testsuites/psxtests/psx02/../../../../../../../rtems/c/src/../../testsuites/psxtests/psx02/init.c:92: undefined reference to `sigpending' /home/joel/rtems-work/rtems-testing/rtems/build-arm-tms570ls3137_hdk-rtems/arm-rtems4.12/c/tms570ls3137_hdk/testsuites/psxtests/psx02/../../../../../../../rtems/c/src/../../testsuites/psxtests/psx02/init.c:101: undefined reference to `sigpending' --joel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Build Failure on All BSPs on Master
Sorry, I made a mistake to resolve a merge conflict. It should work now. - Am 6. Okt 2017 um 19:00 schrieb joel j...@rtems.org: > Hi > > Every BSP (> 100 so far) in my build sweep is failing when linking psx02 > with this: > > /home/joel/rtems-work/rtems-testing/rtems/build-arm-tms570ls3137_hdk-rtems/arm-rtems4.12/c/tms570ls3137_hdk/testsuites/psxtests/psx02/../../../../../../../rtems/c/src/../../testsuites/psxtests/psx02/init.c:92: > undefined reference to `sigpending' > /home/joel/rtems-work/rtems-testing/rtems/build-arm-tms570ls3137_hdk-rtems/arm-rtems4.12/c/tms570ls3137_hdk/testsuites/psxtests/psx02/../../../../../../../rtems/c/src/../../testsuites/psxtests/psx02/init.c:101: > undefined reference to `sigpending' > > --joel > > ___ > devel mailing list > devel@rtems.org > http://lists.rtems.org/mailman/listinfo/devel ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: Build Failure on All BSPs on Master
Thanks. I looked at it enough before I had to leave for an appointment to think a chunk of a Makefile.am was missing. On Oct 6, 2017 1:03 PM, "Sebastian Huber" < sebastian.hu...@embedded-brains.de> wrote: > Sorry, I made a mistake to resolve a merge conflict. It should work now. > > - Am 6. Okt 2017 um 19:00 schrieb joel j...@rtems.org: > > > Hi > > > > Every BSP (> 100 so far) in my build sweep is failing when linking psx02 > > with this: > > > > /home/joel/rtems-work/rtems-testing/rtems/build-arm- > tms570ls3137_hdk-rtems/arm-rtems4.12/c/tms570ls3137_hdk/ > testsuites/psxtests/psx02/../../../../../../../rtems/c/src/. > ./../testsuites/psxtests/psx02/init.c:92: > > undefined reference to `sigpending' > > /home/joel/rtems-work/rtems-testing/rtems/build-arm- > tms570ls3137_hdk-rtems/arm-rtems4.12/c/tms570ls3137_hdk/ > testsuites/psxtests/psx02/../../../../../../../rtems/c/src/. > ./../testsuites/psxtests/psx02/init.c:101: > > undefined reference to `sigpending' > > > > --joel > > > > ___ > > devel mailing list > > devel@rtems.org > > http://lists.rtems.org/mailman/listinfo/devel > ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel