Home
last modified time | relevance | path

Searched refs:size (Results 1 – 12 of 12) sorted by relevance

/babblesim_base-latest/libUtilv1/src/
Dbs_oswrap.h24 void* bs_malloc(size_t size);
25 void* bs_aligned_alloc(size_t alignment, size_t size);
26 void* bs_calloc(size_t nmemb, size_t size);
27 void* bs_realloc(void *ptr, size_t size);
29 void bs_readline(char *s, int size, FILE *stream);
Dbs_oswrap.c90 void* bs_malloc(size_t size) { in bs_malloc() argument
92 pointer = malloc(size); in bs_malloc()
102 void* bs_aligned_alloc(size_t alignment, size_t size) { in bs_aligned_alloc() argument
104 if (posix_memalign(&memptr, alignment, size) != 0) { in bs_aligned_alloc()
113 void* bs_calloc(size_t nmemb, size_t size) { in bs_calloc() argument
115 pointer = calloc(nmemb, size); in bs_calloc()
125 void* bs_realloc(void *ptr, size_t size) { in bs_realloc() argument
126 ptr = realloc(ptr, size); in bs_realloc()
144 void bs_readline(char *s, int size, FILE *stream){ in bs_readline() argument
147 while ( ( i < size - 1 ) && ( (c=getc(stream)) != EOF ) && c!='\n'){ in bs_readline()
Dbs_tracing.c72 int size = BS_MIN(strlen(prefix), MAX_PREFIX_LEN-1); in bs_trace_set_prefix() local
73 prefix_s[size] = 0; in bs_trace_set_prefix()
76 size = BS_MIN(strlen(prefix), MAX_PREFIX_LEN-1); in bs_trace_set_prefix()
77 prefix_s_color[size] = 0; in bs_trace_set_prefix()
82 int size = BS_MIN(strlen(prefix), MAX_PREFIX_LEN-1); in bs_trace_set_color_prefix() local
83 prefix_s_color[size] = 0; in bs_trace_set_color_prefix()
Dbs_cmd_line.c340 static void bs_gen_switch_syntax(char *buf, size_t size, in bs_gen_switch_syntax() argument
344 if (size <= 0) { in bs_gen_switch_syntax()
350 size--; in bs_gen_switch_syntax()
354 ret = snprintf(buf, size, "-%s", args_s_el->option); in bs_gen_switch_syntax()
357 ret = snprintf(buf, size, "-%s=<%s>", args_s_el->option, args_s_el->name); in bs_gen_switch_syntax()
359 ret = snprintf(buf, size, "-%s <%s>...", args_s_el->option, args_s_el->name); in bs_gen_switch_syntax()
366 if (size - ret < 0) { in bs_gen_switch_syntax()
374 size -= ret; in bs_gen_switch_syntax()
377 snprintf(buf, size,"] "); in bs_gen_switch_syntax()
379 snprintf(buf, size," "); in bs_gen_switch_syntax()
Dbs_string.h16 void bs_read_hex_dump(char *s,uint8_t *buffer, uint size);
Dbs_string.c92 void bs_read_hex_dump(char *s,uint8_t *buffer, uint size) { in bs_read_hex_dump() argument
95 while ( s[ni] != 0 && no < size ){ in bs_read_hex_dump()
/babblesim_base-latest/libPhyComv1/src/
Dbs_pc_backchannel.c178 void bs_bc_send_msg(uint channel_id, uint8_t *ptr, size_t size){ in bs_bc_send_msg() argument
182 char message[size+4]; in bs_bc_send_msg()
183 *(uint32_t*)message = size; in bs_bc_send_msg()
184 memcpy(&message[4], ptr, size); in bs_bc_send_msg()
188 int bytes_written = write(channels_status[channel_id].ff[Out], message, size+4); in bs_bc_send_msg()
189 if ( bytes_written != size+4 ) { in bs_bc_send_msg()
191 channel_id, bytes_written, size, errno); in bs_bc_send_msg()
236 void bs_bc_receive_msg(int channel_id , uint8_t *ptr, size_t size){ in bs_bc_receive_msg() argument
240 if ( size > channels_status[channel_id].pending_read_bytes ) in bs_bc_receive_msg()
242 channels_status[channel_id].pending_read_bytes, channel_id, size); in bs_bc_receive_msg()
[all …]
Dbs_pc_backchannel.h18 void bs_bc_send_msg(uint channel_id, uint8_t *ptr, size_t size);
20 void bs_bc_receive_msg(int channel_id , uint8_t *ptr, size_t size);
Dbs_pc_base.h22 void pb_send_payload(int ff, void *buf, size_t size);
Dbs_pc_base.c127 void pb_send_payload(int ff, void *buf, size_t size) { in pb_send_payload() argument
128 if (size) { in pb_send_payload()
132 write(ff, buf, size); in pb_send_payload()
/babblesim_base-latest/libRandv2/src/
Dbs_rand_main.h24 void bs_random_Gaus_c_buffer(double complex* buffer, uint size);
34 void bs_random_buffer(char *buffer, size_t size);
Dbs_rand_main.c97 void bs_random_Gaus_c_buffer(double complex* buffer, uint size){ in bs_random_Gaus_c_buffer() argument
106 for (i = 0 ; i < size; i++){ in bs_random_Gaus_c_buffer()
193 void bs_random_buffer(char *buffer, size_t size) { in bs_random_buffer() argument
197 while (size) { in bs_random_buffer()
202 size_t to_copy = BS_MIN(size, bits_ready / 8); in bs_random_buffer()
206 size -= to_copy; in bs_random_buffer()