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