Project

General

Profile

Actions

Feature #7987

closed

Replace ldv_thread_create and ldv_thread_join by functions from pthreads

Added by Ilja Zakharov about 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Category:
Environment models
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.

Actions #1

Updated by Ilja Zakharov over 6 years ago

  • Priority changed from High to Immediate

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

Actions #2

Updated by Ilja Zakharov over 6 years 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.

Actions #3

Updated by Pavel Andrianov over 6 years 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.

Actions #4

Updated by Evgeny Novikov over 6 years ago

  • Priority changed from Immediate to Urgent

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

Actions #5

Updated by Ilja Zakharov over 6 years ago

  • Status changed from Open to Feedback

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

Actions #6

Updated by Pavel Andrianov over 6 years 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?

Actions #7

Updated by Pavel Andrianov over 6 years ago

  • Status changed from Open to Feedback

Fixed in f8f73d3

Actions #8

Updated by Evgeny Novikov over 6 years ago

  • Status changed from Feedback to Resolved
  • Target version set to 0.2
Actions #9

Updated by Evgeny Novikov over 6 years ago

  • Status changed from Resolved to Closed

I merged the branch to master in 77cd8554.

Actions

Also available in: Atom PDF