summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_tape.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2008-07-15 11:42:45 +0000
committerCorinna Vinschen <corinna@vinschen.de>2008-07-15 11:42:45 +0000
commit80f6f52cb1e673a5196cc18de0a4bfb1f492b80d (patch)
treece9d656994cf57ee39f9cbc02f9f0ce8089dfe1d /winsup/cygwin/fhandler_tape.cc
parentdc4b5caedcd9f461900b9dfe53c1d7c59aa4cd82 (diff)
downloadcygnal-80f6f52cb1e673a5196cc18de0a4bfb1f492b80d.tar.gz
cygnal-80f6f52cb1e673a5196cc18de0a4bfb1f492b80d.tar.bz2
cygnal-80f6f52cb1e673a5196cc18de0a4bfb1f492b80d.zip
* fhandler_tape.cc (mtinfo::initialize): Remove synchronization stuff.
Just initialize drive data. * mtinfo.h (MTINFO_MAGIC): Remove. (MTINFO_VERSION): Remove. (class mtinfo): Remove magic and version members. * shared.cc (shared_info::initialize): Move call to get_session_parent_dir so that the dir creation is only called once. Move call to mt.initialize so that it's called only by the first process creating the shared memory. * shared_info.h (SHARED_INFO_CB): Accommodate change to shared_info. (CURR_SHARED_MAGIC): Ditto. (class shared_info): Add obcaseinsensitivity member.
Diffstat (limited to 'winsup/cygwin/fhandler_tape.cc')
-rw-r--r--winsup/cygwin/fhandler_tape.cc32
1 files changed, 4 insertions, 28 deletions
diff --git a/winsup/cygwin/fhandler_tape.cc b/winsup/cygwin/fhandler_tape.cc
index 9b8dca220..593d26cf0 100644
--- a/winsup/cygwin/fhandler_tape.cc
+++ b/winsup/cygwin/fhandler_tape.cc
@@ -1,7 +1,8 @@
/* fhandler_tape.cc. See fhandler.h for a description of the fhandler
classes.
- Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
+ Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+ 2008 Red Hat, Inc.
This file is part of Cygwin.
@@ -1125,33 +1126,8 @@ mtinfo_drive::ioctl (HANDLE mt, unsigned int cmd, void *buf)
void
mtinfo::initialize ()
{
- char name[MAX_PATH];
- HANDLE mtx;
-
- shared_name (name, "mtinfo_mutex", 0);
- if (!(mtx = CreateMutex (&sec_all_nih, FALSE, name)))
- api_fatal ("CreateMutex '%s', %E. Terminating.", name);
- WaitForSingleObject (mtx, INFINITE);
- if (!magic)
- {
- magic = MTINFO_MAGIC;
- version = MTINFO_VERSION;
- for (unsigned i = 0; i < MAX_DRIVE_NUM; ++i)
- drive (i)->initialize (i, true);
- ReleaseMutex (mtx);
- CloseHandle (mtx);
- }
- else
- {
- ReleaseMutex (mtx);
- CloseHandle (mtx);
- if (magic != MTINFO_MAGIC)
- api_fatal ("MT magic number screwed up: %lu, should be %lu",
- magic, MTINFO_MAGIC);
- if (version != MTINFO_VERSION)
- system_printf ("MT version number mismatch: %lu, should be %lu",
- version, MTINFO_VERSION);
- }
+ for (unsigned i = 0; i < MAX_DRIVE_NUM; ++i)
+ drive (i)->initialize (i, true);
}
/**********************************************************************/