Re: ipc/sem: Three function calls less in do_semtimedop()

Markus Elfring
2019-07-07T07:10:07Z

>> + list_add_tail(&queue.list,
>> + alter
>> + ? (sma->complex_count
>> + ? &sma->pending_alter
>> + : &curr->pending_alter)
>> + : &curr->pending_const);
>
> Just no. This is making the code harder to comprehend

This can be according to your current view.

> with no advantage.

I propose to take additional aspects into account for the interpretation
of such source code.
The shown design direction can provide benefits which might get
a lower value for the software development attention so far.

>> + list_add_tail(&queue.list,
>> + alter ? &sma->pending_alter : &sma->pending_const);

Can this code variant look more succinct?

Regards,
Markus