* bsd_helper.cc: Whitespace fixes.
* bsd_mutex.cc: Ditto.
This commit is contained in:
parent
325965583f
commit
96e949deaa
|
@ -1,3 +1,8 @@
|
||||||
|
2004-07-20 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* bsd_helper.cc: Whitespace fixes.
|
||||||
|
* bsd_mutex.cc: Ditto.
|
||||||
|
|
||||||
2004-07-19 Corinna Vinschen <corinna@vinschen.de>
|
2004-07-19 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* transport.cc (transport_layer_base::~transport_layer_base): Remove.
|
* transport.cc (transport_layer_base::~transport_layer_base): Remove.
|
||||||
|
|
|
@ -87,12 +87,12 @@ struct ipc_hookthread_storage {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ipc_hookthread {
|
struct ipc_hookthread {
|
||||||
SLIST_ENTRY(ipc_hookthread) sht_next;
|
SLIST_ENTRY (ipc_hookthread) sht_next;
|
||||||
HANDLE thread;
|
HANDLE thread;
|
||||||
DWORD winpid;
|
DWORD winpid;
|
||||||
struct vmspace vmspace;
|
struct vmspace vmspace;
|
||||||
};
|
};
|
||||||
static SLIST_HEAD(, ipc_hookthread) ipcht_list; /* list of hook threads */
|
static SLIST_HEAD (, ipc_hookthread) ipcht_list; /* list of hook threads */
|
||||||
|
|
||||||
static HANDLE ipcexit_event;
|
static HANDLE ipcexit_event;
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ ipc_p_vmspace (struct proc *proc)
|
||||||
}
|
}
|
||||||
|
|
||||||
static DWORD WINAPI
|
static DWORD WINAPI
|
||||||
ipcexit_hookthread(const LPVOID param)
|
ipcexit_hookthread (const LPVOID param)
|
||||||
{
|
{
|
||||||
ipc_hookthread_storage *shs = (ipc_hookthread_storage *) param;
|
ipc_hookthread_storage *shs = (ipc_hookthread_storage *) param;
|
||||||
HANDLE obj[2] = { ipcexit_event, shs->process_hdl };
|
HANDLE obj[2] = { ipcexit_event, shs->process_hdl };
|
||||||
|
@ -163,7 +163,7 @@ ipcexit_hookthread(const LPVOID param)
|
||||||
/* Deletes all pending hook threads. Called by ipcunload() which in turn
|
/* Deletes all pending hook threads. Called by ipcunload() which in turn
|
||||||
is called by the cygserver main routine. */
|
is called by the cygserver main routine. */
|
||||||
static void
|
static void
|
||||||
ipcexit_dispose_hookthreads(void)
|
ipcexit_dispose_hookthreads (void)
|
||||||
{
|
{
|
||||||
SetEvent (ipcexit_event);
|
SetEvent (ipcexit_event);
|
||||||
ipc_hookthread *ipcht_entry;
|
ipc_hookthread *ipcht_entry;
|
||||||
|
@ -180,7 +180,7 @@ ipcexit_dispose_hookthreads(void)
|
||||||
/* Creates the per process wait thread. Called by semget() under locked
|
/* Creates the per process wait thread. Called by semget() under locked
|
||||||
Giant mutex condition. */
|
Giant mutex condition. */
|
||||||
int
|
int
|
||||||
ipcexit_creat_hookthread(struct thread *td)
|
ipcexit_creat_hookthread (struct thread *td)
|
||||||
{
|
{
|
||||||
ipc_hookthread *ipcht_entry;
|
ipc_hookthread *ipcht_entry;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
@ -259,7 +259,7 @@ ipcinit ()
|
||||||
SetSecurityDescriptorDacl (&sec_all_nih_sd, TRUE, 0, FALSE);
|
SetSecurityDescriptorDacl (&sec_all_nih_sd, TRUE, 0, FALSE);
|
||||||
|
|
||||||
init_admin_sid ();
|
init_admin_sid ();
|
||||||
mtx_init(&Giant, "Giant", NULL, MTX_DEF);
|
mtx_init (&Giant, "Giant", NULL, MTX_DEF);
|
||||||
msleep_init ();
|
msleep_init ();
|
||||||
ipcexit_event = CreateEvent (NULL, TRUE, FALSE, NULL);
|
ipcexit_event = CreateEvent (NULL, TRUE, FALSE, NULL);
|
||||||
if (!ipcexit_event)
|
if (!ipcexit_event)
|
||||||
|
@ -276,7 +276,7 @@ ipcinit ()
|
||||||
int
|
int
|
||||||
ipcunload ()
|
ipcunload ()
|
||||||
{
|
{
|
||||||
ipcexit_dispose_hookthreads();
|
ipcexit_dispose_hookthreads ();
|
||||||
CloseHandle (ipcexit_event);
|
CloseHandle (ipcexit_event);
|
||||||
wakeup_all ();
|
wakeup_all ();
|
||||||
if (support_semaphores == TUN_TRUE)
|
if (support_semaphores == TUN_TRUE)
|
||||||
|
@ -284,8 +284,8 @@ ipcunload ()
|
||||||
if (support_sharedmem == TUN_TRUE)
|
if (support_sharedmem == TUN_TRUE)
|
||||||
shmunload ();
|
shmunload ();
|
||||||
if (support_msgqueues == TUN_TRUE)
|
if (support_msgqueues == TUN_TRUE)
|
||||||
msgunload();
|
msgunload ();
|
||||||
mtx_destroy(&Giant);
|
mtx_destroy (&Giant);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -466,7 +466,7 @@ vm_object_t
|
||||||
vm_object_duplicate (struct thread *td, vm_object_t object)
|
vm_object_duplicate (struct thread *td, vm_object_t object)
|
||||||
{
|
{
|
||||||
vm_object_t dup_object;
|
vm_object_t dup_object;
|
||||||
if (!DuplicateHandle(GetCurrentProcess (), object,
|
if (!DuplicateHandle (GetCurrentProcess (), object,
|
||||||
td->client->handle (), &dup_object,
|
td->client->handle (), &dup_object,
|
||||||
0, TRUE, DUPLICATE_SAME_ACCESS))
|
0, TRUE, DUPLICATE_SAME_ACCESS))
|
||||||
panic ("!DuplicateHandle in vm_object_duplicate failed, %E");
|
panic ("!DuplicateHandle in vm_object_duplicate failed, %E");
|
||||||
|
|
|
@ -49,17 +49,17 @@ mtx_owned (mtx *m)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_mtx_assert(mtx *m, int what, const char *file, int line)
|
_mtx_assert (mtx *m, int what, const char *file, int line)
|
||||||
{
|
{
|
||||||
switch (what)
|
switch (what)
|
||||||
{
|
{
|
||||||
case MA_OWNED:
|
case MA_OWNED:
|
||||||
if (!mtx_owned (m))
|
if (!mtx_owned (m))
|
||||||
_panic(file, line, "Mutex %s not owned", m->name);
|
_panic (file, line, "Mutex %s not owned", m->name);
|
||||||
break;
|
break;
|
||||||
case MA_NOTOWNED:
|
case MA_NOTOWNED:
|
||||||
if (mtx_owned (m))
|
if (mtx_owned (m))
|
||||||
_panic(file, line, "Mutex %s is owned", m->name);
|
_panic (file, line, "Mutex %s is owned", m->name);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue