Skip to content

Commit

Permalink
The rest of the guint32 -> gsize thread ID changes, merged from head.
Browse files Browse the repository at this point in the history
svn path=/branches/mono-1-1-7/mono/; revision=60785
  • Loading branch information
dickp committed May 17, 2006
1 parent e7a9cf4 commit 3356b8e
Show file tree
Hide file tree
Showing 11 changed files with 83 additions and 93 deletions.
3 changes: 2 additions & 1 deletion mono/metadata/appdomain.c
Expand Up @@ -1255,7 +1255,8 @@ static void
mono_domain_unload (MonoDomain *domain)
{
HANDLE thread_handle;
guint32 tid, res;
gsize tid;
guint32 res;
MonoAppDomainState prev_state;
MonoMethod *method;
MonoObject *exc;
Expand Down
4 changes: 2 additions & 2 deletions mono/metadata/appdomain.h
Expand Up @@ -16,9 +16,9 @@
#include <mono/metadata/reflection.h>
#include <mono/metadata/mempool.h>

typedef void (*MonoThreadStartCB) (guint32 tid, gpointer stack_start,
typedef void (*MonoThreadStartCB) (gsize tid, gpointer stack_start,
gpointer func);
typedef void (*MonoThreadAttachCB) (guint32 tid, gpointer stack_start);
typedef void (*MonoThreadAttachCB) (gsize tid, gpointer stack_start);

typedef struct _MonoAppDomain MonoAppDomain;
typedef struct _MonoJitInfo MonoJitInfo;
Expand Down
2 changes: 1 addition & 1 deletion mono/metadata/mono-debug-debugger.h
Expand Up @@ -62,7 +62,7 @@ struct _MonoDebuggerIOLayer
gpointer (*CreateThread) (WapiSecurityAttributes *security,
guint32 stacksize, WapiThreadStart start,
gpointer param, guint32 create, guint32 *tid);
guint32 (*GetCurrentThreadId) (void);
gsize (*GetCurrentThreadId) (void);
};

extern MonoDebuggerIOLayer mono_debugger_io_layer;
Expand Down
2 changes: 1 addition & 1 deletion mono/metadata/object-internals.h
Expand Up @@ -227,7 +227,7 @@ struct _MonoThread {
guint32 state;
MonoException *abort_exc;
MonoObject *abort_state;
guint32 tid;
guint64 tid; /* This is accessed as a gsize in the code (so it can hold a 64bit pointer on systems that need it), but needs to reserve 64 bits of space on all machines as it corresponds to a field in managed code */
HANDLE start_notify;
gpointer stack_ptr;
gpointer *static_data;
Expand Down
2 changes: 1 addition & 1 deletion mono/metadata/object.c
Expand Up @@ -321,7 +321,7 @@ void
mono_release_type_locks (MonoThread *thread)
{
EnterCriticalSection (&type_initialization_section);
g_hash_table_foreach_remove (type_initialization_hash, release_type_locks, GUINT_TO_POINTER (thread->tid));
g_hash_table_foreach_remove (type_initialization_hash, release_type_locks, (gpointer)(gsize) (thread->tid));
LeaveCriticalSection (&type_initialization_section);
}

Expand Down
4 changes: 2 additions & 2 deletions mono/metadata/profiler-private.h
Expand Up @@ -31,8 +31,8 @@ void mono_profiler_method_end_jit (MonoMethod *method, int result);
void mono_profiler_code_transition (MonoMethod *method, int result);
void mono_profiler_allocation (MonoObject *obj, MonoClass *klass);
void mono_profiler_stat_hit (guchar *ip, void *context);
void mono_profiler_thread_start (guint32 tid);
void mono_profiler_thread_end (guint32 tid);
void mono_profiler_thread_start (gsize tid);
void mono_profiler_thread_end (gsize tid);

void mono_profiler_assembly_event (MonoAssembly *assembly, int code);
void mono_profiler_assembly_loaded (MonoAssembly *assembly, int result);
Expand Down
4 changes: 2 additions & 2 deletions mono/metadata/profiler.c
Expand Up @@ -217,14 +217,14 @@ mono_profiler_stat_hit (guchar *ip, void *context)
}

void
mono_profiler_thread_start (guint32 tid)
mono_profiler_thread_start (gsize tid)
{
if ((mono_profiler_events & MONO_PROFILE_THREADS) && thread_start)
thread_start (current_profiler, tid);
}

void
mono_profiler_thread_end (guint32 tid)
mono_profiler_thread_end (gsize tid)
{
if ((mono_profiler_events & MONO_PROFILE_THREADS) && thread_end)
thread_end (current_profiler, tid);
Expand Down
2 changes: 1 addition & 1 deletion mono/metadata/profiler.h
Expand Up @@ -70,7 +70,7 @@ typedef void (*MonoProfileAssemblyResult) (MonoProfiler *prof, MonoAssembly *ass

typedef void (*MonoProfileMethodInline) (MonoProfiler *prof, MonoMethod *parent, MonoMethod *child, int *ok);

typedef void (*MonoProfileThreadFunc) (MonoProfiler *prof, guint32 tid);
typedef void (*MonoProfileThreadFunc) (MonoProfiler *prof, gsize tid);
typedef void (*MonoProfileAllocFunc) (MonoProfiler *prof, MonoObject *obj, MonoClass *klass);
typedef void (*MonoProfileStatFunc) (MonoProfiler *prof, guchar *ip, void *context);
typedef void (*MonoProfileGCFunc) (MonoProfiler *prof, MonoGCEvent event, int generation);
Expand Down

0 comments on commit 3356b8e

Please sign in to comment.