mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-10-06 16:05:42 +00:00
promote test-definition concepts from torture to base layer; reorganize tests to be nested in their respective layer; eliminate 't_group', just use containing layer
This commit is contained in:
@@ -127,6 +127,17 @@ lnx_thread_entry_point(void *ptr)
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: @per_os_impl Debugger Attachment Checking
|
||||
|
||||
internal B32
|
||||
debugger_is_attached(void)
|
||||
{
|
||||
B32 result = 0;
|
||||
// TODO(rjf)
|
||||
return result;
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: @per_os_impl Platform Time Functions
|
||||
|
||||
@@ -1292,13 +1303,13 @@ internal B32
|
||||
process_join(Process process, U64 endt_us, U64 *exit_code_out)
|
||||
{
|
||||
B32 result = 0;
|
||||
|
||||
|
||||
pid_t pid = (pid_t)process.u64[0];
|
||||
for(;;)
|
||||
{
|
||||
int status = 0;
|
||||
pid_t wait_result = LNX_RETRY_ON_EINTR(waitpid(pid, &status, (endt_us == max_U64) ? 0 : WNOHANG));
|
||||
|
||||
|
||||
if((wait_result == pid) && (WIFEXITED(status) || WIFSIGNALED(status)))
|
||||
{
|
||||
result = 1;
|
||||
@@ -1309,13 +1320,13 @@ process_join(Process process, U64 endt_us, U64 *exit_code_out)
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if(wait_result == -1) { break; }
|
||||
if(endt_us == 0) { break; }
|
||||
|
||||
|
||||
U64 now_us = now_time_us();
|
||||
if(now_us >= endt_us) { break; }
|
||||
|
||||
|
||||
U64 left_us = endt_us - now_us;
|
||||
U64 sleep_us = Min(left_us, Thousand(1));
|
||||
usleep((useconds_t)sleep_us);
|
||||
|
||||
Reference in New Issue
Block a user