Crinit -- Configurable Rootfs Init
procdip.h File Reference

(2023-08-02, commit: 9434b31)

Header related to the Process Dispatcher. More...

#include <limits.h>
#include "taskdb.h"
Include dependency graph for procdip.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CRINIT_PROC_DISPATCH_THREAD_STACK_SIZE   (PTHREAD_STACK_MIN + 112 * 1024)
 

Functions

int crinitProcDispatchSpawnFunc (crinitTaskDB_t *ctx, const crinitTask_t *t)
 
int crinitSetInhibitWait (bool inh)
 

Detailed Description

Header related to the Process Dispatcher.

Macro Definition Documentation

◆ CRINIT_PROC_DISPATCH_THREAD_STACK_SIZE

#define CRINIT_PROC_DISPATCH_THREAD_STACK_SIZE   (PTHREAD_STACK_MIN + 112 * 1024)

Stack size for process dispatch threads.

Function Documentation

◆ crinitProcDispatchSpawnFunc()

int crinitProcDispatchSpawnFunc ( crinitTaskDB_t ctx,
const crinitTask_t t 
)

Process dispatcher function to spawn a task that is ready.

Will create a new thread to handle process spawning of task t and status updates of ctx. The function will return successfully if the thread has been created without error. The thread is created in a detached state so no further management action is necessary.

Returns
0 on success, -1 otherwise

◆ crinitSetInhibitWait()

int crinitSetInhibitWait ( bool  inh)

Turn waiting for child processes on or off.

If inh is set to true, the process dispatch threads will block before waiting for a child process until waiting is reactivated, leaving terminated child processes as zombies for the time being.

Parameters
inhSet true to inhibit waiting or false to reactivate waiting.
Returns
0 on success, -1 on error