Project

General

Profile

Actions

Feature #11826

closed

Do not generate return values implicitly in case of missed callbacks

Added by Evgeny Novikov over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
High
Category:
Environment models
Target version:
Start date:
08/15/2022
Due date:
% Done:

0%

Estimated time:
Published in build:

Description

At the moment EMG implicitly generates nondeterministic return values of missed callbacks to be invoked using function pointers. It seems to be redundant in general since as a rule these return values are nondeterministic themselves. Worse is that this approach prevents providing return values explicitly, e.g. by allocating and initializing an appropriate memory and using a pointer to it as a return value (e.g. #11825).


Related issues 1 (0 open1 closed)

Blocks Klever - Feature #11825: Allocate memory for tty_struct for tty_operations callbacksClosedEvgeny Novikov08/15/2022

Actions
Actions #1

Updated by Evgeny Novikov over 2 years ago

  • Blocks Feature #11825: Allocate memory for tty_struct for tty_operations callbacks added
Actions #2

Updated by Evgeny Novikov over 2 years ago

  • Status changed from New to Resolved

I implemented this in branch avoid-implicit-init that should be tested.

The "implementation" just reverts cea54a3 and 4fbc223.

Actions #3

Updated by Evgeny Novikov over 2 years ago

Extended testing revealed several transitions from timeouts to safes and a slight code coverage drop due to this change. It turns out that the EMG specification for platform drivers is too restrictive unlike other specifications. It sets the default return value of the probe callback to 1 meaning an error while some platform drivers do not implement the probe callback. Thus, the specification considers only failure scenarios after removing implicit generation of return values in this case. I change the default return value to ldv_undef_int() like in other specifications in d73a2c5a2. Let's see on new testing results.

Actions #4

Updated by Evgeny Novikov over 2 years ago

  • Status changed from Resolved to Closed

Tests passed. BTW, there are some improvements. Instead of a few timeouts there are safes without decreasing code coverage, but with less considered states. I merged the branch to master in d73a2c5a2.

Actions

Also available in: Atom PDF