|
@@ -105,44 +105,34 @@ typedef enum {
|
|
|
|
|
|
} CDS_MQ_ID;
|
|
|
|
|
|
-/**---------------------------------------------------------------------------
|
|
|
-
|
|
|
- \brief cds_mq_post_message() - post a message to a message queue
|
|
|
-
|
|
|
- This API allows messages to be posted to a specific message queue. Messages
|
|
|
- can be posted to the following message queues:
|
|
|
-
|
|
|
- <ul>
|
|
|
- <li> SME
|
|
|
- <li> PE
|
|
|
- <li> HAL
|
|
|
- <li> TL
|
|
|
- </ul>
|
|
|
-
|
|
|
- \param msgQueueId - identifies the message queue upon which the message
|
|
|
- will be posted.
|
|
|
-
|
|
|
- \param message - a pointer to a message buffer. Memory for this message
|
|
|
- buffer is allocated by the caller and free'd by the QDF after the
|
|
|
- message is posted to the message queue. If the consumer of the
|
|
|
- message needs anything in this message, it needs to copy the contents
|
|
|
- before returning from the message queue handler.
|
|
|
-
|
|
|
- \return QDF_STATUS_SUCCESS - the message has been successfully posted
|
|
|
- to the message queue.
|
|
|
-
|
|
|
- QDF_STATUS_E_INVAL - The value specified by msgQueueId does not
|
|
|
- refer to a valid Message Queue Id.
|
|
|
-
|
|
|
- QDF_STATUS_E_FAULT - message is an invalid pointer.
|
|
|
-
|
|
|
- QDF_STATUS_E_FAILURE - the message queue handler has reported
|
|
|
- an unknown failure.
|
|
|
-
|
|
|
- \sa
|
|
|
-
|
|
|
- --------------------------------------------------------------------------*/
|
|
|
-QDF_STATUS cds_mq_post_message(CDS_MQ_ID msgQueueId, cds_msg_t *message);
|
|
|
+#define HIGH_PRIORITY 1
|
|
|
+#define LOW_PRIORITY 0
|
|
|
+QDF_STATUS cds_mq_post_message_by_priority(CDS_MQ_ID msg_queue_id,
|
|
|
+ cds_msg_t *message,
|
|
|
+ int is_high_priority);
|
|
|
+
|
|
|
+/**
|
|
|
+ * cds_mq_post_message() - posts a message to a message queue
|
|
|
+ * @msg_queue_id: Identifies the message queue upon which the message
|
|
|
+ * will be posted.
|
|
|
+ * @message: A pointer to a message buffer. Memory for this message
|
|
|
+ * buffer is allocated by the caller and free'd by the QDF after the
|
|
|
+ * message is posted to the message queue. If the consumer of the
|
|
|
+ * message needs anything in this message, it needs to copy the contents
|
|
|
+ * before returning from the message queue handler.
|
|
|
+ *
|
|
|
+ * Return: QDF_STATUS_SUCCESS for successful posting
|
|
|
+ * QDF_STATUS_E_INVAL for invalid message queue id
|
|
|
+ * QDF_STATUS_E_FAULT for invalid message pointer
|
|
|
+ * QDF_STATUS_E_FAILURE for unknown failure reported by
|
|
|
+ * message queue handler
|
|
|
+ */
|
|
|
+static inline QDF_STATUS cds_mq_post_message(CDS_MQ_ID msg_queue_id,
|
|
|
+ cds_msg_t *message)
|
|
|
+{
|
|
|
+ return cds_mq_post_message_by_priority(msg_queue_id, message,
|
|
|
+ LOW_PRIORITY);
|
|
|
+}
|
|
|
|
|
|
/**---------------------------------------------------------------------------
|
|
|
|