====== OSA : OS_Queue_Create ====== **OS_Queue_Create (queue, buffer, size)**\\ === === {{osa:ref:attr_call_not_int.png|Not allowed in interrupt}} Create queue of pointer to messages. After creation queue is empty. ##[[en:osa:ref:appendix:configuration#System constants|OS_ENABLE_QUEUE]]## constant must be defined in ##[[en:osa:ref:appendix:configuration|OSAcfg.h]]##. For PIC16, message queues can be allocated only in **bank0** or **bank1** === Call allowed: === Not in interrupt === Parameters: === {| class = "fpl" |- |//''queue''// |Queue of messages descriptor. Variable of ##[[en:osa:ref:description:data_types#OST_QUEUE|OST_QUEUE]]## type. |- |//''buffer''// |Buffer to store messages. For PIC16, buffer can be allocated only in **bank0** or **bank1** |- |//''size''// |Queue size. Can't be greater than //buffer// size. |} === Returns: === nothing === Example: === OST_QUEUE queue; OST_MSG buffer[10]; void Task (void) { OS_Queue_Create (queue, buffer, 10); for (;;) { /*...*/ } } === Old style name === **OS_CreateQMsg**\\ === See also === * [[en:osa:ref:allservices:OS_Queue_Send|OS_Queue_Send]] * [[en:osa:ref:allservices:OS_Queue_Send_TO|OS_Queue_Send_TO]] * [[en:osa:ref:allservices:OS_Queue_Send_Now|OS_Queue_Send_Now]] * [[en:osa:ref:allservices:OS_Queue_Check|OS_Queue_Check]] * [[en:osa:ref:allservices:OS_Queue_IsFull|OS_Queue_IsFull]] * [[en:osa:ref:allservices:OS_Queue_Wait|OS_Queue_Wait]] * [[en:osa:ref:allservices:OS_Queue_Wait_TO|OS_Queue_Wait_TO]] ---- * [[en:osa:ref:services:alphabetical|Alphabetical]] * [[en:osa:ref:services:brieflist|All services]] ~~UP~~