diff options
Diffstat (limited to 'src/base/system.h')
| -rw-r--r-- | src/base/system.h | 41 |
1 files changed, 35 insertions, 6 deletions
diff --git a/src/base/system.h b/src/base/system.h index a486b89d..aaa5b43f 100644 --- a/src/base/system.h +++ b/src/base/system.h @@ -367,6 +367,16 @@ void thread_destroy(void *thread); */ void thread_yield(); +/* + Function: thread_detach + Puts the thread in the detached thread, guaranteeing that + resources of the thread will be freed immediately when the + thread terminates. + + Parameters: + thread - Thread to detach +*/ +void thread_detach(void *thread); /* Group: Locks */ typedef void* LOCK; @@ -581,7 +591,7 @@ int net_udp_close(NETSOCKET sock); Returns: On success it returns an handle to the socket. On failure it returns NETSOCKET_INVALID. */ -NETSOCKET net_tcp_create(const NETADDR *a); +NETSOCKET net_tcp_create(NETADDR bindaddr); /* Function: net_tcp_listen @@ -815,6 +825,25 @@ char *str_skip_whitespaces(char *str); */ int str_comp_nocase(const char *a, const char *b); +/* + Function: str_comp_nocase_num + Compares up to num characters of two strings case insensitive. + + Parameters: + a - String to compare. + b - String to compare. + num - Maximum characters to compare + + Returns: + <0 - String a is lesser than string b + 0 - String a is equal to string b + >0 - String a is greater than string b + + Remarks: + - Only garanted to work with a-z/A-Z. + - The strings are treated as zero-termineted strings. +*/ +int str_comp_nocase_num(const char *a, const char *b, const int num); /* Function: str_comp @@ -1065,21 +1094,21 @@ int fs_rename(const char *oldname, const char *newname); DOCTODO: serp */ -int net_tcp_connect_non_blocking(NETSOCKET sock, const NETADDR *a); +int net_tcp_connect_non_blocking(NETSOCKET sock, NETADDR bindaddr); /* - Function: net_tcp_set_non_blocking + Function: net_set_non_blocking DOCTODO: serp */ -int net_tcp_set_non_blocking(NETSOCKET sock); +int net_set_non_blocking(NETSOCKET sock); /* - Function: net_tcp_set_non_blocking + Function: net_set_non_blocking DOCTODO: serp */ -int net_tcp_set_blocking(NETSOCKET sock); +int net_set_blocking(NETSOCKET sock); /* Function: net_errno |