[riot-notifications] [RIOT-OS/RIOT] core: refactor thread info (#15506)

benpicco notifications at github.com
Wed Nov 25 22:56:21 CET 2020


@benpicco commented on this pull request.



> +    [STATUS_RECEIVE_BLOCKED] = "bl rx",
+    [STATUS_SEND_BLOCKED] = "bl send",
+    [STATUS_REPLY_BLOCKED] = "bl reply",
+    [STATUS_FLAG_BLOCKED_ANY] = "bl anyfl",
+    [STATUS_FLAG_BLOCKED_ALL] = "bl allfl",
+    [STATUS_MBOX_BLOCKED] = "bl mbox",
+    [STATUS_COND_BLOCKED] = "bl cond",
+    [STATUS_RUNNING] = "running",
+    [STATUS_PENDING] = "pending",
+};
+
+#define STATE_NAME_UNKNOWN "unknown"
+
+const char *thread_state_to_string(thread_status_t state)
+{
+    const char *name = state_names[state] ? state_names[state] : NULL;

shouldn't that be 
```suggestion
    const char *name = state < state_names ? state_names[state] : NULL;
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15506#pullrequestreview-538868784
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201125/6813a2c7/attachment.htm>


More information about the notifications mailing list