The usual stuff

There's nothing to see in main(), optproc(), and execute_resmgr() that you haven't seen before, with the possible exception of the pthread_create() in main() to create the worker thread, daq_thread():

pthread_create (NULL, NULL, daq_thread, NULL);

Even that is a plain vanilla call to pthread_create().

For every card that's specified in the configuration file, optproc() calls the worker function install_cards_from_database() to create a database (stored in the global variable adios). Part of the work of installing the card is to send its driver a devctl() asking it about its capabilities. You'll recall from above that this is the DCMD_GET_CONFIG message.