Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tapasco
tapasco
Commits
35f0b38e
Commit
35f0b38e
authored
May 19, 2017
by
Jens Korinth
Browse files
Fix function reservation bug in libtapasco
parent
55c48b53
Changes
1
Hide whitespace changes
Inline
Side-by-side
arch/common/src/tapasco_functions.c
View file @
35f0b38e
...
...
@@ -131,13 +131,13 @@ tapasco_func_slot_id_t tapasco_functions_acquire(tapasco_functions_t *ctx,
tapasco_func_id_t
const
f_id
)
{
tapasco_func_t
**
funcs
=
ctx
->
func
;
int
len
=
TAPASCO_MAX_INSTANCES
;
while
(
len
&&
!
reserve_func
(
*
funcs
,
f_id
)
&&
(
*
funcs
)
->
id
)
{
while
(
len
&&
*
funcs
&&
!
reserve_func
(
*
funcs
,
f_id
)
&&
(
*
funcs
)
->
id
)
{
--
len
;
++
funcs
;
}
LOG
(
LALL_FUNCTIONS
,
"func_id = %d, slotid = %d"
,
f_id
,
len
>
0
?
(
*
funcs
)
->
slot_id
:
-
1
);
return
len
>
0
?
(
*
funcs
)
->
slot_id
:
-
1
;
f_id
,
len
>
0
&&
funcs
&&
*
funcs
?
(
*
funcs
)
->
slot_id
:
-
1
);
return
len
>
0
&&
*
funcs
?
(
*
funcs
)
->
slot_id
:
-
1
;
}
inline
...
...
Jens Korinth
@jk
mentioned in commit
a831b501
·
Jul 14, 2017
mentioned in commit
a831b501
mentioned in commit a831b5015df6bd8f8d23ddd334a3b1159392de92
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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