Commit Graph

11 Commits (1dfd977ec43370da6931b11a8d0469792c8ebc36)

Author SHA1 Message Date
Rogier-5 1dfd977ec4 Fix & make linux conditionals uniform (#4278)
The source used a hodge-podge of different combinations of different
macros to check for linux: 'linux', '__linux', '__linux__'.

As '__linux__' is standard (Posix), and the others are not, the source
now uniformly uses __linux__. If either linux or __linux are defined,
it is made sure that __linux__ is defined as well.
2016-07-04 21:00:57 +02:00
ShadowNinja a53357d291 Fix POSIX C++11 build
I broke this in 46fd114e9a.
2016-04-30 13:41:04 -04:00
ShadowNinja 46fd114e9a Fix race on thread creation
This often broke the threading tests on OSX.
2016-04-28 13:21:46 -04:00
kwolekr 6f95bb1ef3 Fix misc. MinGW and Valgrind warnings 2015-11-08 16:34:56 -05:00
kwolekr fdede60034 Fix C++11 compatibility 2015-10-31 02:38:23 -04:00
kwolekr 964be640cb Fix some threading things and add additional thread unittests
- Fix thread name reset on start()
- Fully reset thread state on kill()
- Add unittests to check for correct object states under various circumstances
2015-10-24 02:31:23 -04:00
Rui 06e5d0f5c5 Fix == to = 2015-10-17 17:20:58 +01:00
kwolekr 765a834cd0 Refactor Thread class to improve readability and portability
- Fix some incompatibilities with obscure platforms (AIX and WinCE)
- Clean up Thread class interface
- Add m_ prefix to private member variables
- Simplify platform-dependent logic, reducing preprocessor
  conditional clauses and improving readibility
- Add Thread class documentation
2015-10-16 23:43:29 -04:00
ShadowNinja 2139d7d45f Refactor logging
- Add warning log level
- Change debug_log_level setting to enumeration string
- Map Irrlicht log events to MT log events
- Encapsulate log_* functions and global variables into a class, Logger
- Unify dstream with standard logging mechanism
- Unify core.debug() with standard core.log() script API
2015-10-14 01:03:54 -04:00
Pavel Puchkin 588f0c1fb0 Fix building on OSX, broken since "Clean up threading"
Commit

e4bff8be94 - Clean up threading

by @ShadowNinja has broken the OSX build.

Including things inside a namespace isn't good.

Also fixes #3124.
2015-09-06 05:34:02 +02:00
ShadowNinja e4bff8be94 Clean up threading
* Rename everything.
    * Strip J prefix.
    * Change UpperCamelCase functions to lowerCamelCase.
  * Remove global (!) semaphore count mutex on OSX.
  * Remove semaphore count getter (unused, unsafe, depended on internal
    API functions on Windows, and used a hack on OSX).
  * Add `Atomic<type>`.
  * Make `Thread` handle thread names.
  * Add support for C++11 multi-threading.
  * Combine pthread and win32 sources.
  * Remove `ThreadStarted` (unused, unneeded).
  * Move some includes from the headers to the sources.
  * Move all of `Event` into its header (allows inlining with no new includes).
  * Make `Event` use `Semaphore` (except on Windows).
  * Move some porting functions into `Thread`.
  * Integrate logging with `Thread`.
  * Add threading test.
2015-08-23 22:04:06 -04:00