Home
last modified time | relevance | path

Searched refs:sq (Results 1 – 10 of 10) sorted by relevance

/device/google/contexthub/firmware/os/core/
DsimpleQ.c39 static inline struct SimpleQueueEntry *simpleQueueGetNth(struct SimpleQueue* sq, uint32_t n) in simpleQueueGetNth() argument
41 return (struct SimpleQueueEntry*)(sq->data + n * sq->entrySz); in simpleQueueGetNth()
44 static inline uint32_t simpleQueueGetIdx(struct SimpleQueue* sq, const struct SimpleQueueEntry *e) in simpleQueueGetIdx() argument
46 return (((const uint8_t*)e) - sq->data) / sq->entrySz; in simpleQueueGetIdx()
52 struct SimpleQueue *sq; in simpleQueueAlloc() local
57 sq = heapAlloc(sz); in simpleQueueAlloc()
58 if (!sq) in simpleQueueAlloc()
61 memset(sq, 0, sz); in simpleQueueAlloc()
63 sq->discardCbk = forceDiscardCbk; in simpleQueueAlloc()
64 sq->head = SIMPLE_QUEUE_IDX_NONE; in simpleQueueAlloc()
[all …]
/device/linaro/dragonboard/qcom/qrtr/lib/
Dqrtr.c16 static int qrtr_getname(int sock, struct sockaddr_qrtr *sq) in qrtr_getname() argument
18 socklen_t sl = sizeof(*sq); in qrtr_getname()
21 rc = getsockname(sock, (void *)sq, &sl); in qrtr_getname()
27 if (sq->sq_family != AF_QIPCRTR || sl != sizeof(*sq)) in qrtr_getname()
55 struct sockaddr_qrtr sq; in qrtr_open() local
57 sq.sq_family = AF_QIPCRTR; in qrtr_open()
58 sq.sq_node = 1; in qrtr_open()
59 sq.sq_port = rport; in qrtr_open()
61 rc = bind(sock, (void *)&sq, sizeof(sq)); in qrtr_open()
81 struct sockaddr_qrtr sq; in qrtr_sendto() local
[all …]
Dlibqrtr.h141 const struct sockaddr_qrtr *sq);
/device/linaro/dragonboard/qcom/tqftpserv/
Dtqftpserv.c59 struct sockaddr_qrtr sq; member
199 static void handle_rrq(const char *buf, size_t len, struct sockaddr_qrtr *sq) in handle_rrq() argument
269 ret = connect(sock, (struct sockaddr *)sq, sizeof(*sq)); in handle_rrq()
289 client->sq = *sq; in handle_rrq()
312 static void handle_wrq(const char *buf, size_t len __unused, struct sockaddr_qrtr *sq) in handle_wrq() argument
346 ret = connect(sock, (struct sockaddr *)sq, sizeof(*sq)); in handle_wrq()
354 client->sq = *sq; in handle_wrq()
374 struct sockaddr_qrtr sq; in handle_reader() local
384 sl = sizeof(sq); in handle_reader()
385 len = recvfrom(client->sock, buf, sizeof(buf), 0, (void *)&sq, &sl); in handle_reader()
[all …]
/device/linaro/dragonboard/qcom/qrtr/src/
Dns.c63 struct sockaddr_qrtr sq; member
224 static int annouce_servers(struct context *ctx, struct sockaddr_qrtr *sq) in annouce_servers() argument
238 rc = service_announce_new(ctx, sq, srv); in annouce_servers()
315 lookup_notify(ctx, &lookup->sq, srv, false); in server_del()
323 static int ctrl_cmd_hello(struct context *ctx, struct sockaddr_qrtr *sq, in ctrl_cmd_hello() argument
328 rc = sendto(ctx->sock, buf, len, 0, (void *)sq, sizeof(*sq)); in ctrl_cmd_hello()
330 rc = annouce_servers(ctx, sq); in ctrl_cmd_hello()
338 struct sockaddr_qrtr sq; in ctrl_cmd_bye() local
367 sq.sq_family = AF_QIPCRTR; in ctrl_cmd_bye()
368 sq.sq_node = srv->node; in ctrl_cmd_bye()
[all …]
Dlookup.c132 struct sockaddr_qrtr sq; in main() local
138 socklen_t sl = sizeof(sq); in main()
167 rc = getsockname(sock, (void *)&sq, &sl); in main()
168 if (rc || sq.sq_family != AF_QIPCRTR || sl != sizeof(sq)) in main()
171 sq.sq_port = QRTR_PORT_CTRL; in main()
182 rc = sendto(sock, &pkt, sizeof(pkt), 0, (void *)&sq, sizeof(sq)); in main()
Daddr.c26 struct sockaddr_qrtr sq; in qrtr_set_address() local
28 socklen_t sl = sizeof(sq); in qrtr_set_address()
37 ret = getsockname(sock, (void*)&sq, &sl); in qrtr_set_address()
43 if (sl == sizeof(sq) && sq.sq_node == addr) in qrtr_set_address()
/device/google/contexthub/firmware/os/inc/
DsimpleQ.h32 void simpleQueueDestroy(struct SimpleQueue* sq); //will call discard, but in no particular order!
33 bool simpleQueueEnqueue(struct SimpleQueue* sq, const void *data, int length, bool possiblyDiscarda…
34 bool simpleQueueDequeue(struct SimpleQueue* sq, void *dataVal);
/device/linaro/dragonboard/qcom/pd-mapper/
Dpd-mapper.c310 struct sockaddr_qrtr sq; in main() local
351 sl = sizeof(sq); in main()
352 ret = recvfrom(fd, buf, sizeof(buf), 0, (void *)&sq, &sl); in main()
360 ret = qrtr_decode(&pkt, buf, ret, &sq); in main()
/device/linaro/dragonboard/qcom/rmtfs/
Drmtfs.c357 struct sockaddr_qrtr sq; in handle_rmtfs() local
364 sl = sizeof(sq); in handle_rmtfs()
365 ret = recvfrom(sock, buf, sizeof(buf), 0, (void *)&sq, &sl); in handle_rmtfs()
373 dbgprintf("[RMTFS] packet; from: %d:%d\n", sq.sq_node, sq.sq_port); in handle_rmtfs()
375 ret = qrtr_decode(&pkt, buf, ret, &sq); in handle_rmtfs()