Feature #7987
closed
Replace ldv_thread_create and ldv_thread_join by functions from pthreads
Added by Ilja Zakharov almost 8 years ago.
Updated about 7 years ago.
Category:
Environment models
Description
As there is no necessity to declare specific functions for thread creation and joining, we have decided to keep only functions for creating N threads and get rid of functions for creating one thread. For thread creation and joining pthread functions should be used. For this purpose one has to modify environment model generator and files in presets.
- Priority changed from High to Immediate
Occasionally nobody has raised the priority of this truly critical feature.
- Tracker changed from Bug to Feature
- Status changed from New to Feedback
Implemented in emg-pthread-interface branch.
Pavel, as I have no proper verifier, check, please, that the feature is implemented correctly since I have performed only compile tests.
- Status changed from Feedback to Open
A couple of remarks. An argument of pthread_create (a thread function) has void* (*) (void *) signature, so it should return a value.
Why pthread_t and pthread_attr_t are typedefed to int? I found in preprocessed sources, that the first one is typedefed to unsigned long and the second one - to a union. Some verifiers (particularly SMACK) are confused, as they have their own header file.
- Priority changed from Immediate to Urgent
Feature request can't be immediate. Just regression or critical bugs can.
- Status changed from Open to Feedback
Fixed the mentioned and a couple of other minor mistakes in the same branch.
- Status changed from Feedback to Open
One more request. Signature of pthread_join is int pthread_join(pthread_t , void ** ). And EMG inserts the first argument as address of pthread_t variable, i.e. pthread_t *. Could you remove '&' from the first argument statement?
- Status changed from Open to Feedback
- Status changed from Feedback to Resolved
- Target version set to 0.2
- Status changed from Resolved to Closed
I merged the branch to master in 77cd8554.
Also available in: Atom
PDF