X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fauxiliary%2Fos%2Fos_misc.h;h=403c8ee6ec5c345669f810649fe89486e3507072;hb=f1f104e54878ef42f02c947b8f1f3f0b710af6d8;hp=d59f9819feca69f144610a07cc0c7225232b14d3;hpb=bcc13b74443137043e8a34f8cb64a5add0d8af93;p=mesa.git diff --git a/src/gallium/auxiliary/os/os_misc.h b/src/gallium/auxiliary/os/os_misc.h index d59f9819fec..403c8ee6ec5 100644 --- a/src/gallium/auxiliary/os/os_misc.h +++ b/src/gallium/auxiliary/os/os_misc.h @@ -58,8 +58,6 @@ extern "C" { # define os_break() __debugbreak() #elif defined(PIPE_OS_UNIX) # define os_break() kill(getpid(), SIGTRAP) -#elif defined(PIPE_OS_EMBEDDED) -void os_break(void); #else # define os_break() abort() #endif @@ -68,10 +66,8 @@ void os_break(void); /* * Abort the program. */ -#if defined(DEBUG) || defined(PIPE_SUBSYSTEM_WINDOWS_DISPLAY) || defined(PIPE_SUBSYSTEM_WINDOWS_MINIPORT) -# define os_abort() os_break() -#elif defined(PIPE_OS_EMBEDDED) -void os_abort(void); +#if defined(DEBUG) +# define os_abort() do { os_break(); abort(); } while(0) #else # define os_abort() abort() #endif @@ -91,6 +87,13 @@ const char * os_get_option(const char *name); +/* + * Get the total amount of physical memory available on the system. + */ +bool +os_get_total_physical_memory(uint64_t *size); + + #ifdef __cplusplus } #endif