libubox
C utility functions for OpenWrt.
udebug-proto.h File Reference
#include "udebug.h"

Go to the source code of this file.

Data Structures

struct  udebug_hdr
 
struct  udebug_client_msg
 

Enumerations

enum  udebug_client_msg_type {
  CL_MSG_RING_ADD , CL_MSG_RING_REMOVE , CL_MSG_RING_NOTIFY , CL_MSG_GET_HANDLE ,
  CL_MSG_RING_GET , CL_MSG_ERROR
}
 

Functions

struct udebug_client_msg __attribute__ ((packed, aligned(4)))
 
static struct udebug_ptrudebug_ring_ptr (struct udebug_hdr *hdr, uint32_t idx)
 
static void * udebug_buf_ptr (struct udebug_buf *buf, uint32_t ofs)
 

Variables

uint8_t type
 
uint8_t _pad [3]
 
uint32_t id
 
union {
   struct {
      uint32_t   ring_size
 
      uint32_t   data_size
 
   } 
 
   uint32_t   notify_mask
 
}; 
 

Enumeration Type Documentation

◆ udebug_client_msg_type

Enumerator
CL_MSG_RING_ADD 
CL_MSG_RING_REMOVE 
CL_MSG_RING_NOTIFY 
CL_MSG_GET_HANDLE 
CL_MSG_RING_GET 
CL_MSG_ERROR 

Definition at line 39 of file udebug-proto.h.

39  {
46 };
@ CL_MSG_RING_ADD
Definition: udebug-proto.h:40
@ CL_MSG_RING_REMOVE
Definition: udebug-proto.h:41
@ CL_MSG_RING_NOTIFY
Definition: udebug-proto.h:42
@ CL_MSG_GET_HANDLE
Definition: udebug-proto.h:43
@ CL_MSG_RING_GET
Definition: udebug-proto.h:44
@ CL_MSG_ERROR
Definition: udebug-proto.h:45

Function Documentation

◆ __attribute__()

struct udebug_client_msg __attribute__ ( (packed, aligned(4))  )

◆ udebug_buf_ptr()

static void* udebug_buf_ptr ( struct udebug_buf buf,
uint32_t  ofs 
)
inlinestatic

Definition at line 67 of file udebug-proto.h.

68 {
69  return buf->data + (ofs & (buf->data_size - 1));
70 }
void * data
Definition: udebug.h:79
size_t data_size
Definition: udebug.h:80
Here is the caller graph for this function:

◆ udebug_ring_ptr()

static struct udebug_ptr* udebug_ring_ptr ( struct udebug_hdr hdr,
uint32_t  idx 
)
inlinestatic

Definition at line 61 of file udebug-proto.h.

62 {
63  struct udebug_ptr *ring = (struct udebug_ptr *)&hdr[1];
64  return &ring[idx & (hdr->ring_size - 1)];
65 }
uint32_t ring_size
Definition: udebug-proto.h:24
Here is the caller graph for this function:

Variable Documentation

◆ 

union { ... }

◆ _pad

uint8_t _pad[3]

Definition at line 1 of file udebug-proto.h.

◆ data_size

uint32_t data_size

Definition at line 5 of file udebug-proto.h.

◆ id

uint32_t id

Definition at line 2 of file udebug-proto.h.

◆ notify_mask

uint32_t notify_mask

Definition at line 7 of file udebug-proto.h.

◆ ring_size

uint32_t ring_size

Definition at line 5 of file udebug-proto.h.

◆ type

uint8_t type

Definition at line 0 of file udebug-proto.h.