Skip to content
Snippets Groups Projects
Commit cfd4c301 authored by Tim Wickberg's avatar Tim Wickberg
Browse files

Add unpack_bit_str_hex_as_inx macro to pack.h.

RPCs will switch to using bit_str_hex for serialization from bit_fmt,
but receivers still need to access this as a inx formatted array for now.
Collapse this into one macro rather than repeating a bunch of times.

Note that this would be better performing if consolidated into a single
function rather than using unpack_bit_str_hex then bitstr2inx to convert;
although this is a client-side function and less important than avoiding
performance and throughput issues within slurmctld.
parent 7a3160d1
No related branches found
No related tags found
No related merge requests found
......@@ -328,6 +328,15 @@ int unpackmem_array(char *valp, uint32_t size_valp, Buf buffer);
*bitmap = NULL; \
} while (0)
/* note: this would be faster if collapsed into a single function
* rather than a combination of unpack_bit_str_hex and bitstr2inx */
#define unpack_bit_str_hex_as_inx(inx, buf) do { \
bitstr_t *b = NULL; \
unpack_bit_str_hex(&b, buf); \
*inx = bitstr2inx(b); \
bit_free(b); \
} while (0)
#define unpackstr_ptr \
unpackmem_ptr
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment