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.
+2008-07-15 Corinna Vinschen <corinna@vinschen.de>
+
+ * 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.
+
2008-07-14 Corinna Vinschen <corinna@vinschen.de>
* fhandler.cc (fhandler_base::fpathconf): On _PC_POSIX_PERMISSIONS
/* 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.
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);
}
/**********************************************************************/
/* mtinfo.h: Defininitions for the Cygwin tape driver class.
- Copyright 2004, 2005, 2006 Red Hat, Inc.
+ Copyright 2004, 2005, 2006, 2008 Red Hat, Inc.
This file is part of Cygwin.
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
-#define MTINFO_MAGIC 0x179b2af0
-#define MTINFO_VERSION 2
-
/* Maximum number of supported partitions per drive. */
#define MAX_PARTITION_NUM 64
/* Maximum number of supported drives. */
class mtinfo
{
- DWORD magic;
- DWORD version;
mtinfo_drive _drive[MAX_DRIVE_NUM];
public:
}
heap_init ();
+ get_session_parent_dir (); /* Create session dir if first process. */
if (!sversion)
{
tty.init (); /* Initialize tty table. */
+ mt.initialize (); /* Initialize shared tape information. */
cb = sizeof (*this); /* Do last, after all shared memory initialization */
}
- mt.initialize (); /* Initialize shared tape information. */
-
- get_session_parent_dir (); /* Create session dir if first process. */
-
if (cb != SHARED_INFO_CB)
system_printf ("size of shared memory region changed from %u to %u",
SHARED_INFO_CB, cb);
cygwin_version.api_minor)
#define SHARED_VERSION_MAGIC CYGWIN_VERSION_MAGIC (SHARED_MAGIC, SHARED_VERSION)
-#define SHARED_INFO_CB 31144
+#define SHARED_INFO_CB 31136
-#define CURR_SHARED_MAGIC 0xbc77afb0U
+#define CURR_SHARED_MAGIC 0xace17c0fU
/* NOTE: Do not make gratuitous changes to the names or organization of the
below class. The layout is checksummed to determine compatibility between
DWORD sys_mount_table_counter;
tty_list tty;
LONG last_used_bindresvport;
+ DWORD obcaseinsensitivity;
mtinfo mt;
void initialize ();