ObjFW  History of src/threading.h of d55e95f217f3fd21

History of file src/threading.h at check-in d55e95f217f3fd21

2019-08-01
20:14
Deleted: Split threading.[hm] into multiple files

This allows the runtime to only link against the parts it needs, without
pulling in unnecessary parts like thread spawning, TLS and conditions. check-in: [5358e9ea6a] user: js, branch: trunk, size: 0

2019-07-28
12:32
OFThread: Don't require of_thread_exit()

Some systems do not provide the functionality. file: [3939aad58d] check-in: [b5430ac44f] user: js, branch: trunk, size: 6042 [annotate] [blame] [check-ins using] [diff]

2019-02-17
22:16
OFWindowsRegistryKey: Add write support file: [dfd5b7db22] check-in: [4c5f686a52] user: js, branch: trunk, size: 6094 [annotate] [blame] [check-ins using] [diff]
2019-01-03
19:13
Update copyright file: [005e79a6d9] check-in: [0509d7a844] user: js, branch: trunk, size: 6315 [annotate] [blame] [check-ins using] [diff]
2018-01-03
19:49
Update copyright notice file: [cb3a255f3c] check-in: [7e5c81e186] user: js, branch: trunk, size: 6309 [annotate] [blame] [check-ins using] [diff]
2017-10-07
10:46
OFThread: Fix setting the name on the wrong thread

The name of the thread may only be set from the thread itself. So the
thread should read the property on start and set its name. file: [46db014c33] check-in: [1494d3f6f1] user: js, branch: trunk, size: 6286 [annotate] [blame] [check-ins using] [diff]

2017-05-16
22:58
threading.h: Remove unconditional sched.h include file: [44065a1e75] check-in: [510158d026] user: js, branch: trunk, size: 6306 [annotate] [blame] [check-ins using] [diff]
2017-05-14
14:18
Add nullability annotations to remaining headers

This explicitly excludes threading.h, as adding nullability annotations
requires adding them everywhere in the file. However, the types in there
are implementation defined, and might be pointers or not: Adding none
when it's a pointer would be an error, and adding one when it's not a
pointer would be an error, too. file: [e37b27b008] check-in: [c5b3c8ea87] user: js, branch: trunk, size: 6326 [annotate] [blame] [check-ins using] [diff]

2017-05-07
20:10
Small code style change

Casts are now written like types in variable declarations. file: [f3dd04ca64] check-in: [4af49a13c3] user: js, branch: trunk, size: 6290 [annotate] [blame] [check-ins using] [diff]

2017-04-13
13:19
Clean up memory barriers file: [774a47eec4] check-in: [48ffea9a9a] user: js, branch: trunk, size: 6288 [annotate] [blame] [check-ins using] [diff]
2017-01-09
17:36
Update copyright

Forgot to add 2017, even though I already did quite some changes in
2017. file: [394f138c54] check-in: [44f45c2e35] user: js, branch: trunk, size: 6283 [annotate] [blame] [check-ins using] [diff]

2016-07-31
21:54
Add of_memory_barrier_{producer,consumer}()

Also changes the naming slightly (leave -> exit). This is more similar
to the membar_*() API NetBSD and OpenBSD provides. file: [91e8883d41] check-in: [24796a2dc1] user: js, branch: trunk, size: 6277 [annotate] [blame] [check-ins using] [diff]

2016-07-30
21:22
of_spinlock_(un)lock: Add memory barrier file: [8449195015] check-in: [8e7c6ddf8c] user: js, branch: trunk, size: 6278 [annotate] [blame] [check-ins using] [diff]
2016-04-24
15:31
Move of_tlskey_{new,free} to API-specific files file: [f81dcfe3c4] check-in: [4b31620e27] user: js, branch: trunk, size: 6169 [annotate] [blame] [check-ins using] [diff]
2016-04-18
21:48
Add of_thread_yield() file: [adb5774a4e] check-in: [fa79bc173e] user: js, branch: trunk, size: 6540 [annotate] [blame] [check-ins using] [diff]
21:40
Move of_once() to threading.m file: [b27d0410b9] check-in: [3f31bd034d] user: js, branch: trunk, size: 6557 [annotate] [blame] [check-ins using] [diff]
2016-03-28
23:43
Style consistency changes

Multiline preprocessor directives now always indent the continued lines
by 4 spaces. The only exception are defines that define to code blocks:
Those are still indented by a tab in order to align with the rest of the
code. file: [ab485ea64f] check-in: [543eb96c02] user: js, branch: trunk, size: 6558 [annotate] [blame] [check-ins using] [diff]

2016-03-12
16:30
Don't require C99 in public headers

Using C99 in public headers would require users of ObjFW to compile
everything with -std=c99. file: [0e441a08b1] check-in: [1664de811f] user: js, branch: trunk, size: 6555 [annotate] [blame] [check-ins using] [diff]

2016-02-21
15:37
Make use of C99-style for loops file: [2fb0666be8] check-in: [e0b9167693] user: js, branch: trunk, size: 6550 [annotate] [blame] [check-ins using] [diff]
2016-01-03
00:43
Update copyright

While at it, also update the mail address. file: [cdc77ff76d] check-in: [cec0f072f8] user: js, branch: 0.8, size: 6488 [annotate] [blame] [check-ins using] [diff]

00:41
Update copyright

While at it, also update the mail address. file: [3ce1164040] check-in: [2a27cf3000] user: js, branch: trunk, size: 6552 [annotate] [blame] [check-ins using] [diff]

2015-10-19
22:15
Add platform.h & make platform defines consistent file: [ddfe6e7a81] check-in: [1ba08eebc5] user: js, branch: trunk, size: 6548 [annotate] [blame] [check-ins using] [diff]
2015-03-30
21:33
Add OF_NO_RETURN_FUNC

OF_NO_RETURN_FUNC is defined when __attribute__((__noreturn__)) is
supported for functions, whereas OF_NO_RETURN is only defined when it is
supported for both functions and methods. file: [9b92c5e911] check-in: [ffb39d1df6] user: js, branch: trunk, size: 6484 [annotate] [blame] [check-ins using] [diff]

2015-01-03
20:57
Update copyright file: [2d831b6bc8] check-in: [cfd374b906] user: js, branch: trunk, size: 6479 [annotate] [blame] [check-ins using] [diff]
2014-10-04
19:24
threading: WinAPI's CriticalSection is recursive

No need to manually implement recursiveness for WinAPI. file: [a8b345125c] check-in: [be99da0c09] user: js, branch: trunk, size: 6473 [annotate] [blame] [check-ins using] [diff]

2014-08-01
12:27
Change return type for thread main

This changes the return type to void, as the return type of a thread's
main depends on the threading implementation used. For pthreads, it adds
a wrapper function which returns NULL to avoid problems with bogus
return values. For WinAPI threads, the function is just casted, as bogus
return values don't seem to matter there. file: [7cf05d0077] check-in: [52e02c06ca] user: js, branch: trunk, size: 6448 [annotate] [blame] [check-ins using] [diff]

2014-07-19
16:27
OFThread: Configurable priority and stack size file: [0444440a9d] check-in: [c4f724070a] user: js, branch: trunk, size: 6444 [annotate] [blame] [check-ins using] [diff]
16:16
Add of_thread_set_name() file: [ca3714aa7c] check-in: [2c78c6570b] user: js, branch: trunk, size: 6187 [annotate] [blame] [check-ins using] [diff]
09:55
Don't use C11's noreturn

It causes just too much trouble: It breaks with some old versions of
Clang, where noreturn does not work correctly, and OS X headers break if
noreturn is defined, requiring an ugly and fragile workaround. It's just
not worth the trouble it causes, as the same functionality is available
through __attribute__((__noreturn__)). file: [e7a7a55554] check-in: [716b1fc2b3] user: js, branch: trunk, size: 6117 [annotate] [blame] [check-ins using] [diff]

2014-07-18
10:47
Split threading.h into threading.m and threading.h file: [25e6067bdf] check-in: [1da2e596af] user: js, branch: trunk, size: 6113 [annotate] [blame] [check-ins using] [diff]
2014-07-16
15:16
Coding style file: [90da9579d7] check-in: [ff23684e9d] user: js, branch: trunk, size: 12459 [annotate] [blame] [check-ins using] [diff]
2014-06-21
21:43
Move all macros from OFObject.h to macros.h

This means that OFObject.h imports macros.h now, making it unnecessary
to manually import macros.h in almost every file. And while at it, also
import autorelease.h in OFObject.h, so that this doesn't need to be
manually imported in almost every file as well. file: [c4677d1bcf] check-in: [13ee56edf3] user: js, branch: trunk, size: 12416 [annotate] [blame] [check-ins using] [diff]

2014-05-14
20:45
Add C11 noreturn

If it's unavailable, it's defined to __attribute__((noreturn)).

Unfortunately, it cannot be used for ObjC methods, as noreturn is part
of the return type while __attribute__((noreturn)) needs to be at the
end for an ObjC method. To make matters worse, even GCC versions that
accept noreturn don't allow it for an ObjC method. Thus, the only thing
that can be done is to always use __attribute__((noreturn)) for ObjC
methods using the OF_METHOD_NORETURN define. file: [65cc15f272] check-in: [bac91ccede] user: js, branch: trunk, size: 12436 [annotate] [blame] [check-ins using] [diff]

2014-05-05
02:43
Add OF_NO_RETURN and OF_UNREACHABLE file: [79cb0c24fe] check-in: [b885b6fdfa] user: js, branch: trunk, size: 12424 [annotate] [blame] [check-ins using] [diff]
01:08
Improve atomics API file: [a65488fd6f] check-in: [a92844520a] user: js, branch: trunk, size: 12411 [annotate] [blame] [check-ins using] [diff]
2014-02-28
00:38
threading.h: Add of_once() file: [1628bdd768] check-in: [ba5e756264] user: js, branch: trunk, size: 12411 [annotate] [blame] [check-ins using] [diff]
2014-02-12
03:17
Fix compilation with mingw-w64 file: [682651858d] check-in: [6ba4095f05] user: js, branch: trunk, size: 11904 [annotate] [blame] [check-ins using] [diff]
2014-01-31
13:33
Make sure there's always an #else in abstractions file: [23ee43131c] check-in: [0a8dca300b] user: js, branch: trunk, size: 11683 [annotate] [blame] [check-ins using] [diff]
2014-01-16
23:09
Add of_time_interval_t.

This is used instead for time intervals now instead of doubles. file: [7bbaf6acd2] check-in: [dc31ce3d34] user: js, branch: trunk, size: 10654 [annotate] [blame] [check-ins using] [diff]

2014-01-04
00:24
Update copyright. file: [60a577e8c2] check-in: [3b97fc3cd9] user: js, branch: trunk, size: 10620 [annotate] [blame] [check-ins using] [diff]
2013-09-17
14:14
Only compare with PTHREAD_CANCELED if defined. file: [e8db192b1b] check-in: [2ac6cc1247] user: js, branch: trunk, size: 10614 [annotate] [blame] [check-ins using] [diff]
2013-05-13
16:12
Get rid of a type warning on win32. file: [e79bb60b2e] check-in: [3e91cf6cef] user: js, branch: trunk, size: 10560 [annotate] [blame] [check-ins using] [diff]
2013-04-30
22:29
threading.h: Add of_condition_timed_wait(). file: [165753d14b] check-in: [e139086f33] user: js, branch: trunk, size: 10563 [annotate] [blame] [check-ins using] [diff]
2013-03-14
19:25
Add a few memory barriers. file: [49f79a338f] check-in: [27138ee85b] user: js, branch: trunk, size: 9888 [annotate] [blame] [check-ins using] [diff]
2013-03-04
17:20
Replace BOOL with bool.

The only places where BOOL is left are those where they are required by
the ABI. file: [c5163894df] check-in: [c5ef582958] user: js, branch: trunk, size: 9871 [annotate] [blame] [check-ins using] [diff]

2013-01-12
20:53
Clean up the feature #ifdef mess. file: [ba948db4c9] check-in: [b8ce2359f3] user: js, branch: trunk, size: 9770 [annotate] [blame] [check-ins using] [diff]
2013-01-09
22:24
Update copyright. file: [f6862f572a] check-in: [813c00ccf0] user: js, branch: trunk, size: 9729 [annotate] [blame] [check-ins using] [diff]
2012-08-19
21:27
Don't use main as variable name. file: [250a513bc4] check-in: [43e45e2364] user: js, branch: trunk, size: 9723 [annotate] [blame] [check-ins using] [diff]
21:27
Add more ARC type qualifiers. file: [e7e86967b9] check-in: [bab9dd49fe] user: js, branch: trunk, size: 9711 [annotate] [blame] [check-ins using] [diff]
2012-08-05
17:34
Add OFRecursiveMutex class. file: [a1aae6b58b] check-in: [6069030651] user: js, branch: trunk, size: 9693 [annotate] [blame] [check-ins using] [diff]
17:22
Use recursive pthread mutexes if available. file: [aa1078d8fa] check-in: [1e10b33066] user: js, branch: trunk, size: 9248 [annotate] [blame] [check-ins using] [diff]
10:45
Add of_rmutex_t, a reentrant mutex implementation. file: [f15e1e67ea] check-in: [1cb3d9fef9] user: js, branch: trunk, size: 8655 [annotate] [blame] [check-ins using] [diff]
2012-07-14
20:38
Let of_tlskey_* use void* instead of id. file: [47f623ac86] check-in: [e379516a39] user: js, branch: trunk, size: 7475 [annotate] [blame] [check-ins using] [diff]
2012-01-05
00:56
Update copyright. file: [3fbabbb84b] check-in: [ce70e17b38] user: js, branch: trunk, size: 7618 [annotate] [blame] [check-ins using] [diff]
2011-10-22
16:14
Define of_thread_current without the ().
This way, it's possible to get a pointer to the actual function.
file: [c9df66742a] check-in: [376cff4c0b] user: js, branch: trunk, size: 7612 [annotate] [blame] [check-ins using] [diff]
2011-05-29
21:47
Inline of_condition_* on Win32 as well to prevent warnings. file: [e3a63de0b8] check-in: [a1c5b19c7c] user: js, branch: trunk, size: 7620 [annotate] [blame] [check-ins using] [diff]
2011-04-23
00:11
More style improvements. file: [ffa37b7f10] check-in: [d8c31454b4] user: js, branch: trunk, size: 7833 [annotate] [blame] [check-ins using] [diff]
2011-04-21
11:19
Merge a few changes from default branch to 0.5 branch.

Changesets:
* 8a0cee0e7fb2
* e9f5dda18648
* 38b1ce72bd0b
* c09dc6f82884
* e193cd04a3df file: [ed61fa08de] check-in: [e1b8152dd9] user: js, branch: 0.5, size: 7802 [annotate] [blame] [check-ins using] [diff]

2011-04-12
14:51
Use void in declarations when we take no parameters. file: [c1d87def31] check-in: [c02e48e140] user: js, branch: trunk, size: 7680 [annotate] [blame] [check-ins using] [diff]
12:43
Detach threads when we never joined them. file: [d7813d4c61] check-in: [70b77b9b3a] user: js, branch: trunk, size: 7676 [annotate] [blame] [check-ins using] [diff]
2011-04-11
00:37
A few readability improvements. file: [b5ecf36784] check-in: [e52ccc8d45] user: js, branch: trunk, size: 7494 [annotate] [blame] [check-ins using] [diff]
2011-03-17
20:33
Use Sleep(0) instead of yield() on Win32. file: [ad9f8119e0] check-in: [eb827e8f21] user: js, branch: trunk, size: 7620 [annotate] [blame] [check-ins using] [diff]
2011-03-11
12:15
Implement conditions for win32. file: [33ef5dc30b] check-in: [b5e6a49dca] user: js, branch: trunk, size: 7549 [annotate] [blame] [check-ins using] [diff]
2011-03-07
15:39
Add abstraction for conditions.

No support for Win32 yet, as we will need our own implementation of
conditions there. file: [0b981f818f] check-in: [f771ddda2d] user: js, branch: trunk, size: 6861 [annotate] [blame] [check-ins using] [diff]

2011-01-01
20:19
Change license. file: [f35468bbe4] check-in: [da6b3d26cb] user: js, branch: trunk, size: 5824 [annotate] [blame] [check-ins using] [diff]
2010-12-28
22:18
Make ObjFW work again without threads and without atomic ops. file: [024109a4fb] check-in: [88c920bd62] user: js, branch: trunk, size: 5568 [annotate] [blame] [check-ins using] [diff]
2010-11-06
11:40
Improve spinlock implementation. file: [707f139f43] check-in: [1edd5313ae] user: js, branch: trunk, size: 5544 [annotate] [blame] [check-ins using] [diff]
2010-06-27
12:21
Fix a wrong typedef in threading.h. file: [1fc17ada35] check-in: [e45069a556] user: js, branch: trunk, size: 5413 [annotate] [blame] [check-ins using] [diff]
2010-04-10
21:29
Greatly improve OFThread.
This fixes a lot of issues that happened in the real world.
file: [49e86ee69a] check-in: [ea96fd1e24] user: js, branch: trunk, size: 5418 [annotate] [blame] [check-ins using] [diff]
2010-03-05
11:52
Merge a few changesets from the default branch into the 0.2 branch.

Changesets:
* b95fcaa6d694
* 804c68d222b4
* da8cd738da3d
* 1109d5ce3419
* d03f5c1ca95d
* 2a7017722165
* 4fccdc79eeb7
* d228149fbc04
* 8782d412a4a6 file: [0b6953b2d5] check-in: [b91a8283fe] user: js, branch: 0.2, size: 5555 [annotate] [blame] [check-ins using] [diff]

2010-02-19
16:36
Update copyright. file: [ce91e6e1f3] check-in: [42886185fd] user: js, branch: trunk, size: 5555 [annotate] [blame] [check-ins using] [diff]
2010-02-05
14:03
Rename of_atomic_*32 to of_atomic_*_32 and add of_atomic_cmpswap_ptr. file: [d98a519a69] check-in: [4e1ab53403] user: js, branch: trunk, size: 5555 [annotate] [blame] [check-ins using] [diff]
2010-02-02
18:58
Rename OFMacros.h to macros.h, as it's not a class. file: [f03917fe6f] check-in: [832188d759] user: js, branch: trunk, size: 5553 [annotate] [blame] [check-ins using] [diff]
2010-02-01
14:20
More secure way to unlock spinlocks. file: [bf0ea6d5c4] check-in: [cb6e353487] user: js, branch: trunk, size: 5555 [annotate] [blame] [check-ins using] [diff]
2010-01-31
22:05
Small optimization. file: [b78d28aec0] check-in: [305317e5ea] user: js, branch: trunk, size: 5529 [annotate] [blame] [check-ins using] [diff]
2010-01-30
14:14
Fix missing includes and typos. file: [ec6d801a5e] check-in: [35f59c61c6] user: js, branch: trunk, size: 5526 [annotate] [blame] [check-ins using] [diff]
02:09
Replace some macros with OF_INLINE functions.
This way, there won't be a warning about unused results.
file: [27e884cfec] check-in: [839f45a293] user: js, branch: trunk, size: 5525 [annotate] [blame] [check-ins using] [diff]
01:17
Change spinlock implementation, add fallbacks and move to threading.h. file: [f8a41f877f] check-in: [921b158d17] user: js, branch: trunk, size: 5154 [annotate] [blame] [check-ins using] [diff]
00:50
Add -[tryLock] to OFMutex. file: [118d170b8a] check-in: [20e1c0e24b] user: js, branch: trunk, size: 4020 [annotate] [blame] [check-ins using] [diff]
2010-01-29
19:29
Introduce OF_HAVE_PTHREADS define instead of #ifndef _WIN32. file: [d9ecd3df92] check-in: [d08376bc1f] user: js, branch: trunk, size: 3794 [annotate] [blame] [check-ins using] [diff]
2009-12-09
18:43
Indent defines and imports where it is useful. file: [0ccf73f4cd] check-in: [66f6ca045c] user: js, branch: trunk, size: 3277 [annotate] [blame] [check-ins using] [diff]
2009-11-14
12:17
New solution for TLS key destructors that works on any OS. file: [04a0546353] check-in: [12101c192f] user: js, branch: trunk, size: 3273 [annotate] [blame] [check-ins using] [diff]
2009-11-13
18:53
Resolve more FIXMEs. file: [44dc680850] check-in: [f1637e9310] user: js, branch: trunk, size: 3349 [annotate] [blame] [check-ins using] [diff]
2009-11-09
22:45
Rename libobjfw to ObjFW. file: [7b407a5ba1] check-in: [a3cc34b139] user: js, branch: trunk, size: 3230 [annotate] [blame] [check-ins using] [diff]
2009-09-21
20:35
A few minor Win32 fixes. file: [6c98cd6b3a] check-in: [59969f5450] user: js, branch: trunk, size: 3233 [annotate] [blame] [check-ins using] [diff]
11:15
Added: Move platform-specific threading stuff to threading.h. file: [fc8a803188] check-in: [15a67e8ee5] user: js, branch: trunk, size: 3230 [annotate] [blame] [check-ins using]