MCPcopy Create free account
hub / github.com/Klipper3d/klipper / serialqueue_alloc_commandqueue

Function serialqueue_alloc_commandqueue

klippy/chelper/serialqueue.c:733–741  ·  view source on GitHub ↗

Allocate a 'struct command_queue'

Source from the content-addressed store, hash-verified

731
732// Allocate a 'struct command_queue'
733struct command_queue * __visible
734serialqueue_alloc_commandqueue(void)
735{
736 struct command_queue *cq = malloc(sizeof(*cq));
737 memset(cq, 0, sizeof(*cq));
738 list_init(&cq->ready_queue);
739 list_init(&cq->upcoming_queue);
740 return cq;
741}
742
743// Free a 'struct command_queue'
744void __visible

Callers 1

steppersync_allocFunction · 0.85

Calls 2

memsetFunction · 0.85
list_initFunction · 0.85

Tested by

no test coverage detected