summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-09-22gvalue: Add explicitly signed g_value_get_schar() and g_value_set_schar()Colin Walters11-12/+83
The documentation for G_TYPE_CHAR says: "The type designated by G_TYPE_CHAR is unconditionally an 8-bit signed integer." However the return value for g_value_get_char() was just "char" which in C has an unspecified signedness; on e.g. x86 it's signed (which matches the GType), but on e.g. PowerPC or ARM, it's not. We can't break the old API, so we need to suck it up and add new API. Port most internal users, but keep some tests of the old API too. https://bugzilla.gnome.org/show_bug.cgi?id=659870
2011-09-22tests: Add a some torture test cases for the generic marshallerColin Walters1-0/+136
In particular this has a test case for a G_TYPE_ENUM which we were running into a failure on ppc64. https://bugzilla.gnome.org/show_bug.cgi?id=659881
2011-09-22Add gthread.h to deprecated headersRyan Lortie1-3/+3
...not deprecated sources
2011-09-22Fix annotations for source/target in g_object_bind_property_*Emmanuele Bassi1-6/+6
We use gpointer for convience of the C API users, but introspection users will not like it. https://bugzilla.gnome.org/show_bug.cgi?id=659838
2011-09-22Updated Oriya TranslationManoj Kumar Giri1-121/+156
2011-09-22Some gthread doc updatesMatthias Clasen1-69/+100
Marking things as deprecated, mostly.
2011-09-22Use adaptive mutexes when availableMatthias Clasen2-1/+16
These are supposedly better on multi-cpu systems - and who doesn't have multiple cpus nowadays. One single-processor systems, they are identical to normal mutexes. See e.g. http://bugzilla.mozilla.org/show_bug.cgi?id=132089 https://bugzilla.gnome.org/show_bug.cgi?id=659423
2011-09-21GDateTime test: fix a raceRyan Lortie1-1/+1
We have a GDateTime test that compares the time now (as per the libc) to the time now (as per GDateTime). The problem is that the time could change between those two "now"s.
2011-09-21gslice: remove single-threaded caseRyan Lortie1-31/+4
GPrivate always works, so use it normally at all times.
2011-09-22GMappedFile: Add API to create from an existing file descriptorPhilip Van Hoof4-62/+164
At Tracker we want to mmap files using O_NOATIME. With GMappedFile this is at the moment impossible. For that reason I added the constructor new_from_fd to the GMappedFile type. https://bugzilla.gnome.org/show_bug.cgi?id=659754
2011-09-21Deprecate GStatic{,Rec,RW}MutexRyan Lortie2-65/+65
The new versions use the primatives of the OS directly and don't have an annoying ABI.
2011-09-21gtype: port from GStaticRWLock to GRWLockRyan Lortie1-9/+9
2011-09-21Port internal GStaticRecMutex users to GRecMutexRyan Lortie4-46/+46
2011-09-21Add a new recursive mutex type, GRecMutexRyan Lortie4-0/+158
This is implemented using the native facilities of each platform instead of manually.
2011-09-21Add GRWLockRyan Lortie5-3/+133
2011-09-21gthread: remove impl init functionsRyan Lortie4-33/+6
2011-09-21win32: Add 'shared' support to SRWLock emulationRyan Lortie1-0/+108
2011-09-21gthread-win32: trivial condition changeRyan Lortie1-1/+4
Make another do-nothing change to the SRWLock emulation.
2011-09-21gthread-win32: rename a struct memberRyan Lortie1-6/+6
Our SRWLock is about to become a real reader/writer lock, so rename an instance variable to prepare for that.
2011-09-21gthread.h: remove some bogus decl/commentsRyan Lortie1-10/+0
These are no longer relevent since the possibility of a thread-disabled GLib disappeared.
2011-09-21Revert "Drop an unused variable"Ryan Lortie1-0/+1
This reverts commit c7f9cd17d446938aaf4126e0753302676f66fd22. The old macros in gthread.h used this variable, so it must remain in place to keep ABI compatibility.
2011-09-21Drop an unused variableMatthias Clasen1-1/+0
2011-09-21More header cosmeticsMatthias Clasen1-18/+18
2011-09-21trivial: small header reorderingMatthias Clasen1-5/+4
2011-09-21Move some things to deprecated/gthread.hRyan Lortie5-83/+118
2011-09-21g_thread_init: take a gpointer as the argRyan Lortie2-3/+3
GThreadFunctions is about to disappear.
2011-09-21disable glib-ctor on win32Ryan Lortie1-1/+1
2011-09-21Deprecate g_thread_create_full()Ryan Lortie5-20/+68
Replace it with g_thread_create_with_stack_size() and a real function implementation of g_thread_create(). Modify a testcase that was calling g_thread_create_full() inappropriately (it was using the default values anyway).
2011-09-21Drop g_thread_fail()Ryan Lortie1-7/+0
This is now unused.
2011-09-21g_system_thread_create: drop unused argsRyan Lortie4-7/+1
The 'bound' and 'priority' arguments are no longer in use, so drop them.
2011-09-21Remove the concept of 'bound'Ryan Lortie2-14/+3
This was ignored on Windows. On POSIX, where supported, it controlled if we ended up with a proper system thread or a user-mode thread. Linux did not support this.
2011-09-21Remove a leftover from errorcheck mutexesMatthias Clasen1-3/+0
2011-09-21Remove g_thread_functions_for_glib_use_oldRyan Lortie1-39/+0
This has been unused for a while and it should definitely go away now that g_thread_functions_for_glib_use is back in gthread.c.
2011-09-21Merge g_thread_functions_for_glib_useRyan Lortie3-50/+25
Move the now-identical copies of g_thread_functions_for_glib_use from gthread-{posix,win32}.c back into gthread.c.
2011-09-21gthread.h: drop the vtable access macrosRyan Lortie1-14/+0
We're finally free of these. Drop them.
2011-09-21NULL g_system_thread_{exit,equal} in the vtableRyan Lortie2-4/+4
These were never used from gthread.h and are no longer used from gthread.c.
2011-09-21GSystemThread: port 'self' 'join' and 'create'Ryan Lortie4-41/+51
Switch 'self' 'join' and 'create' from using the vtable to being called via normal g_system_thread_* internal API (implemented in each of gthread-{posix,win32}.c). Again, we can put NULL in the vtable since these were never used from gthread.h.
2011-09-21GThread: deprecate thread prioritiesRyan Lortie4-191/+22
Thread priorities were already documented as not working on Solaris, and they are meaningless on Linux unless the process separately requests realtime scheduling (and even then, it appears only to work as root). We can safely put a NULL into the vtable for set_priority since nothing outside of gthread.c ever calls this (and that call is gone).
2011-09-21Don't use the thread_exit vfuncMatthias Clasen4-13/+14
Instead, just have the backends implement an internal function named g_system_thread_exit.
2011-09-21Don't use the thread_equal vfunc anymoreMatthias Clasen4-17/+18
Just move the g_system_thread_equal implementation into the posix and win32 implementations, and drop some micro macro optimization.
2011-09-21gthread-win32: use __stdcall markers where neededRyan Lortie1-32/+29
The "unknown reason" that the native thread implementation was broken is because functions in kernel32.dll are (obviously) following Microsoft's __stdcall ABI, not the GCC ABI. Change our function pointers to be __stdcall pointers and change our emulated implementation to match.
2011-09-21g_private_new: use GSliceRyan Lortie1-1/+1
We no longer call g_private_new() from anywhere in GLib, so we can use gslice instead of malloc().
2011-09-21And move the g_thread_yield() docs tooMatthias Clasen1-0/+9
2011-09-21Don't use the thread vtable for g_thread_yield()Matthias Clasen3-21/+6
2011-09-21Move g_private_new() to common codeMatthias Clasen3-52/+37
The implementations for posix and win32 were identical, so move it to gthread.c, to go with g_mutex_new() and g_cond_new().
2011-09-21Move docs aroundMatthias Clasen2-222/+290
Move the docs of functions to the actual functions. Also add docs for some new apis.
2011-09-21Clean up g_thread_yield implementationMatthias Clasen4-13/+19
This was the last macro wrapper that was directly accessing the vtable. Make it a regular function, like the rest.
2011-09-21gmem: move to glib-ctorRyan Lortie3-72/+47
2011-09-21gslice: move initialisation to glib-ctorRyan Lortie3-27/+5
2011-09-21Add glib-ctor functionalityRyan Lortie2-0/+26
A pair of macros to define a constructor function (on compilers that support such a concept) and to ensure that the function is run exactly once (on compilers that lack such support). Presently only GCC is implemented.