Conversation
I actually find the auto-formatted version more readable, but again, a matter of taste. |
Yup. I'm OK with the auto-formatted version, too. |
|
I realized I'd forgotten the includes... They're uncrustified now, too. |
miri64
left a comment
There was a problem hiding this comment.
Arghs .... sometimes I forget that I actually have to submit my review... here an older comment of mine (from before I added #10867 (comment))
core/atomic_c11.c
Outdated
| */ | ||
| bool __atomic_compare_exchange_c(size_t len, void *ptr, void *expected, | ||
| void *desired, bool weak, int success_memorder, int failure_memorder) | ||
| void *desired, bool weak, int success_memorder, int failure_memorder) |
There was a problem hiding this comment.
This was delivered by uncrustify this way? int failure_memorder could (and should) be on the next line.
There was a problem hiding this comment.
It seems like our uncrustify config doesn't do line wrapping at all. I've pushed a change to make it do it.
It feels quite intrusive... ;)
There was a problem hiding this comment.
It feels quite intrusive... ;)
If it formats it this way it's plain wrong though.
There was a problem hiding this comment.
If it formats it this way it's plain wrong though.
Hmyeah. I tried limiting uncrustify's line wrap to 100 cols. It prevents this mishap.
There was a problem hiding this comment.
An alternative is setting ls_func_split_full, which results in this (if a line is longer than the configured limit):
-bool __atomic_compare_exchange_c(size_t len, void *ptr, void *expected,
- void *desired, bool weak, int success_memorder, int failure_memorder)
+bool __atomic_compare_exchange_c(size_t len,
+ void *ptr,
+ void *expected,
+ void *desired,
+ bool weak,
+ int success_memorder,
+ int failure_memorder)
There was a problem hiding this comment.
Don't like that style (and only use it if everything else doesn't make sense stylistically)
There was a problem hiding this comment.
I've split out the 100char config change into another PR: #10873
76daba2 to
1579d02
Compare
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
1579d02 to
05c6fd5
Compare
@miri64 should we go forward with this? |
|
I do think so. I put it on my TODO list ;-). |
|
ping this is purely cosmetic. :) |
miri64
left a comment
There was a problem hiding this comment.
ping this is purely cosmetic. :)
True, still found some nits though :-)
| "sched_run: active thread: %" PRIkernel_pid ", next thread: %" PRIkernel_pid "\n", | ||
| (kernel_pid_t)((active_thread == | ||
| NULL) ? KERNEL_PID_UNDEF : active_thread->pid), | ||
| next_thread->pid); |
There was a problem hiding this comment.
Also (but unrelated to this PR): Is the cast really necessary?
|
@kaspar030 ping? |
05c6fd5 to
1ba8940
Compare
Thanks for the heads up. I've addressed most issues and re-ran uncrustify. |
If it is properly ended, go ahead :-). |
Mhh.. after looking at the current proposal, I'm not sure what you mean. Can you point me to that? |
1ba8940 to
b826707
Compare
|
@miri64 I've rebased this, it is otherwise unchanged. Let's find a shorter you-look-I-react cycle. |
core/include/sched.h
Outdated
| `st >= STATUS_ON_RUNQUEUE` | ||
| */ |
There was a problem hiding this comment.
This looks weird. Any idea why uncrustify is doing this?
There was a problem hiding this comment.
I think actually I did this, must be a merge leftover. Will fix.
There was a problem hiding this comment.
done. Now uncrustify just realignes the second line a bit.
b826707 to
8efe596
Compare
|
|
ACK! Let's finally merge this! |
|
Thanks @miri64! |
Contribution description
This PR applies the current uncrustify-riot.cfg to core.
atomic_*.care excluded due to too many misformattings in the macros.Most of the changes are alright. My main pain point are string concatenations for inttype format macros, e.g.,
DEBUG("foo %"PRIu32"\n");changes into
DEBUG("foo %" PRIu32 "\n");(note the extra spaces between
"andPRIu32.But I can live with that.
Testing procedure
Check diff.
Issues/PRs references
uncrustify: add auto uncrustify with blacklist #8519.
needs uncrustify: split lines at 80 chars #10873