Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adapt to moved kernel_pid_t location #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kaspar030
Copy link

RIOT will soon drop the used kernel_types.h header.
This PR updates ndn-riot to use the new location of the used kernel_pid_t.

@kaspar030 kaspar030 force-pushed the update_thread_pid_t_location branch from fd5b7e7 to fdf202c Compare November 25, 2020 14:00
@kaspar030
Copy link
Author

RIOT-OS/RIOT#15482 showed I'd missed some.

@wentaoshang
Copy link
Contributor

Can we include sched.h with <> since it is "system" header?

@@ -22,7 +22,6 @@

#include "encoding/shared-block.h"

#include <kernel_types.h>
//#include <xtimer.h>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can probably be removed too

@kaspar030
Copy link
Author

Can we include sched.h with <> since it is "system" header?

"system" header would be headers that are in the compiler's default include paths, which RIOT's headers aren't.

@kfessel
Copy link

kfessel commented Nov 26, 2020

Are you sure about the whole system header thing of <> since acording to http://commandlinefanatic.com/cgi-bin/showarticle.cgi?article=art026 its about local and then preconfigured (case " ") path or just preconfigured path (case <>). if you do not preconfigure to include the riot directories it will not be found in either case, if you preconfigure the RIOT include dirs it will be found in both cases but never in the local directory. The https://gcc.gnu.org/onlinedocs/cpp/Search-Path.html is not very helpful since it uses the case of not additional preconfigured directory gcc min.c aside from the system derectories

@wentaoshang
Copy link
Contributor

Obviously both "" and <> will work fine in this case. In my mind RIOT is always an operating system so I would include the RIOT-provided headers just like how I include <linux/...> or <sys/...> in my applications. It is probably more about coding style in this case.

@kfessel
Copy link

kfessel commented Nov 26, 2020

K&R could have saved us from this discusion if they just had not defined the fallback case for " "

it would have been you know the path -> " "
compiler has to search -> < >

@wentaoshang
Copy link
Contributor

K&R could have saved us from this discusion if they just had not defined the fallback case for " "

it would have been you know the path -> " "
compiler has to search -> < >

Yeah I was under the impression that we use "" for things we write ourselves and <> for things we don't know/care where it is. Maybe I got that from some code style guidelines I used before. Can't remember exactly where...

@kfessel
Copy link

kfessel commented Nov 26, 2020

Zephyr project does it that way
https://github.com/zephyrproject-rtos/zephyr/blob/master/samples/hello_world/src/main.c

at least in that one example did not check other

Arduino has the same guideline:
https://www.arduino.cc/reference/en/language/structure/further-syntax/include/

@kaspar030
Copy link
Author

So - should I change?

@kaspar030
Copy link
Author

So - should I change?

Thinking about it, I'm sorry, I just applied RIOT's convention in this change, not considering at all how ndn-riot is including files. Doing that, I didn't follow ndn-riot's previous style, causing inconsistency and discussion...

I pushed a fixup commit changing to <>.

Copy link
Contributor

@wentaoshang wentaoshang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants