Remove list_fibers API

- Remove redundant API
  - superceded by get_fiber_list()
Joe Finney 3 years ago
parent c42776ced5
commit 219feb8511

@ -67,44 +67,6 @@ static EventModel *messageBus = NULL;
// Array of components which are iterated during idle thread execution.
static MicroBitComponent* idleThreadComponents[MICROBIT_IDLE_COMPONENTS];
static void get_fibers_from(Fiber ***dest, int *sum, Fiber *queue)
if (queue && queue->prev)
while (queue) {
if (*dest)
*(*dest)++ = queue;
queue = queue->next;
* Return all current fibers.
* @param dest If non-null, it points to an array of pointers to fibers to store results in.
* @return the number of fibers (potentially) stored
int list_fibers(Fiber **dest)
int sum = 0;
// interrupts might move fibers between queues, but should not create new ones
get_fibers_from(&dest, &sum, runQueue);
get_fibers_from(&dest, &sum, sleepQueue);
get_fibers_from(&dest, &sum, waitQueue);
// idleFiber is used to start event handlers using invoke(),
// so it may in fact have the user_data set if in FOB context
if (dest)
*dest++ = idleFiber;
return sum;
* Utility function to add the currenty running fiber to the given queue.