[riot-notifications] [RIOT-OS/RIOT] core/thread: add getters for thread_t (#16818)

benpicco notifications at github.com
Tue Sep 14 22:39:49 CEST 2021

@benpicco commented on this pull request.

> +static inline kernel_pid_t thread_get_pid(const thread_t *thread)
+    return thread->pid;

How about

static inline kernel_pid_t thread_get_pid(const thread_t *thread)
    extern volatile kernel_pid_t sched_active_pid;

    if (thread) {
        return thread->pid;
    } else {
        return sched_active_pid;

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210914/d7a55c1d/attachment.htm>

More information about the notifications mailing list