2 * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
24 #include "mtp_datatype.h"
27 typedef mtp_int32 msgq_id_t;
33 unsigned char *buffer;
36 mtp_bool _util_msgq_init(msgq_id_t *mq_id, mtp_uint32 flags);
37 mtp_bool _util_msgq_send(msgq_id_t mq_id, void *buf, mtp_uint32 size,
39 mtp_bool _util_msgq_receive(msgq_id_t mq_id, void *buf, mtp_uint32 size,
40 mtp_uint32 flags, mtp_int32 *nbytes);
41 mtp_bool _util_msgq_deinit(msgq_id_t *msgq_id);
42 mtp_bool _util_msgq_set_size(msgq_id_t mq_id, mtp_uint32 nbytes);
43 mtp_bool _util_rcv_msg_from_mq(msgq_id_t mq_id, unsigned char **pkt,
44 mtp_uint32 *pkt_len, msg_type_t *mtype);
50 #endif/*_MTP_MSGQ_H_*/