v01d opened a new issue #3352:
URL: https://github.com/apache/incubator-nuttx/issues/3352


   ```
     Description: In implementation of standard pthread functions, the non-
                  standard, NuttX function sched_lock() is used.  This is very
                  strong since it disables pre-emption for all threads in all
                  task groups.  I believe it is only really necessary in most
                  cases to lock threads in the task group with a new non-
                  standard interface, say pthread_lock().
   
                  This is because the OS resources used by a thread such as
                  mutexes, condition variable, barriers, etc. are only
                  meaningful from within the task group.  So, in order to
                  performance exclusive operations on these resources, it is
                  only necessary to block other threads executing within the
                  task group.
   
                  This is an easy change:  pthread_lock() and pthread_unlock()
                  would simply operate on a semaphore retained in the task
                  group structure.  I am, however, hesitant to make this change:
                  In the FLAT build model, there is nothing that prevents people
                  from accessing the inter-thread controls from threads in
                  different task groups.  Making this change, while correct,
                  might introduce subtle bugs in code by people who are not
                  using NuttX correctly.
     Status:      Open
     Priority:    Low.  This change would improve real-time performance of the
                  OS but is not otherwise required.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to