Skip to content

Commit af72d97

Browse files
committed
util: don't include fd_stat.h, fd_pod.h by default
1 parent 8b10c32 commit af72d97

File tree

10 files changed

+16
-34
lines changed

10 files changed

+16
-34
lines changed

src/app/shared/fd_config_parse.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "fd_config_private.h"
2+
#include "../../util/pod/fd_pod.h"
23

34
/* Pod query utils ****************************************************/
45

src/discof/gossip/fd_gossip_tile.c

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "../../flamenco/gossip/fd_gossip.h"
1515
#include "../../flamenco/runtime/fd_system_ids.h"
1616
#include "../../flamenco/runtime/fd_runtime.h"
17+
#include "../../util/pod/fd_pod.h"
1718
#include "../../util/net/fd_ip4.h"
1819
#include "../../util/net/fd_udp.h"
1920
#include "../../util/net/fd_net_headers.h"

src/flamenco/fd_flamenco_base.h

-24
Original file line numberDiff line numberDiff line change
@@ -119,30 +119,6 @@ fd_acct_addr_cstr( char cstr[ static FD_BASE58_ENCODED_32_SZ ],
119119
return fd_base58_encode_32( addr, NULL, cstr );
120120
}
121121

122-
/* fd_pod utils */
123-
124-
FD_FN_UNUSED static fd_pubkey_t *
125-
fd_pod_query_pubkey( uchar const * pod,
126-
char const * path,
127-
fd_pubkey_t * val ) {
128-
129-
ulong bufsz = 0UL;
130-
void const * buf = fd_pod_query_buf( pod, path, &bufsz );
131-
132-
if( FD_UNLIKELY( (!buf) | (bufsz!=sizeof(fd_pubkey_t)) ) )
133-
return NULL;
134-
135-
memcpy( val->uc, buf, sizeof(fd_pubkey_t) );
136-
return val;
137-
}
138-
139-
static inline ulong
140-
fd_pod_insert_pubkey( uchar * pod,
141-
char const * path,
142-
fd_pubkey_t const * val ) {
143-
return fd_pod_insert_buf( pod, path, val->uc, sizeof(fd_pubkey_t) );
144-
}
145-
146122
FD_PROTOTYPES_END
147123

148124
#endif /* HEADER_fd_src_flamenco_fd_flamenco_base_h */

src/tango/tempo/fd_tempo.c

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "../fd_tango.h"
2+
#include "../../util/math/fd_stat.h"
23

34
#if FD_HAS_DOUBLE
45

@@ -24,10 +25,10 @@ fd_tempo_wallclock_model( double * opt_tau ) {
2425
jitter. */
2526

2627
ulong iter = 0UL;
27-
for(;;) {
28+
for(;;) {
2829
# define TRIAL_CNT 512UL
2930
# define TRIM_CNT 64UL
30-
double trial[ TRIAL_CNT ];
31+
double trial[ TRIAL_CNT ];
3132
for( ulong trial_idx=0UL; trial_idx<TRIAL_CNT; trial_idx++ ) {
3233
FD_COMPILER_MFENCE();
3334
long tic = fd_log_wallclock();
@@ -67,10 +68,10 @@ fd_tempo_tickcount_model( double * opt_tau ) {
6768
/* Same as the above but for fd_tickcount(). */
6869

6970
ulong iter = 0UL;
70-
for(;;) {
71+
for(;;) {
7172
# define TRIAL_CNT 512UL
7273
# define TRIM_CNT 64UL
73-
double trial[ TRIAL_CNT ];
74+
double trial[ TRIAL_CNT ];
7475
for( ulong trial_idx=0UL; trial_idx<TRIAL_CNT; trial_idx++ ) {
7576
FD_COMPILER_MFENCE();
7677
long tic = fd_tickcount();
@@ -131,10 +132,10 @@ fd_tempo_tick_per_ns( double * opt_sigma ) {
131132
well modeled as normal. */
132133

133134
ulong iter = 0UL;
134-
for(;;) {
135+
for(;;) {
135136
# define TRIAL_CNT 32UL
136137
# define TRIM_CNT 4UL
137-
double trial[ TRIAL_CNT ];
138+
double trial[ TRIAL_CNT ];
138139
for( ulong trial_idx=0UL; trial_idx<TRIAL_CNT; trial_idx++ ) {
139140
long then; long toc; fd_tempo_observe_pair( &then, &toc );
140141
fd_log_sleep( 16777216L ); /* ~16.8 ms */
@@ -199,7 +200,7 @@ fd_tempo_observe_pair( long * opt_now,
199200
tickcount because that is typically the lower overhead, more
200201
deterministic one and less likely to get jerked around behind our
201202
back.
202-
203+
203204
Theoretically, this exploits how the minimum of a shifted
204205
exponential random variable converges. Since the time to read
205206
the various clocks is expected to be reasonably modeled as a

src/util/fd_util.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
//#include "tile/fd_tile.h" /* includes shmem/fd_shmem.h */
1919
//#include "scratch/fd_scratch.h" /* includes tile/fd_tile.h sanitize/fd_sanitize.h valloc/fd_valloc.h */
2020
//#include "tpool/fd_tpool.h" /* includes tile/fd_tile.h scratch/fd_scratch.h */
21-
//#include "wksp/fd_wksp.h" /* includes pod/fd_pod.h tpool/fd_tpool.h checkpt/fd_checkpt.h sanitize/fd_sanitize.h */
21+
//#include "wksp/fd_wksp.h" /* tpool/fd_tpool.h checkpt/fd_checkpt.h sanitize/fd_sanitize.h */
2222
#include "alloc/fd_alloc.h" /* includes wksp/fd_wksp.h valloc/fd_valloc.h */
2323
#include "rng/fd_rng.h" /* includes bits/fd_bits.h */
2424

2525
/* FIXME: Should these be optional APIs? */
2626
#include "sandbox/fd_sandbox.h" /* includes fd_util_base.h */
27-
#include "math/fd_stat.h" /* includes bits/fd_bits.h */
27+
//#include "math/fd_stat.h" /* includes bits/fd_bits.h */
2828
#include "bits/fd_sat.h" /* includes bits/fd_bits.h */
2929
//#include "hist/fd_histf.h" /* includes log/fd_log.h */
3030

src/util/math/test_stat.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "../fd_util.h"
2+
#include "../../util/math/fd_stat.h"
23

34
/* This are uniform in [-0.5,+0.5] */
45

src/util/pod/fd_pod_ctl.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "../fd_util.h"
2+
#include "../../util/pod/fd_pod.h"
23

34
#if FD_HAS_HOSTED
45

src/util/pod/test_pod.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "../fd_util.h"
2+
#include "../../util/pod/fd_pod.h"
23

34
uchar mem[ 16384 ];
45

src/util/wksp/fd_wksp.h

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#ifndef HEADER_fd_src_util_wksp_fd_wksp_h
22
#define HEADER_fd_src_util_wksp_fd_wksp_h
33

4-
#include "../pod/fd_pod.h"
54
#include "../tpool/fd_tpool.h"
65
#include "../checkpt/fd_checkpt.h"
76
#include "../sanitize/fd_sanitize.h"

src/util/wksp/fd_wksp_helper.c

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "fd_wksp_private.h"
2+
#include "../pod/fd_pod.h"
23

34
/* fd_wksp_private_{join,leave}_func are used to automagically handle
45
the first join / last leave by the fd_wksp_attach / fd_wksp_detach. */

0 commit comments

Comments
 (0)