#include <netinet/in.h>
#endif
#include <errno.h>
-#ifdef HAVE_STRING_H
#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
#include <lock.h>
#include <rx/xdr.h>
/* setup data and do write */
aopcode = htonl(aopcode);
code =
- (*adbase->write) (adbase, LOGFILE, &aopcode, ustat.size,
+ (*adbase->write) (adbase, LOGFILE, (char *)&aopcode, ustat.size,
sizeof(afs_int32));
if (code != sizeof(afs_int32))
return UIOERROR;
/* do write */
code =
- (*adbase->write) (adbase, LOGFILE, data, ustat.size,
+ (*adbase->write) (adbase, LOGFILE, (char *)data, ustat.size,
3 * sizeof(afs_int32));
if (code != 3 * sizeof(afs_int32))
return UIOERROR;
/* do write */
code =
- (*adbase->write) (adbase, LOGFILE, data, ustat.size,
+ (*adbase->write) (adbase, LOGFILE, (char *)data, ustat.size,
3 * sizeof(afs_int32));
if (code != 3 * sizeof(afs_int32))
return UIOERROR;
/* write header */
code =
- (*adbase->write) (adbase, LOGFILE, data, lpos, 4 * sizeof(afs_int32));
+ (*adbase->write) (adbase, LOGFILE, (char *)data, lpos, 4 * sizeof(afs_int32));
if (code != 4 * sizeof(afs_int32))
return UIOERROR;
lpos += 4 * sizeof(afs_int32);
if (!ap)
return;
- index = (ap - (char *)BufferData) >> UBIK_LOGPAGESIZE;
+ index = (int)(ap - (char *)BufferData) >> UBIK_LOGPAGESIZE;
bp = &(Buffers[index]);
bp->lockers--;
if (flag)
}
dbase->version.counter++; /* bump commit count */
+#ifdef AFS_PTHREAD_ENV
+ assert(pthread_cond_broadcast(&dbase->version_cond) == 0);
+#else
LWP_NoYieldSignal(&dbase->version);
-
+#endif
code = udisk_LogEnd(dbase, &dbase->version);
if (code) {
dbase->version.counter--;
free(atrans);
/* Wakeup any writers waiting in BeginTrans() */
+#ifdef AFS_PTHREAD_ENV
+ assert(pthread_cond_broadcast(&dbase->flags_cond) == 0);
+#else
LWP_NoYieldSignal(&dbase->flags);
+#endif
return 0;
}