summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/wine/files/wine-1.7.1-KUSER_SHARED_DATA_18.patch')
-rw-r--r--app-emulation/wine/files/wine-1.7.1-KUSER_SHARED_DATA_18.patch139
1 files changed, 0 insertions, 139 deletions
diff --git a/app-emulation/wine/files/wine-1.7.1-KUSER_SHARED_DATA_18.patch b/app-emulation/wine/files/wine-1.7.1-KUSER_SHARED_DATA_18.patch
deleted file mode 100644
index 8effafc..0000000
--- a/app-emulation/wine/files/wine-1.7.1-KUSER_SHARED_DATA_18.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-http://bugs.winehq.org/show_bug.cgi?id=29168
-Star Wars: The Old Republic game client hangs at intro splash
-
-Generated from wine-1.7.13
---- a/dlls/ntdll/thread.c
-+++ b/dlls/ntdll/thread.c
-@@ -23,6 +23,10 @@
-
- #include <assert.h>
- #include <stdarg.h>
-+
-+#include <stdint.h>
-+#include <errno.h>
-+
- #include <sys/types.h>
- #ifdef HAVE_SYS_MMAN_H
- #include <sys/mman.h>
-@@ -69,6 +73,73 @@
- static RTL_BITMAP fls_bitmap;
- static int nb_threads = 1;
-
-+
-+
-+static void update_shared_data_time(void)
-+{
-+ LARGE_INTEGER now, start, irq;
-+
-+ NtQuerySystemTime( &now );
-+
-+ //FIXME("%lld\n", now.QuadPart);
-+
-+ irq.QuadPart = (now.QuadPart - server_start_time);
-+
-+ user_shared_data->InterruptTime.High2Time = irq.HighPart;
-+ user_shared_data->InterruptTime.LowPart = irq.LowPart;
-+ user_shared_data->InterruptTime.High1Time = irq.HighPart;
-+
-+ user_shared_data->SystemTime.High2Time = now.HighPart;
-+ user_shared_data->SystemTime.LowPart = now.LowPart;
-+ user_shared_data->SystemTime.High1Time = now.HighPart;
-+
-+ start.QuadPart = irq.QuadPart / 10000;
-+
-+ user_shared_data->u.TickCount.High2Time = start.HighPart;
-+ user_shared_data->u.TickCount.LowPart = start.LowPart;
-+ user_shared_data->u.TickCount.High1Time = start.HighPart;
-+ user_shared_data->TickCountLowDeprecated = start.LowPart;
-+}
-+
-+static void add_timespec(struct timespec* dst, struct timespec* arg)
-+{
-+ dst->tv_sec += arg->tv_sec;
-+ dst->tv_nsec += arg->tv_nsec;
-+
-+ if(dst->tv_nsec > 999999999) {
-+ dst->tv_nsec -= 1000000000;
-+ dst->tv_sec++;
-+ }
-+}
-+
-+static void* shared_data_thread(void *thread_arg)
-+{
-+ struct timespec start, arg;
-+ int e;
-+
-+ e = clock_gettime(CLOCK_MONOTONIC, &start);
-+ if(e) {
-+ FIXME("Unable to get starting time: %s (%d)\n", strerror(errno), errno);
-+ return NULL;
-+ }
-+
-+ arg.tv_sec = 0;
-+ arg.tv_nsec = 15600000;
-+
-+ while(1) {
-+ update_shared_data_time();
-+ add_timespec(&start, &arg);
-+ e = clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &start, NULL);
-+ if(e) {
-+ FIXME("clock_nanosleep failed: %s (%d)\n", strerror(e), e);
-+ }
-+ }
-+
-+ return NULL;
-+}
-+
-+
-+
- /***********************************************************************
- * get_unicode_string
- *
-@@ -215,11 +286,14 @@
- void *addr;
- SIZE_T size, info_size;
- HANDLE exe_file = 0;
-- LARGE_INTEGER now;
-+ // LARGE_INTEGER now;
- NTSTATUS status;
- struct ntdll_thread_data *thread_data;
- static struct debug_info debug_info; /* debug info for initial thread */
-
-+ pthread_t thread;
-+ int s;
-+
- virtual_init();
-
- /* reserve space for shared user data */
-@@ -316,18 +390,30 @@
- }
-
- /* initialize time values in user_shared_data */
-- NtQuerySystemTime( &now );
-+ /* NtQuerySystemTime( &now );
- user_shared_data->SystemTime.LowPart = now.u.LowPart;
- user_shared_data->SystemTime.High1Time = user_shared_data->SystemTime.High2Time = now.u.HighPart;
- user_shared_data->u.TickCountQuad = (now.QuadPart - server_start_time) / 10000;
- user_shared_data->u.TickCount.High2Time = user_shared_data->u.TickCount.High1Time;
- user_shared_data->TickCountLowDeprecated = user_shared_data->u.TickCount.LowPart;
-+ */
-+
- user_shared_data->TickCountMultiplier = 1 << 24;
-+
-+ update_shared_data_time();
-
- fill_cpu_info();
-
- NtCreateKeyedEvent( &keyed_event, GENERIC_READ | GENERIC_WRITE, NULL, 0 );
-
-+ if(!(s = pthread_create(&thread, NULL, &shared_data_thread, NULL))) {
-+ if(pthread_detach(thread))
-+ FIXME("Unable to detach thread\n");
-+ } else {
-+ FIXME("unable to spawn thread: %s (%d)\n", strerror(s), s);
-+ }
-+
-+
- return exe_file;
- }
-