Skip to content

Commit 21b85d4

Browse files
bradjcppannuto
authored andcommitted
process_info: add get process count api
1 parent 69bfaf0 commit 21b85d4

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

libtock/kernel/process_info.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ bool libtock_process_info_exists(void) {
66
return libtock_process_info_driver_exists();
77
}
88

9+
returncode_t libtock_process_info_get_process_count(uint32_t* count) {
10+
return libtock_process_info_command_get_process_count(count);
11+
}
12+
913
returncode_t libtock_process_info_get_process_ids(uint8_t* buffer, size_t buffer_length, uint32_t* count) {
1014
returncode_t ret;
1115

libtock/kernel/process_info.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ extern "C" {
99
// Check if the driver exists.
1010
bool libtock_process_info_exists(void);
1111

12+
// Get the number of running processes on the board.
13+
returncode_t libtock_process_info_get_process_count(uint32_t* count);
14+
1215
// Get an array of `uint32_t` process IDs.
1316
//
1417
// `count` is set to the number of process IDs.

0 commit comments

Comments
 (0)