Module: xenomai-3 Branch: next Commit: ecb1129d9b78f4deab7230e6ead678e438cd7be7 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=ecb1129d9b78f4deab7230e6ead678e438cd7be7
Author: Jan Kiszka <jan.kis...@siemens.com> Date: Fri Jul 14 20:32:40 2017 +0200 cobalt: Align structure of mutex_trylock with mutex_timedlock No need to have different patterns, and the one of mutex_timedlock is more compact. Signed-off-by: Jan Kiszka <jan.kis...@siemens.com> --- lib/cobalt/mutex.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/cobalt/mutex.c b/lib/cobalt/mutex.c index f066ea3..ed32bba 100644 --- a/lib/cobalt/mutex.c +++ b/lib/cobalt/mutex.c @@ -531,10 +531,8 @@ fast_path: } else { slow_path: ret = xnsynch_fast_owner_check(mutex_get_ownerp(_mutex), cur); - if (ret < 0) - goto do_syscall; - - ret = -EBUSY; + if (ret == 0) + ret = -EBUSY; } if (ret == -EBUSY) { @@ -552,7 +550,6 @@ slow_path: return EBUSY; } -do_syscall: do { ret = XENOMAI_SYSCALL1(sc_cobalt_mutex_trylock, _mutex); } while (ret == -EINTR); _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git