Lines Matching refs:msg_ring
682 struct sec_queue_ring_cmd *msg_ring = &queue->ring_cmd; in sec_isr_handle() local
694 msg = msg_ring->vaddr + q_id; in sec_isr_handle()
705 msg = msg_ring->vaddr + queue->expected; in sec_isr_handle()
707 msg_ring->callback(msg, in sec_isr_handle()
712 atomic_dec(&msg_ring->used); in sec_isr_handle()
720 msg = msg_ring->vaddr + q_id; in sec_isr_handle()
845 struct sec_queue_ring_cmd *msg_ring = &queue->ring_cmd; in sec_queue_empty() local
847 return !atomic_read(&msg_ring->used); in sec_queue_empty()
860 struct sec_queue_ring_cmd *msg_ring = &queue->ring_cmd; in sec_queue_send() local
864 mutex_lock(&msg_ring->lock); in sec_queue_send()
867 if (write == read && atomic_read(&msg_ring->used) == SEC_QUEUE_LEN) { in sec_queue_send()
868 mutex_unlock(&msg_ring->lock); in sec_queue_send()
871 memcpy(msg_ring->vaddr + write, msg, sizeof(*msg)); in sec_queue_send()
879 atomic_inc(&msg_ring->used); in sec_queue_send()
880 mutex_unlock(&msg_ring->lock); in sec_queue_send()
887 struct sec_queue_ring_cmd *msg_ring = &queue->ring_cmd; in sec_queue_can_enqueue() local
889 return SEC_QUEUE_LEN - atomic_read(&msg_ring->used) >= num; in sec_queue_can_enqueue()