mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-17 22:19:57 -04:00
Merge the two performance changes into the 0.7.0 release line: a signalled event wakes only its own waiters, and a thread of its own writes the log.
One conflict, the list of setting names, which keeps both sides' additions. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -1672,7 +1672,10 @@ int plat_stderr_path(char *out, size_t cap) {
|
||||
int __llvm_profile_dump(void);
|
||||
#endif
|
||||
|
||||
void (*plat_exit_hook)(void);
|
||||
|
||||
void plat_exit(int code) {
|
||||
if (plat_exit_hook) plat_exit_hook();
|
||||
#ifdef NX2NAVI_PGO_GEN
|
||||
__llvm_profile_dump();
|
||||
#endif
|
||||
|
||||
@@ -303,6 +303,7 @@ void plat_aligned_free(void *p);
|
||||
|
||||
// ---- process
|
||||
_Noreturn void plat_exit(int code); // ends the process at once: other threads stop, no atexit handlers run
|
||||
extern void (*plat_exit_hook)(void); // called first by plat_exit when set (main.c: the queued log lines)
|
||||
int plat_setenv(const char *name, const char *value); // value NULL removes it; 1 on success
|
||||
uint32_t plat_process_id(void);
|
||||
// CPU time of the process since it started (user and kernel), and wall time since it started, in ns; 0 when unknown.
|
||||
|
||||
@@ -1135,7 +1135,10 @@ __attribute__((constructor)) static void pgo_flush_start(void) {
|
||||
}
|
||||
#endif
|
||||
|
||||
void (*plat_exit_hook)(void);
|
||||
|
||||
void plat_exit(int code) {
|
||||
if (plat_exit_hook) plat_exit_hook();
|
||||
#ifdef NX2NAVI_PGO_GEN
|
||||
__llvm_profile_dump();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user