Skip to content

Commit c85bfeb

Browse files
committed
pbio/main: Drop pbio_do_one_event.
This is going to be dropped eventually and it is just calling process_run, so call it directly until processes are migrated.
1 parent de7429e commit c85bfeb

File tree

4 files changed

+4
-20
lines changed

4 files changed

+4
-20
lines changed

lib/pbio/include/pbio/main.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010

1111
void pbio_init(bool start_processes);
1212
void pbio_stop_all(bool reset);
13-
int pbio_do_one_event(void);
1413

1514
#endif // _PBIO_MAIN_H_

lib/pbio/src/main.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,4 @@ void pbio_stop_all(bool reset) {
7272
pbdrv_sound_stop();
7373
}
7474

75-
/**
76-
* Checks for and performs pending background tasks.
77-
*
78-
* This function is meant to be called as frequently as possible. To conserve
79-
* power, you can wait for an interrupt after all events have been processed
80-
* (i.e. return value is 0).
81-
*
82-
* Important!!! This function must not be called recursively.
83-
*
84-
* @return The number of still-pending events.
85-
*/
86-
int pbio_do_one_event(void) {
87-
return process_run();
88-
}
89-
9075
/** @} */

lib/pbio/src/os.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ void pbio_os_process_make_request(pbio_os_process_t *process, pbio_os_process_re
130130
*/
131131
bool pbio_os_run_processes_once(void) {
132132

133-
// DELETEME: Legacy hook to drive pbio event loop until all processes migrated.
134-
extern int pbio_do_one_event(void);
135-
bool pbio_event_pending = pbio_do_one_event();
133+
// DELETEME: Legacy hook to drive Contiki processes until all are migrated.
134+
extern int process_run(void);
135+
bool pbio_event_pending = process_run();
136136

137137
if (!poll_request_is_pending) {
138138

lib/pbio/test/test-pbio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void pbio_test_counter_set_abs_angle(int32_t millidegrees);
7272
}
7373

7474
static inline void pbio_handle_pending_events(void) {
75-
while (pbio_do_one_event()) {
75+
while (process_run()) {
7676
}
7777
}
7878

0 commit comments

Comments
 (0)