Project

General

Profile

Feature #7987

Replace ldv_thread_create and ldv_thread_join by functions from pthreads

Added by Ilja Zakharov 10 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Urgent
Assignee:
Category:
Environment model
Target version:
Start date:
02/20/2017
Due date:
% Done:

0%

Estimated time:
Published in build:

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.

History

#1 Updated by Ilja Zakharov 4 months ago

  • Priority changed from High to Immediate

Occasionally nobody has raised the priority of this truly critical feature.

#2 Updated by Ilja Zakharov 4 months ago

  • 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.

#3 Updated by Pavel Andrianov 4 months ago

  • 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.

#4 Updated by Evgeny Novikov 4 months ago

  • Priority changed from Immediate to Urgent

Feature request can't be immediate. Just regression or critical bugs can.

#5 Updated by Ilja Zakharov 4 months ago

  • Status changed from Open to Feedback

Fixed the mentioned and a couple of other minor mistakes in the same branch.

#6 Updated by Pavel Andrianov 4 months ago

  • 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?

#7 Updated by Pavel Andrianov 4 months ago

  • Status changed from Open to Feedback

Fixed in f8f73d3

#8 Updated by Evgeny Novikov 4 months ago

  • Status changed from Feedback to Resolved
  • Target version set to 0.2

#9 Updated by Evgeny Novikov 3 months ago

  • Status changed from Resolved to Closed

I merged the branch to master in commit:77cd8554.

Also available in: Atom PDF