Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
PolyORB-HI-C
Commits
af2f3bd7
Commit
af2f3bd7
authored
Jun 25, 2018
by
yoogx
Browse files
* Addess POSIX incompatitbilities between Linux and macOS
parent
a5ee5860
Changes
1
Hide whitespace changes
Inline
Side-by-side
examples/aadlv2/torture_gqueue/torture.c
View file @
af2f3bd7
...
...
@@ -62,9 +62,15 @@ sem_t *semaphore;
void
period
(
__po_hi_task_id
self
)
{
int
i
,
j
;
if
(
init
){
semaphore
=
sem_open
(
"aadl"
,
O_CREAT
|
O_EXCL
,
0644
,
0
);
if
(
init
==
true
){
semaphore
=
sem_open
(
"/aadl"
,
O_CREAT
|
O_EXCL
,
S_IRUSR
|
S_IWUSR
,
1
);
if
(
semaphore
==
NULL
)
{
sem_unlink
(
"/aadl"
);
semaphore
=
sem_open
(
"/aadl"
,
O_CREAT
|
O_EXCL
,
S_IRUSR
|
S_IWUSR
,
1
);
}
init
=
false
;
}
/* *** Boolean and semaphore launching the following test with
...
...
@@ -190,6 +196,8 @@ void sporad(__po_hi_task_id self) {
}
/* Test to observe the awaited behavior of a sporadic task */
if
(
number
>
2
){
sem_unlink
(
"/aadl"
);
sem_close
(
semaphore
);
exit
(
0
);
}
/* Boolean and semaphore launching the next type of test */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment