Commit be3c6155 authored by Christian Dietrich's avatar Christian Dietrich

sse: do not wipe set events on SetEvent

It is unwise to overwrite the set-event bitmask on a SetEvent system
call. ecc1_event1f will ensure the correct behavior in the future.

Change-Id: I98bf21664d381e6093c194ad0442ee168fc92764
parent f35cc908
......@@ -43,3 +43,11 @@ DOSEK_BINARY(
e.cc
)
DOSEK_BINARY(
NAME ecc1_event1f
SYSTEM_DESC system.oil
LIBS libtest
TEST_ISO
f.cc
)
/* This test case ensures that set events are not invalidated, when
* SetEvent is called */
#include "os.h"
#include "test/test.h"
#include "machine.h"
DeclareTask(H1);
DeclareTask(H2);
DeclareTask(H3);
DeclareEvent(E1);
DeclareEvent(E2);
TEST_MAKE_OS_MAIN( StartOS(0) );
TASK(H1) {
test_trace('1');
ActivateTask(H3);
test_trace('[');
SetEvent(H3, E2);
SetEvent(H3, E1);
test_trace(']');
TerminateTask();
}
TASK(H2) {
test_trace('!');
TerminateTask();
}
TASK(H3) {
test_trace('<');
WaitEvent(E1);
test_trace('-');
WaitEvent(E2);
test_trace('>');
TerminateTask();
}
void PreIdleHook() {
/* The testcase has finished, check the output */
test_trace_assert("1<[->]");
test_finish();
ShutdownMachine();
}
......@@ -195,7 +195,9 @@ class PreciseSystemState():
def set_events(self, subtask, event_list):
mask = Event.combine_event_masks(event_list)
self.__events(subtask, set_events = mask)
events, bl = self.__events(subtask)
events |= mask
self.__events(subtask, set_events = events)
def clear_events(self, subtask, event_list):
mask = Event.combine_event_masks(event_list)
......@@ -362,7 +364,7 @@ class PreciseSystemState():
assert CLEARED
ret.append("%s:0" % event.conf.name)
if WAITING:
ret.append("W")
ret[-1] += ":W"
return " ".join(ret)
......
......@@ -133,6 +133,7 @@ class SystemCallSemantic:
after.set_continuation(calling_task, next_cont)
ret.append((syscall, after))
assert len(ret) == 1, "Can be removed in future versions (SSF-Event)"
return ret
def do_SetEvent(self, cont, before, syscall):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment