Line data Source code
1 : #define _GNU_SOURCE 2 : #include "../../shared_dev/commands/dev.h" 3 : 4 : #include <pthread.h> 5 : 6 : void 7 : agave_boot( config_t const * config ); 8 : 9 : static void * 10 0 : agave_main1( void * args ) { 11 0 : agave_boot( args ); 12 0 : return NULL; 13 0 : } 14 : 15 : void 16 0 : spawn_agave( config_t const * config ) { 17 0 : pthread_t pthread; 18 0 : int err = pthread_create( &pthread, NULL, agave_main1, (void *)config ); 19 0 : if( FD_UNLIKELY( err ) ) FD_LOG_ERR(( "pthread_create() failed (%i-%s)", err, fd_io_strerror( err ) )); 20 0 : err = pthread_setname_np( pthread, "fdSolMain" ); 21 0 : if( FD_UNLIKELY( err ) ) FD_LOG_ERR(( "pthread_setname_np() failed (%i-%s)", err, fd_io_strerror( err ) )); 22 0 : } 23 : 24 : void 25 : fddev_dev_cmd_fn( args_t * args, 26 0 : config_t * config ) { 27 0 : dev_cmd_fn( args, config, spawn_agave ); 28 0 : } 29 : 30 : action_t fd_action_dev = { 31 : .name = "dev", 32 : .args = dev_cmd_args, 33 : .fn = fddev_dev_cmd_fn, 34 : .perm = dev_cmd_perm, 35 : .is_local_cluster = 1, 36 : .description = "Start up a development validator" 37 : };