Re: [PATCH v2 4/5] score: Turn thread lock into thread wait lock

2016-07-26 Thread Chris Johns
On 27/07/2016 15:36, Sebastian Huber wrote: + +/** + * @brief Tranquilizes a thread wait on a thread queue procedure. Again I am not sure what "tranquilizes" means. My dictionary states: "To render tranquil; to allay when agitated; to compose; to make calm and peaceful; as, to tranquilize a

Re: [PATCH v2 5/5] score: Add deadlock detection

2016-07-26 Thread Chris Johns
On 27/07/2016 15:45, Sebastian Huber wrote: On 27/07/16 06:51, Chris Johns wrote: +#if defined(RTEMS_SMP) +/* + * A global registry of active thread queue links is used to provide deadlock + * detection on SMP configurations. This is simple to implement and no + * additional storage is requi

Re: [PATCH v2 5/5] score: Add deadlock detection

2016-07-26 Thread Sebastian Huber
On 27/07/16 06:51, Chris Johns wrote: +#if defined(RTEMS_SMP) +/* + * A global registry of active thread queue links is used to provide deadlock + * detection on SMP configurations. This is simple to implement and no + * additional storage is required for the thread queues. The disadvanta

Re: [PATCH v2 4/5] score: Turn thread lock into thread wait lock

2016-07-26 Thread Sebastian Huber
On 27/07/16 06:43, Chris Johns wrote: My comments are mixed into the patch. On 26/07/2016 19:20, Sebastian Huber wrote: [...] +#if defined(RTEMS_SMP) + /** + * @brief Thread wait lock control block. + * + * Parts of the thread wait information is protected by the thread wait * Part

Re: [PATCH v2 5/5] score: Add deadlock detection

2016-07-26 Thread Chris Johns
On 26/07/2016 19:20, Sebastian Huber wrote: The mutex objects use the owner field of the thread queues for the mutex owner. Use this and add a deadlock detection to _Thread_queue_Enqueue_critical() for thread queues with an owner. Update #2412. Update #2556. Close #2765. --- cpukit/sapi/src/i

Re: [PATCH v2 4/5] score: Turn thread lock into thread wait lock

2016-07-26 Thread Chris Johns
My comments are mixed into the patch. On 26/07/2016 19:20, Sebastian Huber wrote: The _Thread_Lock_acquire() function had a potentially infinite run-time due to the lack of fairness at atomic operations level. Update #2412. Update #2556. Update #2765. --- cpukit/libmisc/monitor/mon-task.c

Re: Dynamic linking in RTEMS

2016-07-26 Thread Chris Johns
Pavel, thanks for the excellent detail provided. I will try and expand on a couple of parts being discussed. On 27/07/2016 10:00, Pavel Pisa wrote: On Wednesday 27 of July 2016 01:01:29 Saeed Ehteshamifar wrote: 1. How to generate *tar* array? Since on top of dl-tar.c it's been noted that it's

Re: Dynamic linking in RTEMS

2016-07-26 Thread Pavel Pisa
Hello Saeed, On Wednesday 27 of July 2016 01:01:29 Saeed Ehteshamifar wrote: > Hello, > > Thanks Pavel for your answer. I tried to write an app myself that uses > dynamic loading and I ended up with the following questions: > > 1. How to generate *tar* array? Since on top of dl-tar.c it's been not

Re: Dynamic linking in RTEMS

2016-07-26 Thread Saeed Ehteshamifar
Hello, Thanks Pavel for your answer. I tried to write an app myself that uses dynamic loading and I ended up with the following questions: 1. How to generate *tar* array? Since on top of dl-tar.c it's been noted that it's automatically generated. If I'm not wrong, by making a tar image, RTEMS put

[PATCH v2 4/5] score: Turn thread lock into thread wait lock

2016-07-26 Thread Sebastian Huber
The _Thread_Lock_acquire() function had a potentially infinite run-time due to the lack of fairness at atomic operations level. Update #2412. Update #2556. Update #2765. --- cpukit/libmisc/monitor/mon-task.c| 7 +- cpukit/posix/src/pthreadgetschedparam.c | 8 +- cpuki

[PATCH v2 3/5] score: Priority inherit thread queue operations

2016-07-26 Thread Sebastian Huber
Move the priority change due to priority interitance to the thread queue enqueue operation to simplify the locking on SMP configurations. Update #2412. Update #2556. Update #2765. --- cpukit/score/include/rtems/score/coremuteximpl.h | 3 + cpukit/score/include/rtems/score/threadimpl.h| 31 --

[PATCH v2 5/5] score: Add deadlock detection

2016-07-26 Thread Sebastian Huber
The mutex objects use the owner field of the thread queues for the mutex owner. Use this and add a deadlock detection to _Thread_queue_Enqueue_critical() for thread queues with an owner. Update #2412. Update #2556. Close #2765. --- cpukit/sapi/src/interrtext.c | 5 +- cpu

Add deadlock detection for thread queues

2016-07-26 Thread Sebastian Huber
https://lists.rtems.org/pipermail/devel/2016-July/015554.html The SMP implementation turned out to be a bit more complicated. In addition the test smptests/smpmutex02 revealed that the deadlock detection is essential to avoid application caused deadlocks at SMP lock level. ___

[PATCH v2 1/5] score: Split _Thread_Change_priority()

2016-07-26 Thread Sebastian Huber
Update #2412. Update #2556. Update #2765. --- cpukit/score/include/rtems/score/threadimpl.h | 10 + cpukit/score/src/threadchangepriority.c | 61 +++ 2 files changed, 62 insertions(+), 9 deletions(-) diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/c

[PATCH v2 2/5] score: Simplify _Thread_queue_Boost_priority()

2016-07-26 Thread Sebastian Huber
Raise the priority under thread queue lock protection and omit the superfluous thread queue priority change, since the thread is extracted anyway. The unblock operation will pick up the new priority. Update #2412. Update #2556. Update #2765. --- cpukit/score/src/coremutexsurrender.c | 14 +++