* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
/*
#include "config.h"
#include "glib.h"
+#include "glib-init.h"
#include "gthread.h"
#include "gthreadprivate.h"
#include "gslice.h"
gint64 end_time)
{
gint64 span;
- FILETIME ft;
- gint64 now;
- GetSystemTimeAsFileTime (&ft);
- memmove (&now, &ft, sizeof (FILETIME));
-
- now -= G_GINT64_CONSTANT (116444736000000000);
- now /= 10;
-
- span = end_time - now;
+ span = end_time - g_get_monotonic_time ();
if G_UNLIKELY (span < 0)
span = 0;
EnterCriticalSection (&g_thread_xp_lock);
if (waiter->my_owner)
{
+ if (waiter->next)
+ waiter->next->my_owner = waiter->my_owner;
+ else
+ cv->last_ptr = waiter->my_owner;
*waiter->my_owner = waiter->next;
waiter->my_owner = NULL;
}
waiter = cv->first;
if (waiter != NULL)
{
+ waiter->my_owner = NULL;
cv->first = waiter->next;
if (cv->first != NULL)
cv->first->my_owner = &cv->first;
return TRUE;
}
-G_GNUC_INTERNAL void
+void
g_thread_win32_init (void)
{
if (!g_thread_lookup_native_funcs ())
InitializeCriticalSection (&g_private_lock);
}
-G_GNUC_INTERNAL void
+void
g_thread_win32_thread_detach (void)
{
gboolean dtors_called;