Added a function to wait on any process completing
Added function to check if all processes are finished without blocking Added a function to set a uniproc_process object to a known invalid value Added a function to check if a process is a known invalid value Added userdata variable to struct as well as functions to set/get it AMEND: Updated uniproc_close_process to set the process to a known invalid value All functions now ignore uniproc_process's with a known invalid value uniproc_create_process will now return a known invalid value if it fails to create a process
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
#include <stdint.h>
|
||||
#include <Windows.h>
|
||||
typedef struct {
|
||||
|
||||
uint64_t userdata;
|
||||
FILE* in;
|
||||
FILE* out;
|
||||
FILE* err;
|
||||
@@ -14,5 +16,12 @@ typedef struct {
|
||||
} uniproc_process;
|
||||
|
||||
uniproc_process uniproc_create_process(const char* cmd, const size_t num_args, const char** argv);
|
||||
void uniproc_await_processes(uniproc_process* p, int* return_codes, size_t num_processes);
|
||||
void uniproc_await_processes(const uniproc_process* p, int* return_codes, const size_t num_processes);
|
||||
void uniproc_close_process(uniproc_process* p);
|
||||
bool uniproc_are_processes_finished(const uniproc_process* p, const size_t num_processes);
|
||||
void uniproc_nullify_processes(uniproc_process* p, const size_t num_processes);
|
||||
bool uniproc_is_process_null(const uniproc_process* p);
|
||||
void uniproc_await_any_processes(const uniproc_process* p, const size_t num_processes);
|
||||
void uniproc_set_userdata(uniproc_process* p, const uint64_t userdata);
|
||||
void uniproc_set_userdata(uniproc_process* p, void const* userdata);
|
||||
void* uniproc_get_userdata(uniproc_process* p);
|
||||
Reference in New Issue
Block a user