diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-04-02 13:43:54 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-04-02 13:59:43 +0400 |
commit | 35747ee3d54765a05d7594ee52fdcd564464b18f (patch) | |
tree | 777d6741536889539e3a6516394881c95c5fef08 /source/blender/blenlib | |
parent | cb7cfd3ab6be1cfba96cb2070ac60d224126f1ea (diff) |
Rename "BLI_cpu.h" to "BLI_system.h" and add to it BLI_getpid() helper.
There is not much sense to have a whole BLI file just to check SSE2 on CPUs...
So idea is to rename it to more generic "BLI_system", and add to it more system-related
utils, like e.g. an include helper for getpid(), which allows to hide unix/windows
internals from rest of the code...
Reviewers: campbellbarton
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D439
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/BLI_system.h (renamed from source/blender/blenlib/BLI_cpu.h) | 13 | ||||
-rw-r--r-- | source/blender/blenlib/CMakeLists.txt | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/system.c (renamed from source/blender/blenlib/intern/cpu.c) | 6 |
3 files changed, 15 insertions, 8 deletions
diff --git a/source/blender/blenlib/BLI_cpu.h b/source/blender/blenlib/BLI_system.h index fa29162e59e..8cdc9e4e6c5 100644 --- a/source/blender/blenlib/BLI_cpu.h +++ b/source/blender/blenlib/BLI_system.h @@ -18,14 +18,21 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef __BLI_CPU_H__ -#define __BLI_CPU_H__ +#ifndef __BLI_SYSTEM_H__ +#define __BLI_SYSTEM_H__ -/** \file BLI_cpu.h +/** \file BLI_system.h * \ingroup bli */ int BLI_cpu_support_sse2(void); +/* getpid */ +#ifdef WIN32 +# define BLI_SYSTEM_PID_H <process.h> +#else +# define BLI_SYSTEM_PID_H <unistd.h> #endif +#endif /* __BLI_SYSTEM_H__ */ + diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt index 491f988642b..205935f3d14 100644 --- a/source/blender/blenlib/CMakeLists.txt +++ b/source/blender/blenlib/CMakeLists.txt @@ -55,7 +55,6 @@ set(SRC intern/buffer.c intern/callbacks.c intern/convexhull2d.c - intern/cpu.c intern/dynlib.c intern/easing.c intern/edgehash.c @@ -97,6 +96,7 @@ set(SRC intern/string.c intern/string_cursor_utf8.c intern/string_utf8.c + intern/system.c intern/task.c intern/threads.c intern/time.c @@ -117,7 +117,6 @@ set(SRC BLI_callbacks.h BLI_compiler_attrs.h BLI_convexhull2d.h - BLI_cpu.h BLI_dlrbTree.h BLI_dynlib.h BLI_dynstr.h @@ -168,6 +167,7 @@ set(SRC BLI_string_cursor_utf8.h BLI_string_utf8.h BLI_sys_types.h + BLI_system.h BLI_task.h BLI_threads.h BLI_timecode.h diff --git a/source/blender/blenlib/intern/cpu.c b/source/blender/blenlib/intern/system.c index 784b1900785..e6389bc68f3 100644 --- a/source/blender/blenlib/intern/cpu.c +++ b/source/blender/blenlib/intern/system.c @@ -4,7 +4,7 @@ * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. + * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -18,12 +18,12 @@ * ***** END GPL LICENSE BLOCK ***** */ -/** \file blender/blenlib/intern/cpu.c +/** \file blender/blenlib/intern/system.c * \ingroup bli */ -#include "BLI_cpu.h" +#include "BLI_system.h" int BLI_cpu_support_sse2(void) { |