mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 06:50:12 +00:00
INSTRUMENT-instrumentation-20070511
update
This commit is contained in:
parent
81df233168
commit
1011a0c8af
20
Makefile.in
20
Makefile.in
@ -568,6 +568,21 @@ libtrace_consumer: \
|
||||
$(NULL)
|
||||
${COMPILE_PART1} libtrace/consumer ${COMPILE_PART2}
|
||||
|
||||
#
|
||||
# libosi_trace_encoding build targets
|
||||
#
|
||||
libtrace_encoding_setup: config export
|
||||
src/config/config src/libtrace/encoding/MakefileProto.${MKAFS_OSTYPE} src/libtrace/encoding/Makefile ${SYS_NAME}
|
||||
|
||||
libtrace_encoding: \
|
||||
libtrace_encoding_setup \
|
||||
osi_depinstall \
|
||||
trace_depinstall \
|
||||
libosi \
|
||||
libtrace_common \
|
||||
$(NULL)
|
||||
${COMPILE_PART1} libtrace/encoding ${COMPILE_PART2}
|
||||
|
||||
#
|
||||
# libuafs build targets
|
||||
#
|
||||
@ -665,6 +680,7 @@ libtrace: \
|
||||
libtrace_common \
|
||||
libtrace_console \
|
||||
libtrace_consumer \
|
||||
libtrace_encoding \
|
||||
$(NULL)
|
||||
|
||||
traceserver: libosi libafsrpc libafsauthent libtrace
|
||||
@ -905,6 +921,7 @@ clean2:
|
||||
-${COMPILE_PART1} libtrace/common ${COMPILE_CLEAN}
|
||||
-${COMPILE_PART1} libtrace/console ${COMPILE_CLEAN}
|
||||
-${COMPILE_PART1} libtrace/consumer ${COMPILE_CLEAN}
|
||||
-${COMPILE_PART1} libtrace/encoding ${COMPILE_CLEAN}
|
||||
-${COMPILE_PART1} trace ${COMPILE_CLEAN}
|
||||
-${COMPILE_PART1} tests ${COMPILE_CLEAN}
|
||||
-${COMPILE_PART1} rxdebug ${COMPILE_CLEAN}
|
||||
@ -1022,6 +1039,9 @@ distclean: clean
|
||||
src/libtrace/consumer/Makefile \
|
||||
src/libtrace/consumer/Makefile.common \
|
||||
src/libtrace/consumer/Makefile.${MKAFS_OSTYPE} \
|
||||
src/libtrace/encoding/Makefile \
|
||||
src/libtrace/encoding/Makefile.common \
|
||||
src/libtrace/encoding/Makefile.${MKAFS_OSTYPE} \
|
||||
src/libuafs/Makefile \
|
||||
src/libuafs/Makefile.common \
|
||||
src/libuafs/MakefileProto.${MKAFS_OSTYPE} \
|
||||
|
50
acinclude.m4
50
acinclude.m4
@ -98,6 +98,30 @@ AC_ARG_ENABLE(debug-pam,
|
||||
AC_ARG_ENABLE(optimize-pam,
|
||||
[ --disable-optimize-pam disable optimization for compilation of the PAM code (defaults to enabled)],, enable_optimize_pam="yes"
|
||||
)
|
||||
AC_ARG_ENABLE(osi-debug-all,
|
||||
[ --enable-osi-debug-all enable all libosi debugging features (defaults to disabled)],, enable_osi_debug_all="no"
|
||||
)
|
||||
AC_ARG_ENABLE(osi-debug-assert,
|
||||
[ --enable-osi-debug-assert enable assertions at all osi_AssertDebug() points (defaults to disabled)],, enable_osi_debug_assert="no"
|
||||
)
|
||||
AC_ARG_ENABLE(osi-debug-inline,
|
||||
[ --enable-osi-debug-inline enable building all osi_inline() symbols as global symbols (defaults to disabled)],, enable_osi_debug_inline="no"
|
||||
)
|
||||
AC_ARG_ENABLE(osi-debug-mem-object-cache,
|
||||
[ --enable-osi-debug-mem-object-cache enable osi_mem_object_cache leak debugging (defaults to disabled)],, enable_osi_debug_mem_object_cache="no"
|
||||
)
|
||||
AC_ARG_ENABLE(osi-debug-lib-init,
|
||||
[ --enable-osi-debug-lib-init enable osi_lib_init debug messages (defaults to disabled)],, enable_osi_debug_lib_init="no"
|
||||
)
|
||||
AC_ARG_ENABLE(osi-debug-lib-fini,
|
||||
[ --enable-osi-debug-lib-fini enable osi_lib_fini debug messages (defaults to disabled)],, enable_osi_debug_lib_fini="no"
|
||||
)
|
||||
AC_ARG_ENABLE(osi-debug-vector,
|
||||
[ --enable-osi-debug-vector enable osi_vector debugging (defaults to disabled)],, enable_osi_debug_vector="no"
|
||||
)
|
||||
AC_ARG_ENABLE(osi-debug-heap,
|
||||
[ --enable-osi-debug-heap enable osi_heap debugging (defaults to disabled)],, enable_osi_debug_heap="no"
|
||||
)
|
||||
|
||||
|
||||
enable_login="no"
|
||||
@ -1129,6 +1153,32 @@ AC_SUBST(CTFMERGE_FLAGS)
|
||||
AC_SUBST(CTFCONVERT)
|
||||
AC_SUBST(CTFCONVERT_FLAGS)
|
||||
|
||||
if test "x$enable_osi_debug_all" = "xyes"; then
|
||||
AC_DEFINE(OSI_DEBUG_ALL, 1, [define if you want to enable all libosi debugging features])
|
||||
fi
|
||||
if test "x$enable_osi_debug_assert" = "xyes"; then
|
||||
AC_DEFINE(OSI_DEBUG_ASSERT, 1, [define if you want to enable osi_AssertDebug actions])
|
||||
fi
|
||||
if test "x$enable_osi_debug_inline" = "xyes"; then
|
||||
AC_DEFINE(OSI_DEBUG_INLINE, 1, [define if you want to enable building osi_inline interfaces as global symbols])
|
||||
fi
|
||||
if test "x$enable_osi_debug_mem_object_cache" = "xyes"; then
|
||||
AC_DEFINE(OSI_DEBUG_MEM_OBJECT_CACHE, 1, [define if you want to enable osi_mem_object_cache leak debugging])
|
||||
fi
|
||||
if test "x$enable_osi_debug_lib_init" = "xyes"; then
|
||||
AC_DEFINE(OSI_DEBUG_LIB_INIT, 1, [define if you want to enable osi_lib_init debug messages])
|
||||
fi
|
||||
if test "x$enable_osi_debug_lib_fini" = "xyes"; then
|
||||
AC_DEFINE(OSI_DEBUG_LIB_FINI, 1, [define if you want to enable osi_lib_fini debug messages])
|
||||
fi
|
||||
if test "x$enable_osi_debug_vector" = "xyes"; then
|
||||
AC_DEFINE(OSI_DEBUG_VECTOR, 1, [define if you want to enable osi_vector debugging])
|
||||
fi
|
||||
if test "x$enable_osi_debug_heap" = "xyes"; then
|
||||
AC_DEFINE(OSI_DEBUG_HEAP, 1, [define if you want to enable osi_heap debugging])
|
||||
fi
|
||||
|
||||
|
||||
if test "$enable_full_vos_listvol_switch" = "yes"; then
|
||||
AC_DEFINE(FULL_LISTVOL_SWITCH, 1, [define if you want to want listvol switch])
|
||||
fi
|
||||
|
10
configure.in
10
configure.in
@ -89,6 +89,8 @@ src/libtrace/console/Makefile.common \
|
||||
src/libtrace/console/MakefileProto.${MKAFS_OSTYPE} \
|
||||
src/libtrace/consumer/Makefile.common \
|
||||
src/libtrace/consumer/MakefileProto.${MKAFS_OSTYPE} \
|
||||
src/libtrace/encoding/Makefile.common \
|
||||
src/libtrace/encoding/MakefileProto.${MKAFS_OSTYPE} \
|
||||
src/libuafs/Makefile.common \
|
||||
src/libuafs/MakefileProto.${MKAFS_OSTYPE} \
|
||||
src/log/Makefile \
|
||||
@ -97,10 +99,13 @@ src/lwp/Makefile \
|
||||
src/lwp/test/Makefile \
|
||||
src/osi/Makefile \
|
||||
src/osi/COMMON/Makefile \
|
||||
src/osi/COMMON/data/Makefile \
|
||||
src/osi/LEGACY/Makefile \
|
||||
src/osi/LWP/Makefile \
|
||||
src/osi/PTHREAD/Makefile \
|
||||
src/osi/UNIX/Makefile \
|
||||
src/osi/${MKAFS_OSTYPE}/Makefile \
|
||||
src/osi/data/Makefile \
|
||||
src/osi/tests/Makefile \
|
||||
src/pam/Makefile \
|
||||
src/platform/Makefile \
|
||||
@ -128,6 +133,7 @@ src/tests/run-tests \
|
||||
src/tests/OpenAFS/Dirpath.pm \
|
||||
src/trace/Makefile \
|
||||
src/trace/table-gen.mk \
|
||||
src/trace/probe-dump.sh \
|
||||
src/trace/KERNEL/Makefile \
|
||||
src/trace/LWP/Makefile \
|
||||
src/trace/PTHREAD/Makefile \
|
||||
@ -141,8 +147,10 @@ src/trace/consumer/Makefile \
|
||||
src/trace/consumer/cache/Makefile \
|
||||
src/trace/db/Makefile \
|
||||
src/trace/encoding/Makefile \
|
||||
src/trace/encoding/ascii/Makefile \
|
||||
src/trace/event/Makefile \
|
||||
src/trace/generator/Makefile \
|
||||
src/trace/ltrace/Makefile \
|
||||
src/trace/mail/Makefile \
|
||||
src/trace/rpc/Makefile \
|
||||
src/trace/rtrace/Makefile \
|
||||
@ -151,9 +159,11 @@ src/trace/script/perl/Makefile \
|
||||
src/trace/script/perl/osi-trace-console/Makefile.PL \
|
||||
src/trace/snmp/Makefile \
|
||||
src/trace/tests/Makefile \
|
||||
src/trace/tests/generator/Makefile \
|
||||
src/trace/tests/kernel/Makefile \
|
||||
src/trace/tests/kernel/buffer/Makefile \
|
||||
src/trace/traced/Makefile \
|
||||
src/trace/util/Makefile \
|
||||
src/tsalvaged/Makefile \
|
||||
src/tsm41/Makefile \
|
||||
src/tviced/Makefile \
|
||||
|
@ -5,6 +5,8 @@
|
||||
* This software has been released under the terms of the IBM Public
|
||||
* License. For details, see the LICENSE file in the top-level source
|
||||
* directory or online at http://www.openafs.org/dl/license10.html
|
||||
*
|
||||
* Portions Copyright (c) 2007 Sine Nomine Associates
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -54,8 +56,7 @@
|
||||
* -shutdown Shutdown afs daemons
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
#include <afsconfig.h>
|
||||
#include <afs/param.h>
|
||||
#include <osi/osi.h>
|
||||
|
||||
RCSID
|
||||
("$Header$");
|
||||
@ -2181,8 +2182,12 @@ mainproc(struct cmd_syndesc *as, char *arock)
|
||||
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int code;
|
||||
struct cmd_syndesc *ts;
|
||||
|
||||
osi_AssertOK(osi_PkgInit(osi_ProgramType_AFSD,
|
||||
osi_NULL));
|
||||
|
||||
ts = cmd_CreateSyntax(NULL, mainproc, NULL, "start AFS");
|
||||
cmd_AddParm(ts, "-blocks", CMD_SINGLE, CMD_OPTIONAL,
|
||||
"1024 byte blocks in cache");
|
||||
@ -2257,7 +2262,10 @@ main(int argc, char **argv)
|
||||
cmd_AddParm(ts, "-splitcache", CMD_SINGLE, CMD_OPTIONAL,
|
||||
"Percentage RW versus RO in cache (specify as 60/40)");
|
||||
|
||||
return (cmd_Dispatch(argc, argv));
|
||||
code = cmd_Dispatch(argc, argv);
|
||||
|
||||
osi_AssertOK(osi_PkgShutdown());
|
||||
return code;
|
||||
}
|
||||
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
* directory or online at http://www.openafs.org/dl/license10.html
|
||||
*
|
||||
* Portions Copyright (c) 2003 Apple Computer, Inc.
|
||||
* Portions Copyright (c) 2007 Sine Nomine Associates
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -15,8 +16,7 @@
|
||||
*-------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#include <afsconfig.h>
|
||||
#include <afs/param.h>
|
||||
#include <osi/osi.h>
|
||||
|
||||
RCSID
|
||||
("$Header$");
|
||||
@ -4182,6 +4182,9 @@ main(argc, argv)
|
||||
sigaction(SIGSEGV, &nsa, NULL);
|
||||
#endif
|
||||
|
||||
osi_AssertOK(osi_PkgInit(osi_ProgramType_Utility,
|
||||
osi_NULL));
|
||||
|
||||
/*
|
||||
* Set up the commands we understand.
|
||||
*/
|
||||
@ -4212,6 +4215,9 @@ main(argc, argv)
|
||||
*/
|
||||
|
||||
code = cmd_Dispatch(argc, argv);
|
||||
|
||||
osi_AssertOK(osi_PkgShutdown());
|
||||
|
||||
if (code)
|
||||
afsmon_Exit(1);
|
||||
else
|
||||
|
@ -3,8 +3,12 @@
|
||||
*
|
||||
* Copyright 1990,1991 by the Massachusetts Institute of Technology
|
||||
* For distribution and copying rights, see the file "mit-copyright.h"
|
||||
*
|
||||
* Portions Copyright (c) 2007 Sine Nomine Associates
|
||||
*/
|
||||
|
||||
#include <osi/osi.h>
|
||||
|
||||
#if !defined(lint) && !defined(SABER)
|
||||
static char *rcsid = "$Id$";
|
||||
#endif /* lint || SABER */
|
||||
@ -17,7 +21,10 @@ static char *rcsid = "$Id$";
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
osi_AssertOK(osi_PkgInit(osi_ProgramType_EphemeralUtility,
|
||||
osi_NULL));
|
||||
aklog(argc, argv);
|
||||
osi_AssertOK(osi_PkgShutdown());
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,8 @@
|
||||
* This software has been released under the terms of the IBM Public
|
||||
* License. For details, see the LICENSE file in the top-level source
|
||||
* directory or online at http://www.openafs.org/dl/license10.html
|
||||
*
|
||||
* Portions Copyright (c) 2006-2007 Sine Nomine Associates
|
||||
*/
|
||||
|
||||
#include <afsconfig.h>
|
||||
@ -656,6 +658,30 @@ bproc()
|
||||
}
|
||||
tb->lastAnyExit = FT_ApproxTime();
|
||||
|
||||
|
||||
#if defined(OSI_TRACE_ENABLED)
|
||||
/*
|
||||
* attempt to unregister any kernel state
|
||||
* for the dead process
|
||||
*/
|
||||
{
|
||||
osi_result res;
|
||||
osi_trace_gen_id_t gen_id;
|
||||
osi_trace_generator_address_t gen_addr;
|
||||
|
||||
gen_addr.pid = tp->pid;
|
||||
gen_addr.programType = 0;
|
||||
|
||||
res = osi_trace_gen_rgy_get_by_addr(&gen_addr,
|
||||
&gen_id);
|
||||
if (OSI_RESULT_OK(res)) {
|
||||
osi_trace_gen_rgy_unregister(gen_id);
|
||||
osi_trace_gen_rgy_put(gen_id);
|
||||
}
|
||||
}
|
||||
#endif /* OSI_TRACE_ENABLED */
|
||||
|
||||
|
||||
if (tb->notifier) {
|
||||
bozo_Log("BNODE: Notifier %s will be called\n",
|
||||
tb->notifier);
|
||||
|
@ -5,11 +5,11 @@
|
||||
* This software has been released under the terms of the IBM Public
|
||||
* License. For details, see the LICENSE file in the top-level source
|
||||
* directory or online at http://www.openafs.org/dl/license10.html
|
||||
*
|
||||
* Portions Copyright (c) 2007 Sine Nomine Associates
|
||||
*/
|
||||
|
||||
#include <osi/osi.h>
|
||||
#include <afsconfig.h>
|
||||
#include <afs/param.h>
|
||||
|
||||
RCSID
|
||||
("$Header$");
|
||||
@ -1988,7 +1988,8 @@ main(argc, argv)
|
||||
sigaction(SIGABRT, &nsa, NULL);
|
||||
#endif
|
||||
|
||||
osi_Assert(OSI_RESULT_OK(osi_PkgInit(osi_ProgramType_EphemeralUtility, osi_NULL)));
|
||||
osi_AssertOK(osi_PkgInit(osi_ProgramType_Bos,
|
||||
osi_NULL));
|
||||
|
||||
/* start up rx */
|
||||
code = rx_Init(0);
|
||||
@ -2271,5 +2272,6 @@ main(argc, argv)
|
||||
|
||||
code = cmd_Dispatch(argc, argv);
|
||||
rx_Finalize();
|
||||
osi_AssertOK(osi_PkgShutdown());
|
||||
exit(code);
|
||||
}
|
||||
|
@ -5,6 +5,8 @@
|
||||
* This software has been released under the terms of the IBM Public
|
||||
* License. For details, see the LICENSE file in the top-level source
|
||||
* directory or online at http://www.openafs.org/dl/license10.html
|
||||
*
|
||||
* Portions Copyright (c) 2006-2007 Sine Nomine Associates
|
||||
*/
|
||||
|
||||
#include <osi/osi.h>
|
||||
@ -159,6 +161,8 @@ bozo_ReBozo()
|
||||
close(i);
|
||||
}
|
||||
|
||||
osi_Assert(OSI_RESULT_OK(osi_PkgShutdown()));
|
||||
|
||||
execv(argv[0], argv); /* should not return */
|
||||
_exit(1);
|
||||
#endif /* AFS_NT40_ENV */
|
||||
@ -753,10 +757,6 @@ main(int argc, char **argv, char **envp)
|
||||
sigaction(SIGABRT, &nsa, NULL);
|
||||
#endif
|
||||
|
||||
osi_Assert(OSI_RESULT_OK(osi_PkgInit(osi_ProgramType_Bosserver, osi_NULL)));
|
||||
#if defined(OSI_TRACE_ENABLED)
|
||||
osi_Assert(OSI_RESULT_OK(bosserver_TracePointTableInit()));
|
||||
#endif
|
||||
osi_audit_init();
|
||||
|
||||
#ifdef BOS_RESTRICTED_MODE
|
||||
@ -905,6 +905,20 @@ main(int argc, char **argv, char **envp)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* go into the background and remove our controlling tty, close open
|
||||
file desriptors
|
||||
*/
|
||||
|
||||
#ifndef AFS_NT40_ENV
|
||||
if (!nofork)
|
||||
daemon(1, 0);
|
||||
#endif /* ! AFS_NT40_ENV */
|
||||
|
||||
osi_Assert(OSI_RESULT_OK(osi_PkgInit(osi_ProgramType_Bosserver, osi_NULL)));
|
||||
#if defined(OSI_TRACE_ENABLED)
|
||||
osi_Assert(OSI_RESULT_OK(bosserver_TracePointTableInit()));
|
||||
#endif
|
||||
|
||||
code = bnode_Init();
|
||||
if (code) {
|
||||
printf("bosserver: could not init bnode package, code %d\n", code);
|
||||
@ -927,15 +941,6 @@ main(int argc, char **argv, char **envp)
|
||||
fflush(stdout);
|
||||
#endif
|
||||
|
||||
/* go into the background and remove our controlling tty, close open
|
||||
file desriptors
|
||||
*/
|
||||
|
||||
#ifndef AFS_NT40_ENV
|
||||
if (!nofork)
|
||||
daemon(1, 0);
|
||||
#endif /* ! AFS_NT40_ENV */
|
||||
|
||||
if ((!DoSyslog)
|
||||
#ifndef AFS_NT40_ENV
|
||||
&& ((lstat(AFSDIR_BOZLOG_FILE, &sb) == 0) &&
|
||||
|
@ -80,8 +80,13 @@ tcstatus.o: tcstatus.c ${INCLS}
|
||||
|
||||
read_tape: read_tape.c
|
||||
${CC} ${CFLAGS} -o read_tape ${srcdir}/read_tape.c \
|
||||
${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a \
|
||||
${TOP_LIBDIR}/libusd.a
|
||||
${TOP_LIBDIR}/libcmd.a \
|
||||
${TOP_LIBDIR}/util.a \
|
||||
${TOP_LIBDIR}/libosi-lwp-inst.a \
|
||||
${TOP_LIBDIR}/liblwp.a \
|
||||
${TOP_LIBDIR}/libusd.a \
|
||||
${XLIBS} \
|
||||
$(NULL)
|
||||
|
||||
clean:
|
||||
$(RM) -f butc *.o butc_test core tdump read_tape AFS_component_version_number.c
|
||||
|
@ -5,10 +5,11 @@
|
||||
* This software has been released under the terms of the IBM Public
|
||||
* License. For details, see the LICENSE file in the top-level source
|
||||
* directory or online at http://www.openafs.org/dl/license10.html
|
||||
*
|
||||
* Portions Copyright (c) 2007 Sine Nomine Associates
|
||||
*/
|
||||
|
||||
#include <afsconfig.h>
|
||||
#include <afs/param.h>
|
||||
#include <osi/osi.h>
|
||||
|
||||
RCSID
|
||||
("$Header$");
|
||||
@ -545,9 +546,13 @@ main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
int code;
|
||||
struct cmd_syndesc *ts;
|
||||
struct cmd_item *ti;
|
||||
|
||||
osi_AssertOK(osi_PkgInit(osi_ProgramType_Utility,
|
||||
osi_NULL));
|
||||
|
||||
setlinebuf(stdout);
|
||||
|
||||
ts = cmd_CreateSyntax(NULL, WorkerBee, NULL,
|
||||
@ -565,5 +570,7 @@ main(argc, argv)
|
||||
"Display volume headers");
|
||||
cmd_AddParm(ts, "-verbose", CMD_FLAG, CMD_OPTIONAL, "verbose");
|
||||
|
||||
return cmd_Dispatch(argc, argv);
|
||||
code = cmd_Dispatch(argc, argv);
|
||||
osi_AssertOK(osi_PkgShutdown());
|
||||
return code;
|
||||
}
|
||||
|
@ -5,10 +5,11 @@
|
||||
* This software has been released under the terms of the IBM Public
|
||||
* License. For details, see the LICENSE file in the top-level source
|
||||
* directory or online at http://www.openafs.org/dl/license10.html
|
||||
*
|
||||
* Portions Copyright (c) 2007 Sine Nomine Associates
|
||||
*/
|
||||
|
||||
#include <afsconfig.h>
|
||||
#include <afs/param.h>
|
||||
#include <osi/osi.h>
|
||||
|
||||
RCSID
|
||||
("$Header$");
|
||||
@ -1161,6 +1162,7 @@ WorkerBee(struct cmd_syndesc *as, char *arock)
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int code;
|
||||
register struct cmd_syndesc *ts;
|
||||
register struct cmd_item *ti;
|
||||
|
||||
@ -1180,7 +1182,7 @@ main(int argc, char **argv)
|
||||
sigaction(SIGABRT, &nsa, NULL);
|
||||
#endif
|
||||
|
||||
osi_Assert(OSI_RESULT_OK(osi_PkgInit(osi_ProgramType_BuTC, osi_NULL)));
|
||||
osi_AssertOK(osi_PkgInit(osi_ProgramType_BuTC, osi_NULL));
|
||||
|
||||
setlinebuf(stdout);
|
||||
|
||||
@ -1207,6 +1209,7 @@ main(int argc, char **argv)
|
||||
ReportErrorEventAlt(AFSEVT_SVR_NO_INSTALL_DIR, 0, argv[0], 0);
|
||||
#endif
|
||||
fprintf(stderr, "Unable to obtain AFS server directory.\n");
|
||||
osi_AssertOK(osi_PkgShutdown());
|
||||
exit(2);
|
||||
}
|
||||
|
||||
@ -1238,7 +1241,10 @@ main(int argc, char **argv)
|
||||
ts->parms[3].items = (struct cmd_item *)NULL;
|
||||
ts->parms[4].items = (struct cmd_item *)NULL;
|
||||
ts->parms[5].items = (struct cmd_item *)NULL;
|
||||
return WorkerBee(ts, NULL);
|
||||
code = WorkerBee(ts, NULL);
|
||||
} else
|
||||
return cmd_Dispatch(argc, argv);
|
||||
code = cmd_Dispatch(argc, argv);
|
||||
|
||||
osi_AssertOK(osi_PkgShutdown());
|
||||
return code;
|
||||
}
|
||||
|
@ -194,6 +194,7 @@ enum vcexcl { NONEXCL, EXCL };
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_OSF_ENV 1
|
||||
#define OSI_OSF20_ENV 1
|
||||
#define OSI_OSF30_ENV 1
|
||||
|
@ -202,6 +202,7 @@ enum vcexcl { NONEXCL, EXCL };
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_OSF_ENV 1
|
||||
#define OSI_OSF20_ENV 1
|
||||
#define OSI_OSF30_ENV 1
|
||||
|
@ -203,6 +203,7 @@ enum vcexcl { NONEXCL, EXCL };
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_OSF_ENV 1
|
||||
#define OSI_OSF20_ENV 1
|
||||
#define OSI_OSF30_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_DARWIN_ENV 1
|
||||
#define OSI_DARWIN12_ENV 1
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_DARWIN_ENV 1
|
||||
#define OSI_DARWIN12_ENV 1
|
||||
#define OSI_DARWIN13_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_DARWIN_ENV 1
|
||||
#define OSI_DARWIN12_ENV 1
|
||||
#define OSI_DARWIN13_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_DARWIN_ENV 1
|
||||
#define OSI_DARWIN12_ENV 1
|
||||
#define OSI_DARWIN13_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_DARWIN_ENV 1
|
||||
#define OSI_DARWIN12_ENV 1
|
||||
#define OSI_DARWIN13_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_DARWIN_ENV 1
|
||||
#define OSI_DARWIN12_ENV 1
|
||||
#define OSI_DARWIN13_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_DARWIN_ENV 1
|
||||
#define OSI_DARWIN12_ENV 1
|
||||
#define OSI_DARWIN13_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_FBSD_ENV 1
|
||||
#define OSI_FBSD40_ENV 1
|
||||
#define OSI_FBSD42_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_FBSD_ENV 1
|
||||
#define OSI_FBSD40_ENV 1
|
||||
#define OSI_FBSD42_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_FBSD_ENV 1
|
||||
#define OSI_FBSD40_ENV 1
|
||||
#define OSI_FBSD42_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_FBSD_ENV 1
|
||||
#define OSI_FBSD40_ENV 1
|
||||
#define OSI_FBSD42_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_FBSD_ENV 1
|
||||
#define OSI_FBSD40_ENV 1
|
||||
#define OSI_FBSD42_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_FBSD_ENV 1
|
||||
#define OSI_FBSD40_ENV 1
|
||||
#define OSI_FBSD42_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_FBSD_ENV 1
|
||||
#define OSI_FBSD40_ENV 1
|
||||
#define OSI_FBSD42_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_FBSD_ENV 1
|
||||
#define OSI_FBSD40_ENV 1
|
||||
#define OSI_FBSD42_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_FBSD_ENV 1
|
||||
#define OSI_FBSD40_ENV 1
|
||||
#define OSI_FBSD42_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_FBSD_ENV 1
|
||||
#define OSI_FBSD40_ENV 1
|
||||
#define OSI_FBSD42_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_FBSD_ENV 1
|
||||
#define OSI_FBSD40_ENV 1
|
||||
#define OSI_FBSD42_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_FBSD_ENV 1
|
||||
#define OSI_FBSD40_ENV 1
|
||||
#define OSI_FBSD42_ENV 1
|
||||
|
@ -168,10 +168,11 @@ struct uio;
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_HPUX_ENV 1
|
||||
#define OSI_HPUX90_ENV 1
|
||||
#define OSI_HPUX100_ENV 1
|
||||
#define OSI_HPUX101_ENV 1
|
||||
#define OSI_HPUX102_ENV 1
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_HPUX_ENV 1
|
||||
#define OSI_HPUX90_ENV 1
|
||||
#define OSI_HPUX100_ENV 1
|
||||
#define OSI_HPUX101_ENV 1
|
||||
#define OSI_HPUX102_ENV 1
|
||||
|
||||
#endif /* AFS_PARAM_COMMON_H */
|
||||
|
@ -176,11 +176,12 @@ struct uio;
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_HPUX_ENV 1
|
||||
#define OSI_HPUX90_ENV 1
|
||||
#define OSI_HPUX100_ENV 1
|
||||
#define OSI_HPUX101_ENV 1
|
||||
#define OSI_HPUX102_ENV 1
|
||||
#define OSI_HPUX110_ENV 1
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_HPUX_ENV 1
|
||||
#define OSI_HPUX90_ENV 1
|
||||
#define OSI_HPUX100_ENV 1
|
||||
#define OSI_HPUX101_ENV 1
|
||||
#define OSI_HPUX102_ENV 1
|
||||
#define OSI_HPUX110_ENV 1
|
||||
|
||||
#endif /* AFS_PARAM_COMMON_H */
|
||||
|
@ -101,15 +101,16 @@ struct uio;
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_HPUX_ENV 1
|
||||
#define OSI_HPUX90_ENV 1
|
||||
#define OSI_HPUX100_ENV 1
|
||||
#define OSI_HPUX101_ENV 1
|
||||
#define OSI_HPUX102_ENV 1
|
||||
#define OSI_HPUX110_ENV 1
|
||||
#define OSI_HPUX1111_ENV 1
|
||||
#define OSI_HPUX1122_ENV 1
|
||||
#define OSI_HPUX1123_ENV 1
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_HPUX_ENV 1
|
||||
#define OSI_HPUX90_ENV 1
|
||||
#define OSI_HPUX100_ENV 1
|
||||
#define OSI_HPUX101_ENV 1
|
||||
#define OSI_HPUX102_ENV 1
|
||||
#define OSI_HPUX110_ENV 1
|
||||
#define OSI_HPUX1111_ENV 1
|
||||
#define OSI_HPUX1122_ENV 1
|
||||
#define OSI_HPUX1123_ENV 1
|
||||
|
||||
|
||||
#endif /* AFS_PARAM_H */
|
||||
|
@ -179,6 +179,7 @@ struct uio;
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_HPUX_ENV 1
|
||||
#define OSI_HPUX90_ENV 1
|
||||
#define OSI_HPUX100_ENV 1
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_LINUX_ENV 1
|
||||
#define OSI_LINUX20_ENV 1
|
||||
#define OSI_LINUX22_ENV 1
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_LINUX_ENV 1
|
||||
#define OSI_LINUX20_ENV 1
|
||||
#define OSI_LINUX22_ENV 1
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_LINUX_ENV 1
|
||||
#define OSI_LINUX20_ENV 1
|
||||
#define OSI_LINUX22_ENV 1
|
||||
|
@ -118,6 +118,7 @@ enum vcexcl { NONEXCL, EXCL };
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_NBSD_ENV 1
|
||||
#define OSI_NBSD15_ENV 1
|
||||
|
||||
|
@ -118,6 +118,7 @@ enum vcexcl { NONEXCL, EXCL };
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_NBSD_ENV 1
|
||||
#define OSI_NBSD15_ENV 1
|
||||
#define OSI_NBSD16_ENV 1
|
||||
|
@ -161,6 +161,7 @@ enum vcexcl { NONEXCL, EXCL };
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_NBSD_ENV 1
|
||||
#define OSI_NBSD15_ENV 1
|
||||
#define OSI_NBSD16_ENV 1
|
||||
|
@ -161,6 +161,7 @@ enum vcexcl { NONEXCL, EXCL };
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_NBSD_ENV 1
|
||||
#define OSI_NBSD15_ENV 1
|
||||
#define OSI_NBSD16_ENV 1
|
||||
|
@ -157,6 +157,7 @@ enum vcexcl { NONEXCL, EXCL };
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_NBSD_ENV 1
|
||||
#define OSI_NBSD15_ENV 1
|
||||
#define OSI_NBSD16_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_OBSD_ENV 1
|
||||
#define OSI_OBSD31_ENV 1
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_OBSD_ENV 1
|
||||
#define OSI_OBSD31_ENV 1
|
||||
#define OSI_OBSD32_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_OBSD_ENV 1
|
||||
#define OSI_OBSD31_ENV 1
|
||||
#define OSI_OBSD32_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_OBSD_ENV 1
|
||||
#define OSI_OBSD31_ENV 1
|
||||
#define OSI_OBSD32_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_OBSD_ENV 1
|
||||
#define OSI_OBSD31_ENV 1
|
||||
#define OSI_OBSD32_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_OBSD_ENV 1
|
||||
#define OSI_OBSD31_ENV 1
|
||||
#define OSI_OBSD32_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_OBSD_ENV 1
|
||||
#define OSI_OBSD31_ENV 1
|
||||
#define OSI_OBSD32_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_OBSD_ENV 1
|
||||
#define OSI_OBSD31_ENV 1
|
||||
#define OSI_OBSD32_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_OBSD_ENV 1
|
||||
#define OSI_OBSD31_ENV 1
|
||||
#define OSI_OBSD32_ENV 1
|
||||
|
@ -174,6 +174,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_AIX_ENV 1
|
||||
#define OSI_AIX32_ENV 1
|
||||
#define OSI_AIX41_ENV 1
|
||||
|
@ -183,6 +183,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_AIX_ENV 1
|
||||
#define OSI_AIX32_ENV 1
|
||||
#define OSI_AIX41_ENV 1
|
||||
|
@ -184,11 +184,12 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define AFS_AIX_ENV 1
|
||||
#define AFS_AIX32_ENV 1
|
||||
#define AFS_AIX41_ENV 1
|
||||
#define AFS_AIX42_ENV 1
|
||||
#define AFS_AIX51_ENV 1
|
||||
#define AFS_AIX52_ENV 1
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_AIX_ENV 1
|
||||
#define OSI_AIX32_ENV 1
|
||||
#define OSI_AIX41_ENV 1
|
||||
#define OSI_AIX42_ENV 1
|
||||
#define OSI_AIX51_ENV 1
|
||||
#define OSI_AIX52_ENV 1
|
||||
|
||||
#endif /* AFS_PARAM_COMMON_H */
|
||||
|
@ -185,12 +185,13 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define AFS_AIX_ENV 1
|
||||
#define AFS_AIX32_ENV 1
|
||||
#define AFS_AIX41_ENV 1
|
||||
#define AFS_AIX42_ENV 1
|
||||
#define AFS_AIX51_ENV 1
|
||||
#define AFS_AIX52_ENV 1
|
||||
#define AFS_AIX53_ENV 1
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_AIX_ENV 1
|
||||
#define OSI_AIX32_ENV 1
|
||||
#define OSI_AIX41_ENV 1
|
||||
#define OSI_AIX42_ENV 1
|
||||
#define OSI_AIX51_ENV 1
|
||||
#define OSI_AIX52_ENV 1
|
||||
#define OSI_AIX53_ENV 1
|
||||
|
||||
#endif /* AFS_PARAM_COMMON_H */
|
||||
|
@ -191,6 +191,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_SGI_ENV 1
|
||||
#define OSI_SGI51_ENV 1 /* Dist from 5.0.1 */
|
||||
#define OSI_SGI52_ENV 1
|
||||
|
@ -184,6 +184,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_SGI_ENV 1
|
||||
#define OSI_SGI51_ENV 1 /* Dist from 5.0.1 */
|
||||
#define OSI_SGI52_ENV 1
|
||||
|
@ -200,6 +200,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_SGI_ENV 1
|
||||
#define OSI_SGI51_ENV 1 /* Dist from 5.0.1 */
|
||||
#define OSI_SGI52_ENV 1
|
||||
|
@ -215,6 +215,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_SGI_ENV 1
|
||||
#define OSI_SGI51_ENV 1 /* Dist from 5.0.1 */
|
||||
#define OSI_SGI52_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_SUN_ENV 1
|
||||
#define OSI_SUN5_ENV 1
|
||||
#define OSI_SUN52_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_SUN_ENV 1
|
||||
#define OSI_SUN5_ENV 1
|
||||
#define OSI_SUN52_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_SUN_ENV 1
|
||||
#define OSI_SUN5_ENV 1
|
||||
#define OSI_SUN52_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_SUN_ENV 1
|
||||
#define OSI_SUN5_ENV 1
|
||||
#define OSI_SUN52_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_SUN_ENV 1
|
||||
#define OSI_SUN5_ENV 1
|
||||
#define OSI_SUN52_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_SUN_ENV 1
|
||||
#define OSI_SUN5_ENV 1
|
||||
#define OSI_SUN52_ENV 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
/* global defines */
|
||||
|
||||
#define OSI_ENV_UNIX 1
|
||||
#define OSI_SUN_ENV 1
|
||||
#define OSI_SUN5_ENV 1
|
||||
#define OSI_SUN52_ENV 1
|
||||
|
@ -5,11 +5,11 @@
|
||||
* This software has been released under the terms of the IBM Public
|
||||
* License. For details, see the LICENSE file in the top-level source
|
||||
* directory or online at http://www.openafs.org/dl/license10.html
|
||||
*
|
||||
* Portions Copyright (c) 2007 Sine Nomine Associates
|
||||
*/
|
||||
|
||||
/* These two needed for rxgen output to work */
|
||||
#include <afsconfig.h>
|
||||
#include <afs/param.h>
|
||||
#include <osi/osi.h>
|
||||
|
||||
RCSID
|
||||
("$Header$");
|
||||
@ -66,6 +66,10 @@ main(int argc, char *argv[])
|
||||
sigaction(SIGABRT, &nsa, NULL);
|
||||
sigaction(SIGSEGV, &nsa, NULL);
|
||||
#endif
|
||||
|
||||
osi_AssertOK(osi_PkgInit(osi_ProgramType_EphemeralUtility,
|
||||
osi_NULL));
|
||||
|
||||
initialize_CMD_error_table();
|
||||
initialize_KTC_error_table();
|
||||
initialize_KA_error_table();
|
||||
@ -76,14 +80,16 @@ main(int argc, char *argv[])
|
||||
/* initialize winsock */
|
||||
if (afs_winsockInit() < 0) {
|
||||
fprintf(stderr, "%s: Couldn't initialize winsock.\n", whoami);
|
||||
exit(1);
|
||||
code = 1;
|
||||
goto error;
|
||||
}
|
||||
#endif
|
||||
|
||||
code = ka_Init(0);
|
||||
if (code) {
|
||||
com_err(whoami, code, "Can't get cell info");
|
||||
exit(1);
|
||||
code = 1;
|
||||
goto error;
|
||||
}
|
||||
|
||||
/* if there are no arguments or if the first argument is "-cell" or if the
|
||||
@ -92,21 +98,25 @@ main(int argc, char *argv[])
|
||||
|
||||
ap[0] = argv[0];
|
||||
ap[1] = "interactive";
|
||||
if (argc == 1)
|
||||
if (argc == 1) {
|
||||
code = ka_AdminInteractive(2, ap);
|
||||
else if ((strncmp(argv[1], "-admin_username", strlen(argv[1])) == 0)
|
||||
|| (strncmp(argv[1], "-password_for_admin", strlen(argv[1])) ==
|
||||
0)
|
||||
|| (strncmp(argv[1], "-cell", strlen(argv[1])) == 0)
|
||||
|| (strncmp(argv[1], "-servers", strlen(argv[1])) == 0)
|
||||
|| (strncmp(argv[1], "-noauth", strlen(argv[1])) == 0)
|
||||
|| (strpbrk(argv[1], "@.") != 0)) {
|
||||
} else if ((strncmp(argv[1], "-admin_username", strlen(argv[1])) == 0) ||
|
||||
(strncmp(argv[1], "-password_for_admin", strlen(argv[1])) == 0) ||
|
||||
(strncmp(argv[1], "-cell", strlen(argv[1])) == 0) ||
|
||||
(strncmp(argv[1], "-servers", strlen(argv[1])) == 0) ||
|
||||
(strncmp(argv[1], "-noauth", strlen(argv[1])) == 0) ||
|
||||
(strpbrk(argv[1], "@.") != 0)) {
|
||||
for (i = 1; i < argc; i++)
|
||||
ap[i + 1] = argv[i];
|
||||
code = ka_AdminInteractive(argc + 1, ap);
|
||||
} else
|
||||
} else {
|
||||
code = ka_AdminInteractive(argc, argv);
|
||||
}
|
||||
code = (code != 0) ? 1 : 0;
|
||||
|
||||
error:
|
||||
rx_Finalize();
|
||||
exit(code != 0);
|
||||
osi_AssertOK(osi_PkgShutdown());
|
||||
|
||||
return code;
|
||||
}
|
||||
|
@ -5,10 +5,11 @@
|
||||
* This software has been released under the terms of the IBM Public
|
||||
* License. For details, see the LICENSE file in the top-level source
|
||||
* directory or online at http://www.openafs.org/dl/license10.html
|
||||
*
|
||||
* Portions Copyright (c) 2007 Sine Nomine Associates
|
||||
*/
|
||||
|
||||
#include <afsconfig.h>
|
||||
#include <afs/param.h>
|
||||
#include <osi/osi.h>
|
||||
|
||||
RCSID
|
||||
("$Header$");
|
||||
@ -68,9 +69,14 @@ RCSID
|
||||
authentication services for the cell being used for authentication.
|
||||
*/
|
||||
|
||||
#define KLOGEXIT(code) assert(!code || code >= KAMINERROR); \
|
||||
rx_Finalize(); \
|
||||
(!code ? exit(0) : exit((code)-KAMINERROR+1))
|
||||
#define KLOGEXIT(code) \
|
||||
osi_Macro_Begin \
|
||||
osi_Assert(!code || code >= KAMINERROR); \
|
||||
rx_Finalize(); \
|
||||
osi_AssertOK(osi_PkgShutdown()); \
|
||||
(!code ? exit(0) : exit((code)-KAMINERROR+1)); \
|
||||
osi_Macro_End
|
||||
|
||||
extern int CommandProc(struct cmd_syndesc *as, char *arock);
|
||||
|
||||
static int zero_argc;
|
||||
@ -105,6 +111,9 @@ main(int argc, char *argv[])
|
||||
zero_argc = argc;
|
||||
zero_argv = argv;
|
||||
|
||||
osi_AssertOK(osi_PkgInit(osi_ProgramType_EphemeralUtility,
|
||||
osi_NULL));
|
||||
|
||||
ts = cmd_CreateSyntax(NULL, CommandProc, 0,
|
||||
"obtain Kerberos authentication");
|
||||
|
||||
|
@ -5,14 +5,15 @@
|
||||
* This software has been released under the terms of the IBM Public
|
||||
* License. For details, see the LICENSE file in the top-level source
|
||||
* directory or online at http://www.openafs.org/dl/license10.html
|
||||
*
|
||||
* Portions Copyright (c) 2007 Sine Nomine Associates
|
||||
*/
|
||||
|
||||
/*
|
||||
* ALL RIGHTS RESERVED
|
||||
*/
|
||||
|
||||
#include <afsconfig.h>
|
||||
#include <afs/param.h>
|
||||
#include <osi/osi.h>
|
||||
|
||||
RCSID
|
||||
("$Header$");
|
||||
@ -469,6 +470,9 @@ main(argc, argv)
|
||||
sigaction(SIGSEGV, &nsa, NULL);
|
||||
#endif
|
||||
|
||||
osi_AssertOK(osi_PkgInit(osi_ProgramType_EphemeralUtility,
|
||||
osi_NULL));
|
||||
|
||||
ts = cmd_CreateSyntax(NULL, cmdproc, 0, "copy tickets for NFS");
|
||||
cmd_AddParm(ts, "-host", CMD_SINGLE, CMD_REQUIRED, "host name");
|
||||
cmd_AddParm(ts, "-id", CMD_SINGLE, CMD_OPTIONAL, "user ID (decimal)");
|
||||
@ -479,5 +483,8 @@ main(argc, argv)
|
||||
"display all tokens for remote [host,id]");
|
||||
|
||||
code = cmd_Dispatch(argc, argv);
|
||||
|
||||
osi_AssertOK(osi_PkgShutdown());
|
||||
|
||||
return code;
|
||||
}
|
||||
|
@ -144,5 +144,5 @@ LIBAFSAUTHENT_ALL_CFLAGS = \
|
||||
$(NULL)
|
||||
|
||||
LIBAFSAUTHENT_DEPS = \
|
||||
$(LIBAFSAUTHENT_DEPS_$(LIBAFSAUTHENT_BUILDING)_$(LIBAFSAUTHENT_BUILDING_LIB)_$(LIBAFSAUTHENT_BUILDING_THR)_$(LIBAFSAUTHENT_BUILDING_INST)) \
|
||||
$(LIBAFSAUTHENT_DEPS_$(LIBAFSAUTHENT_BUILDING)_$(LIBAFSAUTHENT_BUILDING_LIB)_$(LIBAFSAUTHENT_BUILDING_THR)_$(LIBAFSAUTHENT_BUILDING_INST)_$(LIBAFSAUTHENT_BUILDING_BIT)) \
|
||||
$(NULL)
|
||||
|
@ -27,12 +27,22 @@ UTIL_OBJDIR=$(TOP_OBJDIR)/src/util
|
||||
|
||||
LIBAFSAUTHENT_VERSION_MAJOR = 1
|
||||
LIBAFSAUTHENT_VERSION_MINOR = 0
|
||||
LIBAFSAUTHENT_DEPS_libafsauthent_shlib_pthread_inst = \
|
||||
LIBAFSAUTHENT_DEPS_libafsauthent_shlib_pthread_inst_32 = \
|
||||
${MT_LIBS} ${OSI_LIBS} \
|
||||
-L$(TOP_OBJDIR)/lib -losi-pthread-inst -lafsrpc-pthread-inst
|
||||
LIBAFSAUTHENT_DEPS_libafsauthent_shlib_pthread_ni = \
|
||||
-L$(TOP_OBJDIR)/lib -losi-pthread-inst-32 -lafsrpc-pthread-inst-32 \
|
||||
$(NULL)
|
||||
LIBAFSAUTHENT_DEPS_libafsauthent_shlib_pthread_inst_64 = \
|
||||
${MT_LIBS} ${OSI_LIBS} \
|
||||
-L$(TOP_OBJDIR)/lib -losi-pthread-ni -lafsrpc-pthread-ni
|
||||
-L$(TOP_OBJDIR)/lib -losi-pthread-inst-64 -lafsrpc-pthread-inst-64 \
|
||||
$(NULL)
|
||||
LIBAFSAUTHENT_DEPS_libafsauthent_shlib_pthread_ni_32 = \
|
||||
${MT_LIBS} ${OSI_LIBS} \
|
||||
-L$(TOP_OBJDIR)/lib -losi-pthread-ni-32 -lafsrpc-pthread-ni-32 \
|
||||
$(NULL)
|
||||
LIBAFSAUTHENT_DEPS_libafsauthent_shlib_pthread_ni_64 = \
|
||||
${MT_LIBS} ${OSI_LIBS} \
|
||||
-L$(TOP_OBJDIR)/lib -losi-pthread-ni-64 -lafsrpc-pthread-ni-64 \
|
||||
$(NULL)
|
||||
|
||||
# core libafsauthent build objects
|
||||
# for all builds, kernel, ukernel, and userspace
|
||||
|
@ -46,12 +46,15 @@ include Makefile.common
|
||||
# override
|
||||
<sun4x_57 sun4x_58 sun4x_59 sun4x_510 sun4x_511>
|
||||
LIBAFSRPC_OS_CFLAGS_libafsrpc_64 = -xarch=v9
|
||||
LIBAFSRPC_AS_ARCH_FLAGS_64 = -xarch=v9
|
||||
|
||||
<sunx86_57 sunx86_58 sunx86_59 sunx86_510 sunx86_511>
|
||||
LIBAFSRPC_OS_CFLAGS_libafsrpc_64 = -xarch=amd64
|
||||
LIBAFSRPC_AS_ARCH_FLAGS_64 = -xarch=amd64
|
||||
|
||||
<sun4x_510 sun4x_511>
|
||||
LIBAFSRPC_OS_CFLAGS_libafsrpc_32 = -xarch=v8plus
|
||||
LIBAFSRPC_AS_ARCH_FLAGS_32 = -xarch=v8plus
|
||||
|
||||
<sunx86>
|
||||
LIBAFSRPC_OS_CFLAGS_libafsrpc_32 = -xarch=pentium_pro
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright 2006, Sine Nomine Associates and others.
|
||||
# Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# This software has been released under the terms of the IBM Public
|
||||
@ -144,5 +144,5 @@ LIBAFSRPC_ALL_CFLAGS = \
|
||||
$(NULL)
|
||||
|
||||
LIBAFSRPC_DEPS = \
|
||||
$(LIBAFSRPC_DEPS_$(LIBAFSRPC_BUILDING)_$(LIBAFSRPC_BUILDING_LIB)_$(LIBAFSRPC_BUILDING_THR)_$(LIBAFSRPC_BUILDING_INST)) \
|
||||
$(LIBAFSRPC_DEPS_$(LIBAFSRPC_BUILDING)_$(LIBAFSRPC_BUILDING_LIB)_$(LIBAFSRPC_BUILDING_THR)_$(LIBAFSRPC_BUILDING_INST)_$(LIBAFSRPC_BUILDING_BIT)) \
|
||||
$(NULL)
|
||||
|
@ -30,11 +30,26 @@ SYS_OBJDIR=$(TOP_OBJDIR)/src/sys
|
||||
TRACE_OBJDIR=$(TOP_OBJDIR)/src/trace
|
||||
UTIL_OBJDIR=$(TOP_OBJDIR)/src/util
|
||||
|
||||
SFLAGS=-P -I${TOP_INCDIR}
|
||||
|
||||
LIBAFSRPC_VERSION_MAJOR = 1
|
||||
LIBAFSRPC_VERSION_MINOR = 1
|
||||
LIBAFSRPC_DEPS_libafsrpc_shlib_pthread_inst = ${MT_LIBS} ${OSI_LIBS} -L$(TOP_OBJDIR)/lib -losi-pthread-inst
|
||||
LIBAFSRPC_DEPS_libafsrpc_shlib_pthread_ni = ${MT_LIBS} ${OSI_LIBS} -L$(TOP_OBJDIR)/lib -losi-pthread-ni
|
||||
LIBAFSRPC_DEPS_libafsrpc_shlib_pthread_inst_32 = \
|
||||
${MT_LIBS} ${OSI_LIBS} \
|
||||
-L$(TOP_OBJDIR)/lib -losi-pthread-inst-32 \
|
||||
$(NULL)
|
||||
LIBAFSRPC_DEPS_libafsrpc_shlib_pthread_inst_64 = \
|
||||
${MT_LIBS} ${OSI_LIBS} \
|
||||
-L$(TOP_OBJDIR)/lib -losi-pthread-inst-64 \
|
||||
$(NULL)
|
||||
LIBAFSRPC_DEPS_libafsrpc_shlib_pthread_ni_32 = \
|
||||
${MT_LIBS} ${OSI_LIBS} \
|
||||
-L$(TOP_OBJDIR)/lib -losi-pthread-ni-32 \
|
||||
$(NULL)
|
||||
LIBAFSRPC_DEPS_libafsrpc_shlib_pthread_ni_64 = \
|
||||
${MT_LIBS} ${OSI_LIBS} \
|
||||
-L$(TOP_OBJDIR)/lib -losi-pthread-ni-64 \
|
||||
$(NULL)
|
||||
|
||||
# core libafsrpc build objects
|
||||
# for all builds, kernel, ukernel, and userspace
|
||||
@ -360,9 +375,6 @@ rxkad_fcrypt.o: $(RXKAD_SRCDIR)/domestic/fcrypt.c
|
||||
rxkad_crypt_conn.o: $(RXKAD_SRCDIR)/domestic/crypt_conn.c
|
||||
$(CRULE_OPT)
|
||||
|
||||
AFS_component_version_number.o: $(RX_OBJDIR)/AFS_component_version_number.c
|
||||
$(CRULE_OPT)
|
||||
|
||||
xdr.o: $(RX_SRCDIR)/xdr.c
|
||||
$(CRULE_OPT)
|
||||
|
||||
@ -520,22 +532,23 @@ lwp_waitkey.o: $(LWP_SRCDIR)/waitkey.c
|
||||
|
||||
sys_syscall.o: $(SYS_SRCDIR)/syscall.s
|
||||
case "$(SYS_NAME)" in \
|
||||
sun4x_5* | sunx86_5*) \
|
||||
/usr/ccs/lib/cpp ${SFLAGS} $(SYS_SRCDIR)/syscall.s syscall.ss; \
|
||||
as -o sys_syscall.o syscall.ss; \
|
||||
$(RM) syscall.ss;; \
|
||||
sun4x_5* | sunx86_5*) \
|
||||
/usr/ccs/lib/cpp ${SFLAGS} $(SYS_SRCDIR)/syscall.s syscall.ss ; \
|
||||
as $(LIBAFSRPC_AS_ARCH_FLAGS_$(LIBAFSRPC_BUILDING_BIT)) \
|
||||
-o sys_syscall.o syscall.ss ; \
|
||||
$(RM) syscall.ss ;; \
|
||||
sgi_* | *_darwin_* ) \
|
||||
${CC} ${CFLAGS} -o sys_syscall.o -c $(SYS_SRCDIR)/syscall.s;; \
|
||||
${CC} ${CFLAGS} -o sys_syscall.o -c $(SYS_SRCDIR)/syscall.s ;; \
|
||||
alpha_dux?? ) \
|
||||
${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER $(SYS_SRCDIR)/syscall.s; \
|
||||
${AS} -o sys_syscall.o syscall.i; \
|
||||
$(RM) -f syscall.ss syscall.i;; \
|
||||
${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER $(SYS_SRCDIR)/syscall.s ; \
|
||||
${AS} -o sys_syscall.o syscall.i ; \
|
||||
$(RM) -f syscall.ss syscall.i ;; \
|
||||
*bsd* ) \
|
||||
touch sys_syscall.o ;; \
|
||||
*) \
|
||||
/lib/cpp ${SFLAGS} $(SYS_SRCDIR)/syscall.s syscall.ss; \
|
||||
as -o sys_syscall.o syscall.ss; \
|
||||
$(RM) syscall.ss;; \
|
||||
/lib/cpp ${SFLAGS} $(SYS_SRCDIR)/syscall.s syscall.ss ; \
|
||||
as -o sys_syscall.o syscall.ss ; \
|
||||
$(RM) syscall.ss ;; \
|
||||
esac
|
||||
|
||||
rxstat.o: $(RXSTAT_SRCDIR)/rxstat.c
|
||||
|
@ -9,7 +9,7 @@
|
||||
# It will include objects listed in ${AFSAOBJS} and ${AFSNONFSOBJS}
|
||||
# Appropriate source files for each object will be symlinked into ${KDIR}
|
||||
# EXTRA_CFLAGS will be set to ${CFLAGS} ${COMMON_INCLUDE}
|
||||
|
||||
#
|
||||
# Produces ${KDIR}/Makefile, suitable for use with kbuild
|
||||
|
||||
use IO::File;
|
||||
|
@ -37,13 +37,13 @@ include Makefile.common
|
||||
|
||||
# override
|
||||
<sun4x_57 sun4x_58 sun4x_59 sun4x_510 sun4x_511>
|
||||
LIBTRACE_OS_CFLAGS_libtrace_64 = -xarch=v9
|
||||
LIBTRACE_OS_CFLAGS_libosi_trace_agent_64 = -xarch=v9
|
||||
|
||||
<sunx86_57 sunx86_58 sunx86_59 sunx86_510 sunx86_511>
|
||||
LIBTRACE_OS_CFLAGS_libtrace_64 = -xarch=amd64
|
||||
<sunx86_510 sunx86_511>
|
||||
LIBTRACE_OS_CFLAGS_libosi_trace_agent_64 = -xarch=amd64
|
||||
|
||||
<sun4x_510 sun4x_511>
|
||||
LIBTRACE_OS_CFLAGS_libtrace_32 = -xarch=v8plus
|
||||
LIBTRACE_OS_CFLAGS_libosi_trace_agent_32 = -xarch=v8plus
|
||||
|
||||
<sunx86>
|
||||
LIBTRACE_OS_CFLAGS_libtrace_32 = -xarch=pentium_pro
|
||||
LIBTRACE_OS_CFLAGS_libosi_trace_agent_32 = -xarch=pentium_pro
|
||||
|
@ -37,13 +37,13 @@ include Makefile.common
|
||||
|
||||
# override
|
||||
<sun4x_57 sun4x_58 sun4x_59 sun4x_510 sun4x_511>
|
||||
LIBTRACE_OS_CFLAGS_libtrace_64 = -xarch=v9
|
||||
LIBTRACE_OS_CFLAGS_libosi_trace_analyzer_64 = -xarch=v9
|
||||
|
||||
<sunx86_57 sunx86_58 sunx86_59 sunx86_510 sunx86_511>
|
||||
LIBTRACE_OS_CFLAGS_libtrace_64 = -xarch=amd64
|
||||
<sunx86_510 sunx86_511>
|
||||
LIBTRACE_OS_CFLAGS_libosi_trace_analyzer_64 = -xarch=amd64
|
||||
|
||||
<sun4x_510 sun4x_511>
|
||||
LIBTRACE_OS_CFLAGS_libtrace_32 = -xarch=v8plus
|
||||
LIBTRACE_OS_CFLAGS_libosi_trace_analyzer_32 = -xarch=v8plus
|
||||
|
||||
<sunx86>
|
||||
LIBTRACE_OS_CFLAGS_libtrace_32 = -xarch=pentium_pro
|
||||
LIBTRACE_OS_CFLAGS_libosi_trace_analyzer_32 = -xarch=pentium_pro
|
||||
|
@ -37,13 +37,13 @@ include Makefile.common
|
||||
|
||||
# override
|
||||
<sun4x_57 sun4x_58 sun4x_59 sun4x_510 sun4x_511>
|
||||
LIBTRACE_OS_CFLAGS_libtrace_64 = -xarch=v9
|
||||
LIBTRACE_OS_CFLAGS_libosi_trace_common_64 = -xarch=v9
|
||||
|
||||
<sunx86_57 sunx86_58 sunx86_59 sunx86_510 sunx86_511>
|
||||
LIBTRACE_OS_CFLAGS_libtrace_64 = -xarch=amd64
|
||||
<sunx86_510 sunx86_511>
|
||||
LIBTRACE_OS_CFLAGS_libosi_trace_common_64 = -xarch=amd64
|
||||
|
||||
<sun4x_510 sun4x_511>
|
||||
LIBTRACE_OS_CFLAGS_libtrace_32 = -xarch=v8plus
|
||||
LIBTRACE_OS_CFLAGS_libosi_trace_common_32 = -xarch=v8plus
|
||||
|
||||
<sunx86>
|
||||
LIBTRACE_OS_CFLAGS_libtrace_32 = -xarch=pentium_pro
|
||||
LIBTRACE_OS_CFLAGS_libosi_trace_common_32 = -xarch=pentium_pro
|
||||
|
@ -37,13 +37,13 @@ include Makefile.common
|
||||
|
||||
# override
|
||||
<sun4x_57 sun4x_58 sun4x_59 sun4x_510 sun4x_511>
|
||||
LIBTRACE_OS_CFLAGS_libtrace_64 = -xarch=v9
|
||||
LIBTRACE_OS_CFLAGS_libosi_trace_console_64 = -xarch=v9
|
||||
|
||||
<sunx86_57 sunx86_58 sunx86_59 sunx86_510 sunx86_511>
|
||||
LIBTRACE_OS_CFLAGS_libtrace_64 = -xarch=amd64
|
||||
<sunx86_510 sunx86_511>
|
||||
LIBTRACE_OS_CFLAGS_libosi_trace_console_64 = -xarch=amd64
|
||||
|
||||
<sun4x_510 sun4x_511>
|
||||
LIBTRACE_OS_CFLAGS_libtrace_32 = -xarch=v8plus
|
||||
LIBTRACE_OS_CFLAGS_libosi_trace_console_32 = -xarch=v8plus
|
||||
|
||||
<sunx86>
|
||||
LIBTRACE_OS_CFLAGS_libtrace_32 = -xarch=pentium_pro
|
||||
LIBTRACE_OS_CFLAGS_libosi_trace_console_32 = -xarch=pentium_pro
|
||||
|
@ -37,13 +37,13 @@ include Makefile.common
|
||||
|
||||
# override
|
||||
<sun4x_57 sun4x_58 sun4x_59 sun4x_510 sun4x_511>
|
||||
LIBTRACE_OS_CFLAGS_libtrace_64 = -xarch=v9
|
||||
LIBTRACE_OS_CFLAGS_libosi_trace_consumer_64 = -xarch=v9
|
||||
|
||||
<sunx86_57 sunx86_58 sunx86_59 sunx86_510 sunx86_511>
|
||||
LIBTRACE_OS_CFLAGS_libtrace_64 = -xarch=amd64
|
||||
<sunx86_510 sunx86_511>
|
||||
LIBTRACE_OS_CFLAGS_libosi_trace_consumer_64 = -xarch=amd64
|
||||
|
||||
<sun4x_510 sun4x_511>
|
||||
LIBTRACE_OS_CFLAGS_libtrace_32 = -xarch=v8plus
|
||||
LIBTRACE_OS_CFLAGS_libosi_trace_consumer_32 = -xarch=v8plus
|
||||
|
||||
<sunx86>
|
||||
LIBTRACE_OS_CFLAGS_libtrace_32 = -xarch=pentium_pro
|
||||
LIBTRACE_OS_CFLAGS_libosi_trace_consumer_32 = -xarch=pentium_pro
|
||||
|
@ -6,7 +6,7 @@
|
||||
# directory or online at http://www.openafs.org/dl/license10.html
|
||||
#
|
||||
# Portions Copyright (c) 2003 Apple Computer, Inc.
|
||||
# Portions Copyright (c) 2006 Sine Nomine Associates
|
||||
# Portions Copyright (c) 2006-2007 Sine Nomine Associates
|
||||
|
||||
srcdir=@srcdir@
|
||||
include @TOP_OBJDIR@/src/config/Makefile.config
|
||||
@ -17,6 +17,10 @@ PUBLICHEADERS = \
|
||||
condvar_options.h \
|
||||
counter.h \
|
||||
counter_inline.h \
|
||||
demux.h \
|
||||
demux_impl.h \
|
||||
demux_options.h \
|
||||
demux_types.h \
|
||||
event.h \
|
||||
event_lock.h \
|
||||
event_types.h \
|
||||
@ -31,6 +35,7 @@ PUBLICHEADERS = \
|
||||
mutex_options.h \
|
||||
object_cache.h \
|
||||
object_cache_impl.h \
|
||||
object_cache_impl_types.h \
|
||||
object_cache_types.h \
|
||||
object_cache_options.h \
|
||||
object_init.h \
|
||||
@ -46,16 +51,17 @@ PUBLICHEADERS = \
|
||||
stats_impl.h \
|
||||
string.h \
|
||||
syscall.h \
|
||||
thread.h \
|
||||
thread_bind.h \
|
||||
thread_event.h \
|
||||
thread_event_impl.h \
|
||||
thread_event_inline.h \
|
||||
thread_option.h \
|
||||
time.h \
|
||||
time_approx.h \
|
||||
ucopy.h \
|
||||
uproc.h \
|
||||
uproc_inline.h \
|
||||
usignal.h \
|
||||
usignal_inline.h \
|
||||
usyscall.h \
|
||||
usyscall_impl.h \
|
||||
usysincludes.h \
|
||||
@ -69,22 +75,36 @@ INSTALL_HDR_DIR=${DESTDIR}${includedir}/osi/COMMON
|
||||
DEST_HDR_DIR=${DEST}/include/osi/COMMON
|
||||
include @TOP_OBJDIR@/src/config/Makefile.public-header
|
||||
|
||||
RECURSE_DIRS= \
|
||||
data \
|
||||
$(NULL)
|
||||
|
||||
include @TOP_OBJDIR@/src/config/Makefile.recurse
|
||||
|
||||
all: \
|
||||
depinstall
|
||||
depinstall \
|
||||
build_recurse \
|
||||
$(NULL)
|
||||
|
||||
depinstall: \
|
||||
depinstall_hdrs
|
||||
depinstall_hdrs \
|
||||
depinstall_recurse \
|
||||
$(NULL)
|
||||
|
||||
#
|
||||
# Installation targets
|
||||
#
|
||||
install: \
|
||||
install_hdrs
|
||||
install_hdrs \
|
||||
install_recurse \
|
||||
$(NULL)
|
||||
|
||||
dest: \
|
||||
dest_hdrs
|
||||
dest_hdrs \
|
||||
dest_recurse \
|
||||
$(NULL)
|
||||
|
||||
#
|
||||
# Misc. targets
|
||||
#
|
||||
clean:
|
||||
clean: clean_recurse
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -97,91 +97,91 @@ osi_cache_l3_exists(void)
|
||||
|
||||
|
||||
osi_result
|
||||
osi_cache_l1i_size(size_t * val)
|
||||
osi_cache_l1i_size(osi_size_t * val)
|
||||
{
|
||||
*val = osi_cache_info.l1i_size;
|
||||
return (osi_cache_info.l1i_probed) ? OSI_OK : OSI_CACHE_RESULT_FAKED;
|
||||
}
|
||||
|
||||
osi_result
|
||||
osi_cache_l1i_line_size(size_t * val)
|
||||
osi_cache_l1i_line_size(osi_size_t * val)
|
||||
{
|
||||
*val = osi_cache_info.l1i_line_size;
|
||||
return (osi_cache_info.l1i_probed) ? OSI_OK : OSI_CACHE_RESULT_FAKED;
|
||||
}
|
||||
|
||||
osi_result
|
||||
osi_cache_l1i_associativity(size_t * val)
|
||||
osi_cache_l1i_associativity(osi_size_t * val)
|
||||
{
|
||||
*val = osi_cache_info.l1i_associativity;
|
||||
return (osi_cache_info.l1i_probed) ? OSI_OK : OSI_CACHE_RESULT_FAKED;
|
||||
}
|
||||
|
||||
osi_result
|
||||
osi_cache_l1d_size(size_t * val)
|
||||
osi_cache_l1d_size(osi_size_t * val)
|
||||
{
|
||||
*val = osi_cache_info.l1d_size;
|
||||
return (osi_cache_info.l1d_probed) ? OSI_OK : OSI_CACHE_RESULT_FAKED;
|
||||
}
|
||||
|
||||
osi_result
|
||||
osi_cache_l1d_line_size(size_t * val)
|
||||
osi_cache_l1d_line_size(osi_size_t * val)
|
||||
{
|
||||
*val = osi_cache_info.l1d_line_size;
|
||||
return (osi_cache_info.l1d_probed) ? OSI_OK : OSI_CACHE_RESULT_FAKED;
|
||||
}
|
||||
|
||||
osi_result
|
||||
osi_cache_l1d_associativity(size_t * val)
|
||||
osi_cache_l1d_associativity(osi_size_t * val)
|
||||
{
|
||||
*val = osi_cache_info.l1d_associativity;
|
||||
return (osi_cache_info.l1d_probed) ? OSI_OK : OSI_CACHE_RESULT_FAKED;
|
||||
}
|
||||
|
||||
osi_result
|
||||
osi_cache_l2_size(size_t * val)
|
||||
osi_cache_l2_size(osi_size_t * val)
|
||||
{
|
||||
*val = osi_cache_info.l2_size;
|
||||
return (osi_cache_info.l2_probed) ? OSI_OK : OSI_CACHE_RESULT_FAKED;
|
||||
}
|
||||
|
||||
osi_result
|
||||
osi_cache_l2_line_size(size_t * val)
|
||||
osi_cache_l2_line_size(osi_size_t * val)
|
||||
{
|
||||
*val = osi_cache_info.l2_line_size;
|
||||
return (osi_cache_info.l2_probed) ? OSI_OK : OSI_CACHE_RESULT_FAKED;
|
||||
}
|
||||
|
||||
osi_result
|
||||
osi_cache_l2_associativity(size_t * val)
|
||||
osi_cache_l2_associativity(osi_size_t * val)
|
||||
{
|
||||
*val = osi_cache_info.l2_associativity;
|
||||
return (osi_cache_info.l2_probed) ? OSI_OK : OSI_CACHE_RESULT_FAKED;
|
||||
}
|
||||
|
||||
osi_result
|
||||
osi_cache_l3_size(size_t * val)
|
||||
osi_cache_l3_size(osi_size_t * val)
|
||||
{
|
||||
*val = osi_cache_info.l3_size;
|
||||
return (osi_cache_info.l3_probed) ? OSI_OK : OSI_CACHE_RESULT_FAKED;
|
||||
}
|
||||
|
||||
osi_result
|
||||
osi_cache_l3_line_size(size_t * val)
|
||||
osi_cache_l3_line_size(osi_size_t * val)
|
||||
{
|
||||
*val = osi_cache_info.l3_line_size;
|
||||
return (osi_cache_info.l3_probed) ? OSI_OK : OSI_CACHE_RESULT_FAKED;
|
||||
}
|
||||
|
||||
osi_result
|
||||
osi_cache_l3_associativity(size_t * val)
|
||||
osi_cache_l3_associativity(osi_size_t * val)
|
||||
{
|
||||
*val = osi_cache_info.l3_associativity;
|
||||
return (osi_cache_info.l3_probed) ? OSI_OK : OSI_CACHE_RESULT_FAKED;
|
||||
}
|
||||
|
||||
osi_result
|
||||
osi_cache_max_alignment(size_t * val)
|
||||
osi_cache_max_alignment(osi_size_t * val)
|
||||
{
|
||||
*val = osi_cache_info.max_alignment;
|
||||
return OSI_OK;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,11 +12,11 @@
|
||||
|
||||
|
||||
struct osi_cache_info {
|
||||
size_t l1i_size, l1i_line_size, l1i_associativity;
|
||||
size_t l1d_size, l1d_line_size, l1d_associativity;
|
||||
size_t l2_size, l2_line_size, l2_associativity;
|
||||
size_t l3_size, l3_line_size, l3_associativity;
|
||||
size_t max_alignment;
|
||||
osi_size_t l1i_size, l1i_line_size, l1i_associativity;
|
||||
osi_size_t l1d_size, l1d_line_size, l1d_associativity;
|
||||
osi_size_t l2_size, l2_line_size, l2_associativity;
|
||||
osi_size_t l3_size, l3_line_size, l3_associativity;
|
||||
osi_size_t max_alignment;
|
||||
int l1i_probed, l1d_probed, l2_probed, l3_probed;
|
||||
};
|
||||
osi_extern struct osi_cache_info osi_cache_info;
|
||||
@ -33,23 +33,23 @@ osi_extern osi_result osi_cache_l1d_exists(void);
|
||||
osi_extern osi_result osi_cache_l2_exists(void);
|
||||
osi_extern osi_result osi_cache_l3_exists(void);
|
||||
|
||||
osi_extern osi_result osi_cache_l1i_size(size_t *);
|
||||
osi_extern osi_result osi_cache_l1i_line_size(size_t *);
|
||||
osi_extern osi_result osi_cache_l1i_associativity(size_t *);
|
||||
osi_extern osi_result osi_cache_l1i_size(osi_size_t *);
|
||||
osi_extern osi_result osi_cache_l1i_line_size(osi_size_t *);
|
||||
osi_extern osi_result osi_cache_l1i_associativity(osi_size_t *);
|
||||
|
||||
osi_extern osi_result osi_cache_l1d_size(size_t *);
|
||||
osi_extern osi_result osi_cache_l1d_line_size(size_t *);
|
||||
osi_extern osi_result osi_cache_l1d_associativity(size_t *);
|
||||
osi_extern osi_result osi_cache_l1d_size(osi_size_t *);
|
||||
osi_extern osi_result osi_cache_l1d_line_size(osi_size_t *);
|
||||
osi_extern osi_result osi_cache_l1d_associativity(osi_size_t *);
|
||||
|
||||
osi_extern osi_result osi_cache_l2_size(size_t *);
|
||||
osi_extern osi_result osi_cache_l2_line_size(size_t *);
|
||||
osi_extern osi_result osi_cache_l2_associativity(size_t *);
|
||||
osi_extern osi_result osi_cache_l2_size(osi_size_t *);
|
||||
osi_extern osi_result osi_cache_l2_line_size(osi_size_t *);
|
||||
osi_extern osi_result osi_cache_l2_associativity(osi_size_t *);
|
||||
|
||||
osi_extern osi_result osi_cache_l3_size(size_t *);
|
||||
osi_extern osi_result osi_cache_l3_line_size(size_t *);
|
||||
osi_extern osi_result osi_cache_l3_associativity(size_t *);
|
||||
osi_extern osi_result osi_cache_l3_size(osi_size_t *);
|
||||
osi_extern osi_result osi_cache_l3_line_size(osi_size_t *);
|
||||
osi_extern osi_result osi_cache_l3_associativity(osi_size_t *);
|
||||
|
||||
osi_extern osi_result osi_cache_max_alignment(size_t *);
|
||||
osi_extern osi_result osi_cache_max_alignment(osi_size_t *);
|
||||
|
||||
|
||||
#endif /* _OSI_COMMON_CACHE_H */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -12,6 +12,20 @@
|
||||
|
||||
#include <osi/osi_mem.h>
|
||||
|
||||
typedef struct osi_condvar_options {
|
||||
osi_uint8 preemptive_only; /* only activate in pre-emptive environments (e.g. no-op for LWP) */
|
||||
osi_uint8 trace_allowed; /* whether or not lock tracing is allowed */
|
||||
osi_uint8 trace_enabled; /* enable lock tracing */
|
||||
} osi_condvar_options_t;
|
||||
/* defaults: { 0, 1, 0 } */
|
||||
|
||||
typedef enum {
|
||||
OSI_CONDVAR_OPTION_PREEMPTIVE_ONLY,
|
||||
OSI_CONDVAR_OPTION_TRACE_ALLOWED,
|
||||
OSI_CONDVAR_OPTION_TRACE_ENABLED,
|
||||
OSI_CONDVAR_OPTION_MAX_ID
|
||||
} osi_condvar_options_param_t;
|
||||
|
||||
#define osi_condvar_options_Init(opt) \
|
||||
osi_Macro_Begin \
|
||||
(opt)->preemptive_only = 0; \
|
||||
|
404
src/osi/COMMON/demux.c
Normal file
404
src/osi/COMMON/demux.c
Normal file
@ -0,0 +1,404 @@
|
||||
/*
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
* License. For details, see the LICENSE file in the top-level source
|
||||
* directory or online at http://www.openafs.org/dl/license10.html
|
||||
*/
|
||||
|
||||
#include <osi/osi_impl.h>
|
||||
#include <osi/osi_cache.h>
|
||||
#include <osi/osi_object_cache.h>
|
||||
#include <osi/osi_demux.h>
|
||||
#include <osi/COMMON/demux_types.h>
|
||||
#include <osi/COMMON/demux_impl.h>
|
||||
|
||||
osi_mem_object_cache_t * osi_demux_cache = osi_NULL;
|
||||
osi_mem_object_cache_t * osi_demux_action_cache = osi_NULL;
|
||||
|
||||
osi_static int
|
||||
osi_demux_cache_ctor(void * buf, void * rock, int flags);
|
||||
osi_static void
|
||||
osi_demux_cache_dtor(void * buf, void * rock);
|
||||
|
||||
osi_static osi_result
|
||||
osi_demux_action_alloc(osi_demux_action_t **);
|
||||
osi_static osi_result
|
||||
osi_demux_action_free(osi_demux_action_t *);
|
||||
|
||||
osi_static int
|
||||
osi_demux_cache_ctor(void * buf, void * rock, int flags)
|
||||
{
|
||||
osi_demux_t * handle = buf;
|
||||
osi_uint32 i;
|
||||
|
||||
for (i = 0; i < OSI_DEMUX_HASH_TABLE_SIZE; i++) {
|
||||
osi_list_Init_Head(&handle->hash_table[i].hash_chain);
|
||||
osi_rwlock_Init(&handle->hash_table[i].chain_lock,
|
||||
osi_impl_rwlock_opts());
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
osi_static void
|
||||
osi_demux_cache_dtor(void * buf, void * rock)
|
||||
{
|
||||
osi_demux_t * handle = buf;
|
||||
osi_uint32 i;
|
||||
|
||||
for (i = 0; i < OSI_DEMUX_HASH_TABLE_SIZE; i++) {
|
||||
osi_rwlock_Destroy(&handle->hash_table[i].chain_lock);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* allocate a demux object
|
||||
*
|
||||
* [OUT] demux_out
|
||||
* [IN] demux_rock
|
||||
* [IN] opts
|
||||
*
|
||||
* returns:
|
||||
* OSI_OK on success
|
||||
* OSI_ERROR_NOMEM on out of memory condition
|
||||
*/
|
||||
osi_result
|
||||
osi_demux_create(osi_demux_t ** demux_out,
|
||||
void * demux_rock,
|
||||
osi_demux_options_t * opts)
|
||||
{
|
||||
osi_result res = OSI_OK;
|
||||
osi_demux_t * demux;
|
||||
|
||||
*demux_out = demux = (osi_demux_t *)
|
||||
osi_mem_object_cache_alloc(osi_demux_cache);
|
||||
if (osi_compiler_expect_false(demux == osi_NULL)) {
|
||||
res = OSI_ERROR_NOMEM;
|
||||
goto error;
|
||||
}
|
||||
|
||||
demux->rock = demux_rock;
|
||||
osi_demux_options_Copy(&demux->opts, opts);
|
||||
|
||||
error:
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
* destroy a demux object
|
||||
*
|
||||
* [IN] demux
|
||||
*
|
||||
* returns:
|
||||
* OSI_OK always
|
||||
*/
|
||||
osi_result
|
||||
osi_demux_destroy(osi_demux_t * demux)
|
||||
{
|
||||
osi_result res = OSI_OK;
|
||||
osi_demux_action_t * action, * na;
|
||||
osi_uint32 i;
|
||||
|
||||
/* free all the action objects first */
|
||||
for (i = 0; i < OSI_DEMUX_HASH_TABLE_SIZE; i++) {
|
||||
osi_rwlock_WrLock(&demux->hash_table[i].chain_lock);
|
||||
for (osi_list_Scan(&demux->hash_table[i].hash_chain,
|
||||
action, na,
|
||||
osi_demux_action_t,
|
||||
hash_chain)) {
|
||||
osi_list_Remove(action,
|
||||
osi_demux_action_t,
|
||||
hash_chain);
|
||||
osi_demux_action_free(action);
|
||||
}
|
||||
osi_rwlock_Unlock(&demux->hash_table[i].chain_lock);
|
||||
}
|
||||
|
||||
osi_mem_object_cache_free(osi_demux_cache, demux);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
* allocate an action object
|
||||
*
|
||||
* [OUT] action_out
|
||||
*
|
||||
* returns:
|
||||
* OSI_OK on success
|
||||
* OSI_ERROR_NOMEM on out of memory condition
|
||||
*/
|
||||
osi_static osi_result
|
||||
osi_demux_action_alloc(osi_demux_action_t ** action_out)
|
||||
{
|
||||
osi_result res = OSI_OK;
|
||||
osi_demux_action_t * action;
|
||||
|
||||
*action_out = action = (osi_demux_action_t *)
|
||||
osi_mem_object_cache_alloc(osi_demux_action_cache);
|
||||
if (osi_compiler_expect_false(action == osi_NULL)) {
|
||||
res = OSI_ERROR_NOMEM;
|
||||
goto error;
|
||||
}
|
||||
|
||||
error:
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
* free an action object
|
||||
*
|
||||
* [IN] action
|
||||
*
|
||||
* returns:
|
||||
* OSI_OK on success
|
||||
* OSI_FAIL if action is still on a linked list
|
||||
*/
|
||||
osi_static osi_result
|
||||
osi_demux_action_free(osi_demux_action_t * action)
|
||||
{
|
||||
osi_result res = OSI_OK;
|
||||
|
||||
if (osi_compiler_expect_false(osi_list_IsOnList(action,
|
||||
osi_demux_action_t,
|
||||
hash_chain))) {
|
||||
res = OSI_FAIL;
|
||||
goto error;
|
||||
}
|
||||
|
||||
osi_mem_object_cache_free(osi_demux_action_cache, action);
|
||||
|
||||
error:
|
||||
return res;
|
||||
}
|
||||
|
||||
/*
|
||||
* register an action with a demux object
|
||||
*
|
||||
* [IN] demux --
|
||||
* [IN] action --
|
||||
* [IN] action_rock --
|
||||
* [IN] action_fp --
|
||||
* [IN] action_opts -- options
|
||||
*
|
||||
* returns:
|
||||
* OSI_OK on success
|
||||
* OSI_FAIL if a terminal action is already registered
|
||||
* OSI_FAIL if identical record already exists
|
||||
* OSI_FAIL if action function pointer is NULL
|
||||
*/
|
||||
osi_result
|
||||
osi_demux_action_register(osi_demux_t * demux,
|
||||
osi_uint32 action,
|
||||
void * action_rock,
|
||||
osi_demux_action_func_t * action_fp,
|
||||
osi_demux_action_options_t * action_opts)
|
||||
{
|
||||
osi_result res, code = OSI_OK;
|
||||
osi_demux_action_t * iter, * action_obj;
|
||||
osi_uint32 chain;
|
||||
|
||||
if (osi_compiler_expect_false(action_fp == osi_NULL)) {
|
||||
code = OSI_FAIL;
|
||||
goto error;
|
||||
}
|
||||
|
||||
chain = OSI_DEMUX_HASH_TABLE_FUNC(action);
|
||||
|
||||
res = osi_demux_action_alloc(&action_obj);
|
||||
if (OSI_RESULT_FAIL_UNLIKELY(res)) {
|
||||
code = res;
|
||||
goto error;
|
||||
}
|
||||
|
||||
osi_rwlock_WrLock(&demux->hash_table[chain].chain_lock);
|
||||
|
||||
/* check for duplicates */
|
||||
for (osi_list_Scan_Immutable(&demux->hash_table[chain].hash_chain,
|
||||
iter,
|
||||
osi_demux_action_t,
|
||||
hash_chain)) {
|
||||
if ((iter->action == action) &&
|
||||
((iter->opts.terminal == OSI_TRUE) ||
|
||||
((iter->action_rock == action_rock) &&
|
||||
(iter->action_fp == action_fp)))) {
|
||||
res = OSI_FAIL;
|
||||
goto error_sync;
|
||||
}
|
||||
}
|
||||
|
||||
/* register new action entry */
|
||||
action_obj->action = action;
|
||||
action_obj->action_rock = action_rock;
|
||||
action_obj->action_fp = action_fp;
|
||||
osi_demux_action_options_Copy(&action_obj->opts, action_opts);
|
||||
osi_list_Append(&demux->hash_table[chain].hash_chain,
|
||||
action_obj,
|
||||
osi_demux_action_t,
|
||||
hash_chain);
|
||||
osi_rwlock_Unlock(&demux->hash_table[chain].chain_lock);
|
||||
|
||||
error:
|
||||
return code;
|
||||
|
||||
error_sync:
|
||||
osi_rwlock_Unlock(&demux->hash_table[chain].chain_lock);
|
||||
osi_demux_action_free(action_obj);
|
||||
goto error;
|
||||
}
|
||||
|
||||
/*
|
||||
* unregister an action from a demux object
|
||||
*
|
||||
* [IN] demux -- demux object
|
||||
* [IN] action -- action id
|
||||
* [IN] action_rock -- rock to associate with this action
|
||||
* [IN] action_fp -- action function pointer
|
||||
*
|
||||
* returns:
|
||||
* OSI_OK on success
|
||||
* OSI_FAIL if no such record found in demux
|
||||
*/
|
||||
osi_result
|
||||
osi_demux_action_unregister(osi_demux_t * demux,
|
||||
osi_uint32 action,
|
||||
void * action_rock,
|
||||
osi_demux_action_func_t * action_fp)
|
||||
{
|
||||
osi_result res, code = OSI_FAIL;
|
||||
osi_uint32 chain;
|
||||
osi_demux_action_t * iter, * na;
|
||||
|
||||
chain = OSI_DEMUX_HASH_TABLE_FUNC(action);
|
||||
|
||||
osi_rwlock_WrLock(&demux->hash_table[chain].chain_lock);
|
||||
for (osi_list_Scan(&demux->hash_table[chain].hash_chain,
|
||||
iter, na,
|
||||
osi_demux_action_t,
|
||||
hash_chain)) {
|
||||
if ((iter->action == action) &&
|
||||
(iter->action_rock == action_rock) &&
|
||||
(iter->action_fp == action_fp)) {
|
||||
code = OSI_OK;
|
||||
osi_list_Remove(iter,
|
||||
osi_demux_action_t,
|
||||
hash_chain);
|
||||
osi_demux_action_free(iter);
|
||||
break;
|
||||
}
|
||||
}
|
||||
osi_rwlock_Unlock(&demux->hash_table[chain].chain_lock);
|
||||
|
||||
return code;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* perform a mux call
|
||||
*
|
||||
* [IN] demux
|
||||
* [IN] action
|
||||
* [IN] caller_rock
|
||||
*
|
||||
* returns:
|
||||
* OSI_ERROR_DEMUX_NO_SUCH_ACTION if no action handler registered
|
||||
*/
|
||||
osi_result
|
||||
osi_demux_call(osi_demux_t * demux,
|
||||
osi_uint32 action,
|
||||
void * caller_rock)
|
||||
{
|
||||
osi_result res, code = OSI_OK;
|
||||
osi_demux_action_t * iter;
|
||||
osi_uint32 chain;
|
||||
|
||||
chain = OSI_DEMUX_HASH_TABLE_FUNC(action);
|
||||
|
||||
osi_rwlock_RdLock(&demux->hash_table[chain].chain_lock);
|
||||
for (osi_list_Scan_Immutable(&demux->hash_table[chain].hash_chain,
|
||||
iter,
|
||||
osi_demux_action_t,
|
||||
hash_chain)) {
|
||||
if (iter->action == action) {
|
||||
res = (*iter->action_fp)(action,
|
||||
caller_rock,
|
||||
iter->action_rock,
|
||||
demux->rock);
|
||||
if (OSI_RESULT_FAIL(res)) {
|
||||
if (iter->opts.error_is_fatal == OSI_TRUE) {
|
||||
code = res;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (iter->opts.terminal == OSI_TRUE) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
osi_rwlock_Unlock(&demux->hash_table[chain].chain_lock);
|
||||
|
||||
return code;
|
||||
}
|
||||
|
||||
|
||||
|
||||
osi_result
|
||||
osi_demux_PkgInit(void)
|
||||
{
|
||||
osi_result res, code = OSI_OK;
|
||||
osi_size_t align;
|
||||
|
||||
res = osi_cache_max_alignment(&align);
|
||||
if (OSI_RESULT_FAIL(res)) {
|
||||
align = 64;
|
||||
}
|
||||
|
||||
osi_demux_cache =
|
||||
osi_mem_object_cache_create("osi_demux",
|
||||
sizeof(osi_demux_t),
|
||||
align,
|
||||
osi_NULL,
|
||||
&osi_demux_cache_ctor,
|
||||
&osi_demux_cache_dtor,
|
||||
osi_NULL,
|
||||
osi_impl_mem_object_cache_opts());
|
||||
if (osi_compiler_expect_false(osi_demux_cache == osi_NULL)) {
|
||||
code = OSI_ERROR_NOMEM;
|
||||
goto error;
|
||||
}
|
||||
|
||||
osi_demux_action_cache =
|
||||
osi_mem_object_cache_create("osi_demux_action",
|
||||
sizeof(osi_demux_action_t),
|
||||
align,
|
||||
osi_NULL,
|
||||
osi_NULL,
|
||||
osi_NULL,
|
||||
osi_NULL,
|
||||
osi_impl_mem_object_cache_opts());
|
||||
if (osi_compiler_expect_false(osi_demux_action_cache == osi_NULL)) {
|
||||
code = OSI_ERROR_NOMEM;
|
||||
goto error;
|
||||
}
|
||||
|
||||
error:
|
||||
return code;
|
||||
}
|
||||
|
||||
osi_result
|
||||
osi_demux_PkgShutdown(void)
|
||||
{
|
||||
osi_result res = OSI_OK;
|
||||
|
||||
if (osi_demux_cache) {
|
||||
osi_mem_object_cache_destroy(osi_demux_cache);
|
||||
}
|
||||
if (osi_demux_action_cache) {
|
||||
osi_mem_object_cache_destroy(osi_demux_action_cache);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
112
src/osi/COMMON/demux.h
Normal file
112
src/osi/COMMON/demux.h
Normal file
@ -0,0 +1,112 @@
|
||||
/*
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
* License. For details, see the LICENSE file in the top-level source
|
||||
* directory or online at http://www.openafs.org/dl/license10.html
|
||||
*/
|
||||
|
||||
#ifndef _OSI_COMMON_DEMUX_H
|
||||
#define _OSI_COMMON_DEMUX_H 1
|
||||
|
||||
/*
|
||||
* osi
|
||||
* demultiplexer abstraction
|
||||
* internal type definitions
|
||||
*/
|
||||
|
||||
#include <osi/COMMON/demux_types.h>
|
||||
|
||||
/* forward declare */
|
||||
struct osi_demux;
|
||||
typedef struct osi_demux osi_demux_t;
|
||||
|
||||
|
||||
osi_extern osi_result
|
||||
osi_demux_create(osi_demux_t **,
|
||||
void * demux_rock,
|
||||
osi_demux_options_t *);
|
||||
osi_extern osi_result
|
||||
osi_demux_destroy(osi_demux_t *);
|
||||
|
||||
osi_extern osi_result
|
||||
osi_demux_action_register(osi_demux_t *,
|
||||
osi_uint32 action,
|
||||
void * action_rock,
|
||||
osi_demux_action_func_t *,
|
||||
osi_demux_action_options_t *);
|
||||
osi_extern osi_result
|
||||
osi_demux_action_unregister(osi_demux_t *,
|
||||
osi_uint32 action,
|
||||
void * action_rock,
|
||||
osi_demux_action_func_t *);
|
||||
|
||||
osi_extern osi_result
|
||||
osi_demux_call(osi_demux_t *,
|
||||
osi_uint32 action,
|
||||
void * caller_rock);
|
||||
|
||||
|
||||
osi_extern osi_result osi_demux_PkgInit(void);
|
||||
osi_extern osi_result osi_demux_PkgShutdown(void);
|
||||
|
||||
|
||||
/*
|
||||
* action function automated declarations and prototypes
|
||||
*
|
||||
* to provide a small degree of future-proofing for the demux interface,
|
||||
* we strongly encourage the use of these macros.
|
||||
*
|
||||
* example use for global symbol demux function
|
||||
*
|
||||
* h file:
|
||||
*
|
||||
* OSI_DEMUX_ACTION_PROTOTYPE(osi_example_action_foo);
|
||||
*
|
||||
* c file:
|
||||
*
|
||||
* OSI_DEMUX_ACTION_DECL(osi_example_action_foo) {
|
||||
* (osi_Msg "action foo called with the following args: action = %u, caller rock = %p, action rock = %p, demux rock = %p\n",
|
||||
* OSI_DEMUX_ACTION_ARG_ACTION,
|
||||
* OSI_DEMUX_ACTION_ARG_ROCK_CALLER,
|
||||
* OSI_DEMUX_ACTION_ARG_ROCK_ACTION,
|
||||
* OSI_DEMUX_ACTION_ARG_ROCK_DEMUX);
|
||||
* return OSI_OK;
|
||||
* }
|
||||
*
|
||||
*/
|
||||
|
||||
#define OSI_DEMUX_ACTION_ARG_ACTION action
|
||||
#define OSI_DEMUX_ACTION_ARG_ROCK_CALLER rock_caller
|
||||
#define OSI_DEMUX_ACTION_ARG_ROCK_ACTION rock_action
|
||||
#define OSI_DEMUX_ACTION_ARG_ROCK_DEMUX rock_demux
|
||||
|
||||
#define OSI_DEMUX_ACTION_DECL(sym) \
|
||||
osi_result sym (\
|
||||
osi_uint32 OSI_DEMUX_ACTION_ARG_ACTION, \
|
||||
void * OSI_DEMUX_ACTION_ARG_ROCK_CALLER, \
|
||||
void * OSI_DEMUX_ACTION_ARG_ROCK_ACTION, \
|
||||
void * OSI_DEMUX_ACTION_ARG_ROCK_DEMUX )
|
||||
#define OSI_DEMUX_ACTION_PROTOTYPE(sym) \
|
||||
osi_extern osi_result sym (\
|
||||
osi_uint32 OSI_DEMUX_ACTION_ARG_ACTION, \
|
||||
void * OSI_DEMUX_ACTION_ARG_ROCK_CALLER, \
|
||||
void * OSI_DEMUX_ACTION_ARG_ROCK_ACTION, \
|
||||
void * OSI_DEMUX_ACTION_ARG_ROCK_DEMUX )
|
||||
|
||||
#define OSI_DEMUX_ACTION_STATIC_DECL(sym) \
|
||||
osi_static osi_result sym (\
|
||||
osi_uint32 OSI_DEMUX_ACTION_ARG_ACTION, \
|
||||
void * OSI_DEMUX_ACTION_ARG_ROCK_CALLER, \
|
||||
void * OSI_DEMUX_ACTION_ARG_ROCK_ACTION, \
|
||||
void * OSI_DEMUX_ACTION_ARG_ROCK_DEMUX )
|
||||
#define OSI_DEMUX_ACTION_STATIC_PROTOTYPE(sym) \
|
||||
osi_static osi_result sym (\
|
||||
osi_uint32 OSI_DEMUX_ACTION_ARG_ACTION, \
|
||||
void * OSI_DEMUX_ACTION_ARG_ROCK_CALLER, \
|
||||
void * OSI_DEMUX_ACTION_ARG_ROCK_ACTION, \
|
||||
void * OSI_DEMUX_ACTION_ARG_ROCK_DEMUX )
|
||||
|
||||
|
||||
#endif /* _OSI_COMMON_DEMUX_H */
|
45
src/osi/COMMON/demux_impl.h
Normal file
45
src/osi/COMMON/demux_impl.h
Normal file
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
* License. For details, see the LICENSE file in the top-level source
|
||||
* directory or online at http://www.openafs.org/dl/license10.html
|
||||
*/
|
||||
|
||||
#ifndef _OSI_COMMON_DEMUX_IMPL_H
|
||||
#define _OSI_COMMON_DEMUX_IMPL_H 1
|
||||
|
||||
/*
|
||||
* osi
|
||||
* demultiplexer abstraction
|
||||
* internal type definitions
|
||||
*/
|
||||
|
||||
#include <osi/osi_list.h>
|
||||
#include <osi/osi_rwlock.h>
|
||||
|
||||
#define OSI_DEMUX_HASH_TABLE_SIZE 8 /* must be of the form 2^N */
|
||||
#define OSI_DEMUX_HASH_TABLE_MASK (OSI_DEMUX_HASH_TABLE_SIZE-1)
|
||||
#define OSI_DEMUX_HASH_TABLE_FUNC(x) ((x) & OSI_DEMUX_HASH_TABLE_MASK)
|
||||
|
||||
typedef struct {
|
||||
osi_list_head_volatile hash_chain;
|
||||
osi_rwlock_t chain_lock;
|
||||
} osi_demux_hash_chain_t;
|
||||
|
||||
struct osi_demux {
|
||||
osi_demux_hash_chain_t hash_table[OSI_DEMUX_HASH_TABLE_SIZE];
|
||||
void * rock;
|
||||
osi_demux_options_t opts;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
osi_list_element_volatile hash_chain;
|
||||
osi_uint32 action;
|
||||
void * action_rock;
|
||||
osi_demux_action_func_t * action_fp;
|
||||
osi_demux_action_options_t opts;
|
||||
} osi_demux_action_t;
|
||||
|
||||
#endif /* _OSI_COMMON_DEMUX_IMPL_H */
|
61
src/osi/COMMON/demux_options.c
Normal file
61
src/osi/COMMON/demux_options.c
Normal file
@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
* License. For details, see the LICENSE file in the top-level source
|
||||
* directory or online at http://www.openafs.org/dl/license10.html
|
||||
*/
|
||||
|
||||
#include <osi/osi_impl.h>
|
||||
#include <osi/osi_demux.h>
|
||||
|
||||
osi_result
|
||||
osi_demux_options_Set(osi_demux_options_t * opt,
|
||||
osi_demux_options_param_t param,
|
||||
osi_options_val_t * val)
|
||||
{
|
||||
osi_result res = OSI_FAIL;
|
||||
|
||||
switch (param) {
|
||||
case OSI_DEMUX_OPTION_TRACE_ALLOWED:
|
||||
if (val->type == OSI_OPTION_VAL_TYPE_BOOL) {
|
||||
opt->trace_allowed = val->val.v_bool;
|
||||
res = OSI_OK;
|
||||
}
|
||||
break;
|
||||
case OSI_DEMUX_OPTION_TRACE_ENABLED:
|
||||
if (val->type == OSI_OPTION_VAL_TYPE_BOOL) {
|
||||
opt->trace_enabled = val->val.v_bool;
|
||||
res = OSI_OK;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
osi_result
|
||||
osi_demux_action_options_Set(osi_demux_action_options_t * opt,
|
||||
osi_demux_action_options_param_t param,
|
||||
osi_options_val_t * val)
|
||||
{
|
||||
osi_result res = OSI_FAIL;
|
||||
|
||||
switch (param) {
|
||||
case OSI_DEMUX_ACTION_OPTION_ERROR_IS_FATAL:
|
||||
if (val->type == OSI_OPTION_VAL_TYPE_BOOL) {
|
||||
opt->error_is_fatal = val->val.v_bool;
|
||||
res = OSI_OK;
|
||||
}
|
||||
break;
|
||||
case OSI_DEMUX_ACTION_OPTION_TERMINAL:
|
||||
if (val->type == OSI_OPTION_VAL_TYPE_BOOL) {
|
||||
opt->terminal = val->val.v_bool;
|
||||
res = OSI_OK;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
86
src/osi/COMMON/demux_options.h
Normal file
86
src/osi/COMMON/demux_options.h
Normal file
@ -0,0 +1,86 @@
|
||||
/*
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
* License. For details, see the LICENSE file in the top-level source
|
||||
* directory or online at http://www.openafs.org/dl/license10.html
|
||||
*/
|
||||
|
||||
#ifndef _OSI_COMMON_DEMUX_OPTIONS_H
|
||||
#define _OSI_COMMON_DEMUX_OPTIONS_H 1
|
||||
|
||||
#include <osi/osi_mem.h>
|
||||
|
||||
/* demux object options */
|
||||
|
||||
typedef struct osi_demux_options {
|
||||
osi_bool_t trace_allowed; /* whether or not demux tracing is allowed */
|
||||
osi_bool_t trace_enabled; /* enable demux tracing */
|
||||
} osi_demux_options_t;
|
||||
/* defaults: { 1, 0 } */
|
||||
|
||||
typedef enum {
|
||||
OSI_DEMUX_OPTION_TRACE_ALLOWED,
|
||||
OSI_DEMUX_OPTION_TRACE_ENABLED,
|
||||
OSI_DEMUX_OPTION_MAX_ID
|
||||
} osi_demux_options_param_t;
|
||||
|
||||
#define osi_demux_options_Init(opt) \
|
||||
osi_Macro_Begin \
|
||||
(opt)->trace_allowed = 1; \
|
||||
(opt)->trace_enabled = 0; \
|
||||
osi_Macro_End
|
||||
|
||||
#define osi_demux_options_Destroy(opt)
|
||||
|
||||
#define osi_demux_options_Copy(dst, src) \
|
||||
osi_Macro_Begin \
|
||||
if (src) { \
|
||||
osi_mem_copy((dst), (src), sizeof(osi_demux_options_t)); \
|
||||
} else { \
|
||||
osi_demux_options_Init(dst); \
|
||||
} \
|
||||
osi_Macro_End
|
||||
|
||||
osi_extern osi_result osi_demux_options_Set(osi_demux_options_t * opt,
|
||||
osi_demux_options_param_t param,
|
||||
osi_options_val_t * val);
|
||||
|
||||
|
||||
/* demux action object options */
|
||||
|
||||
typedef struct {
|
||||
osi_bool_t error_is_fatal;
|
||||
osi_bool_t terminal;
|
||||
} osi_demux_action_options_t;
|
||||
/* defaults: { 0, 0 } */
|
||||
|
||||
typedef enum {
|
||||
OSI_DEMUX_ACTION_OPTION_ERROR_IS_FATAL,
|
||||
OSI_DEMUX_ACTION_OPTION_TERMINAL,
|
||||
OSI_DEMUX_ACTION_OPTION_MAX_ID
|
||||
} osi_demux_action_options_param_t;
|
||||
|
||||
#define osi_demux_action_options_Init(opt) \
|
||||
osi_Macro_Begin \
|
||||
(opt)->error_is_fatal = 0; \
|
||||
(opt)->terminal = 0; \
|
||||
osi_Macro_End
|
||||
|
||||
#define osi_demux_action_options_Destroy(opt)
|
||||
|
||||
#define osi_demux_action_options_Copy(dst, src) \
|
||||
osi_Macro_Begin \
|
||||
if (src) { \
|
||||
osi_mem_copy((dst), (src), sizeof(osi_demux_action_options_t)); \
|
||||
} else { \
|
||||
osi_demux_action_options_Init(dst); \
|
||||
} \
|
||||
osi_Macro_End
|
||||
|
||||
osi_extern osi_result osi_demux_action_options_Set(osi_demux_action_options_t * opt,
|
||||
osi_demux_action_options_param_t param,
|
||||
osi_options_val_t * val);
|
||||
|
||||
#endif /* _OSI_COMMON_DEMUX_OPTIONS_H */
|
24
src/osi/COMMON/demux_types.h
Normal file
24
src/osi/COMMON/demux_types.h
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
* License. For details, see the LICENSE file in the top-level source
|
||||
* directory or online at http://www.openafs.org/dl/license10.html
|
||||
*/
|
||||
|
||||
#ifndef _OSI_COMMON_DEMUX_TYPES_H
|
||||
#define _OSI_COMMON_DEMUX_TYPES_H 1
|
||||
|
||||
/*
|
||||
* osi
|
||||
* demultiplexer abstraction
|
||||
* public type definitions
|
||||
*/
|
||||
|
||||
typedef osi_result osi_demux_action_func_t(osi_uint32 action,
|
||||
void * caller_rock,
|
||||
void * action_rock,
|
||||
void * demux_rock);
|
||||
|
||||
#endif /* _OSI_COMMON_DEMUX_TYPES_H */
|
@ -41,7 +41,7 @@ osi_event_hook_Init(osi_event_hook_t * hook)
|
||||
osi_result res = OSI_OK;
|
||||
|
||||
osi_rwlock_Init(&hook->lock,
|
||||
&osi_common_options.rwlock_opts);
|
||||
osi_impl_rwlock_opts());
|
||||
osi_list_Init(&hook->watchers);
|
||||
hook->sdata = osi_NULL;
|
||||
|
||||
@ -272,7 +272,7 @@ osi_event_subscription_Init(osi_event_subscription_t * sub)
|
||||
osi_result res = OSI_OK;
|
||||
|
||||
osi_mutex_Init(&sub->lock,
|
||||
&osi_common_options.mutex_opts);
|
||||
osi_impl_mutex_opts());
|
||||
sub->hook = osi_NULL;
|
||||
sub->sdata = osi_NULL;
|
||||
sub->action.type = OSI_EVENT_ACTION_NONE;
|
||||
@ -644,9 +644,9 @@ osi_event_PkgInit(void)
|
||||
osi_result res = OSI_OK;
|
||||
|
||||
osi_mutex_Init(&osi_event_hook_purge_lock,
|
||||
&osi_common_options.mutex_opts);
|
||||
osi_impl_mutex_opts());
|
||||
osi_condvar_Init(&osi_event_hook_purge_cv,
|
||||
&osi_common_options.condvar_opts);
|
||||
osi_impl_condvar_opts());
|
||||
|
||||
osi_event_record_cache =
|
||||
osi_mem_object_cache_create("osi_event_record_cache",
|
||||
@ -656,7 +656,7 @@ osi_event_PkgInit(void)
|
||||
osi_NULL,
|
||||
osi_NULL,
|
||||
osi_NULL,
|
||||
&osi_common_options.mem_object_cache_opts);
|
||||
osi_impl_mem_object_cache_opts());
|
||||
if (osi_event_record_cache == osi_NULL) {
|
||||
res = OSI_FAIL;
|
||||
goto error;
|
||||
@ -670,7 +670,7 @@ osi_event_PkgInit(void)
|
||||
osi_NULL,
|
||||
osi_NULL,
|
||||
osi_NULL,
|
||||
&osi_common_options.mem_object_cache_opts);
|
||||
osi_impl_mem_object_cache_opts());
|
||||
if (osi_event_record_cache == osi_NULL) {
|
||||
res = OSI_FAIL;
|
||||
goto error;
|
||||
@ -684,7 +684,7 @@ osi_event_PkgInit(void)
|
||||
osi_NULL,
|
||||
osi_NULL,
|
||||
osi_NULL,
|
||||
&osi_common_options.mem_object_cache_opts);
|
||||
osi_impl_mem_object_cache_opts());
|
||||
if (osi_event_record_cache == osi_NULL) {
|
||||
res = OSI_FAIL;
|
||||
goto error;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -16,6 +16,7 @@
|
||||
* implementation using traditional synchronization primitives
|
||||
*/
|
||||
|
||||
#include <osi/osi_list.h>
|
||||
#include <osi/osi_condvar.h>
|
||||
#include <osi/osi_mutex.h>
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#if defined(OSI_KERNELSPACE_ENV)
|
||||
#if defined(OSI_ENV_KERNELSPACE)
|
||||
|
||||
|
||||
#if defined(CAST_USER_ADDR_T)
|
||||
@ -64,7 +64,7 @@
|
||||
osi_Macro_End
|
||||
#endif /* !OSI_KERNEL_OS_SPEC_UIO_COPY */
|
||||
|
||||
#endif /* OSI_KERNELSPACE_ENV */
|
||||
#endif /* OSI_ENV_KERNELSPACE */
|
||||
|
||||
|
||||
#endif /* _OSI_COMMON_KCOPY_H */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine and others.
|
||||
* Copyright 2006-2007, Sine Nomine and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -25,7 +25,12 @@ osi_options_val_type_t osi_option_types[OSI_OPTION_MAX_ID+1] =
|
||||
OSI_OPTION_VAL_TYPE_BOOL, /* trace_start_mail_thread */
|
||||
OSI_OPTION_VAL_TYPE_UINT32, /* trace_buffer_size */
|
||||
OSI_OPTION_VAL_TYPE_BOOL, /* traced_listen */
|
||||
OSI_OPTION_VAL_TYPE_UINT16, /* traced_port */
|
||||
OSI_OPTION_VAL_TYPE_UINT16, /* rx_port */
|
||||
OSI_OPTION_VAL_TYPE_BOOL, /* trace_consumer_start_i2n_thread */
|
||||
OSI_OPTION_VAL_TYPE_BOOL, /* trace_consumer_start_cache_thread */
|
||||
OSI_OPTION_VAL_TYPE_BOOL, /* rx_bind */
|
||||
OSI_OPTION_VAL_TYPE_UINT32, /* rx_bind_host */
|
||||
OSI_OPTION_VAL_TYPE_BOOL, /* trace_consumer_start_encoding_thread */
|
||||
OSI_OPTION_VAL_TYPE_INVALID /*end */
|
||||
};
|
||||
|
||||
@ -42,7 +47,12 @@ osi_options_t osi_options_default_kernel =
|
||||
OSI_FALSE, /* trace_start_mail_thread */
|
||||
128, /* trace_buffer_size */
|
||||
OSI_FALSE, /* traced_listen */
|
||||
0, /* traced_port */
|
||||
0, /* rx_port */
|
||||
OSI_FALSE, /* trace_consumer_start_i2n_thread */
|
||||
OSI_FALSE, /* trace_consumer_start_cache_thread */
|
||||
OSI_FALSE, /* rx_bind */
|
||||
0, /* rx_bind_host */
|
||||
OSI_FALSE, /* trace_consumer_start_encoding_thread */
|
||||
0 /* end */
|
||||
};
|
||||
|
||||
@ -59,7 +69,12 @@ osi_options_t osi_options_default_ukernel =
|
||||
OSI_FALSE, /* trace_start_mail_thread */
|
||||
128, /* trace buffer_size */
|
||||
OSI_FALSE, /* traced_listen */
|
||||
0, /* traced_port */
|
||||
0, /* rx_port */
|
||||
OSI_FALSE, /* trace_consumer_start_i2n_thread */
|
||||
OSI_FALSE, /* trace_consumer_start_cache_thread */
|
||||
OSI_FALSE, /* rx_bind */
|
||||
0, /* rx_bind_host */
|
||||
OSI_FALSE, /* trace_consumer_start_encoding_thread */
|
||||
0 /* end */
|
||||
};
|
||||
|
||||
@ -76,7 +91,12 @@ osi_options_t osi_options_default_daemon =
|
||||
OSI_TRUE, /* trace_start_mail_thread */
|
||||
128, /* trace buffer_size */
|
||||
OSI_FALSE, /* traced_listen */
|
||||
0, /* traced_port */
|
||||
0, /* rx_port */
|
||||
OSI_TRUE, /* trace_consumer_start_i2n_thread */
|
||||
OSI_TRUE, /* trace_consumer_start_cache_thread */
|
||||
OSI_FALSE, /* rx_bind */
|
||||
0, /* rx_bind_host */
|
||||
OSI_TRUE, /* trace_consumer_start_encoding_thread */
|
||||
0 /* end */
|
||||
};
|
||||
|
||||
@ -93,7 +113,12 @@ osi_options_t osi_options_default_util =
|
||||
OSI_FALSE, /* trace_start_mail_thread */
|
||||
8, /* trace buffer_size */
|
||||
OSI_FALSE, /* traced_listen */
|
||||
0, /* traced_port */
|
||||
0, /* rx_port */
|
||||
OSI_FALSE, /* trace_consumer_start_i2n_thread */
|
||||
OSI_FALSE, /* trace_consumer_start_cache_thread */
|
||||
OSI_FALSE, /* rx_bind */
|
||||
0, /* rx_bind_host */
|
||||
OSI_FALSE, /* trace_consumer_start_encoding_thread */
|
||||
0 /* end */
|
||||
};
|
||||
|
||||
@ -110,7 +135,12 @@ osi_options_t osi_options_default_pam =
|
||||
OSI_FALSE, /* trace_start_mail_thread */
|
||||
8, /* trace buffer_size */
|
||||
OSI_FALSE, /* traced_listen */
|
||||
0, /* traced_port */
|
||||
0, /* rx_port */
|
||||
OSI_FALSE, /* trace_consumer_start_i2n_thread */
|
||||
OSI_FALSE, /* trace_consumer_start_cache_thread */
|
||||
OSI_FALSE, /* rx_bind */
|
||||
0, /* rx_bind_host */
|
||||
OSI_FALSE, /* trace_consumer_start_encoding_thread */
|
||||
0 /* end */
|
||||
};
|
||||
|
||||
@ -120,7 +150,7 @@ osi_options_t * osi_options_defaults[osi_ProgramType_Max_Id+1] =
|
||||
{
|
||||
&osi_options_default_daemon, /* osi_ProgramType_Library */
|
||||
&osi_options_default_daemon, /* osi_ProgramType_Bosserver */
|
||||
#if defined(OSI_KERNELSPACE_ENV) /* osi_ProgramType_CacheManager */
|
||||
#if defined(OSI_ENV_KERNELSPACE) /* osi_ProgramType_CacheManager */
|
||||
&osi_options_default_kernel,
|
||||
#else
|
||||
&osi_options_default_ukernel,
|
||||
@ -141,6 +171,12 @@ osi_options_t * osi_options_defaults[osi_ProgramType_Max_Id+1] =
|
||||
&osi_options_default_kernel, /* osi_ProgramType_TraceKernel */
|
||||
&osi_options_default_daemon, /* osi_ProgramType_Backup */
|
||||
&osi_options_default_daemon, /* osi_ProgramType_BuTC */
|
||||
&osi_options_default_daemon, /* osi_ProgramType_UpServer */
|
||||
&osi_options_default_util, /* osi_ProgramType_UpClient */
|
||||
&osi_options_default_util, /* osi_ProgramType_Bos */
|
||||
&osi_options_default_util, /* osi_ProgramType_Vos */
|
||||
&osi_options_default_daemon, /* osi_ProgramType_AFSD */
|
||||
&osi_options_default_daemon, /* osi_ProgramType_RMTSYSD */
|
||||
&osi_options_default_util /* osi_ProgramType_Max_Id */
|
||||
};
|
||||
|
||||
@ -212,7 +248,12 @@ osi_options_val_ptr_setup(osi_options_t * opt,
|
||||
OSI_OPTION_SWITCH_CASE(TRACE_START_MAIL_THREAD);
|
||||
OSI_OPTION_SWITCH_CASE(TRACE_BUFFER_SIZE);
|
||||
OSI_OPTION_SWITCH_CASE(TRACED_LISTEN);
|
||||
OSI_OPTION_SWITCH_CASE(TRACED_PORT);
|
||||
OSI_OPTION_SWITCH_CASE(RX_PORT);
|
||||
OSI_OPTION_SWITCH_CASE(TRACE_CONSUMER_START_I2N_THREAD);
|
||||
OSI_OPTION_SWITCH_CASE(TRACE_CONSUMER_START_CACHE_THREAD);
|
||||
OSI_OPTION_SWITCH_CASE(RX_BIND);
|
||||
OSI_OPTION_SWITCH_CASE(RX_BIND_HOST);
|
||||
OSI_OPTION_SWITCH_CASE(TRACE_CONSUMER_START_ENCODING_THREAD);
|
||||
default:
|
||||
res = OSI_FAIL;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -9,6 +9,7 @@
|
||||
|
||||
#include <osi/osi_impl.h>
|
||||
#include <osi/osi_mem.h>
|
||||
#include <osi/osi_mem_local.h>
|
||||
#include <osi/osi_cpu.h>
|
||||
#include <osi/osi_cache.h>
|
||||
#include <osi/osi_mutex.h>
|
||||
@ -28,7 +29,7 @@ osi_static struct {
|
||||
osi_uintptr_t osi_volatile offset;
|
||||
} keys[OSI_MEM_LOCAL_MAX_KEYS];
|
||||
osi_uintptr_t osi_volatile buffer_offset;
|
||||
#if defined(OSI_USERSPACE_ENV)
|
||||
#if defined(OSI_ENV_USERSPACE)
|
||||
osi_list_head_volatile ctx_list;
|
||||
#endif
|
||||
osi_mutex_t lock;
|
||||
@ -119,7 +120,7 @@ osi_mem_local_key_destroy_ctx(struct osi_mem_local_ctx_data * ldata,
|
||||
return OSI_OK;
|
||||
}
|
||||
|
||||
#if defined(OSI_KERNELSPACE_ENV)
|
||||
#if defined(OSI_ENV_KERNELSPACE)
|
||||
osi_static osi_result
|
||||
osi_mem_local_key_destroy_cpu(osi_cpu_id_t id, void * sdata)
|
||||
{
|
||||
@ -137,7 +138,7 @@ osi_mem_local_key_destroy_cpu(osi_cpu_id_t id, void * sdata)
|
||||
|
||||
return res;
|
||||
}
|
||||
#endif /* OSI_KERNELSPACE_ENV */
|
||||
#endif /* OSI_ENV_KERNELSPACE */
|
||||
|
||||
osi_result
|
||||
osi_mem_local_key_destroy(osi_mem_local_key_t key)
|
||||
@ -155,10 +156,10 @@ osi_mem_local_key_destroy(osi_mem_local_key_t key)
|
||||
struct osi_mem_local_key_destruct info;
|
||||
info.dtor = dtor;
|
||||
info.key = key;
|
||||
#if defined(OSI_KERNELSPACE_ENV)
|
||||
#if defined(OSI_ENV_KERNELSPACE)
|
||||
osi_cpu_list_iterate(&osi_mem_local_key_destroy_cpu, &info);
|
||||
osi_thread_unbind_current();
|
||||
#else /* !OSI_KERNELSPACE_ENV */
|
||||
#else /* !OSI_ENV_KERNELSPACE */
|
||||
{
|
||||
struct osi_mem_local_ctx_data *ctx;
|
||||
for (osi_list_Scan_Immutable(&osi_mem_local_key_directory.ctx_list, ctx,
|
||||
@ -166,7 +167,7 @@ osi_mem_local_key_destroy(osi_mem_local_key_t key)
|
||||
osi_mem_local_key_destroy_ctx(ctx, &info);
|
||||
}
|
||||
}
|
||||
#endif /* !OSI_KERNELSPACE_ENV */
|
||||
#endif /* !OSI_ENV_KERNELSPACE */
|
||||
}
|
||||
osi_mem_local_key_directory.keys[key].dtor = osi_NULL;
|
||||
osi_mutex_Unlock(&osi_mem_local_key_directory.lock);
|
||||
@ -202,7 +203,7 @@ osi_mem_local_ctx_init(osi_mem_local_ctx_id_t ctx,
|
||||
align = 32;
|
||||
}
|
||||
|
||||
#if defined(OSI_KERNELSPACE_ENV)
|
||||
#if defined(OSI_ENV_KERNELSPACE)
|
||||
/*
|
||||
* attempt to bind to the cpu so kmalloc makes better
|
||||
* NUMA locality decisions
|
||||
@ -220,7 +221,7 @@ osi_mem_local_ctx_init(osi_mem_local_ctx_id_t ctx,
|
||||
|
||||
osi_mutex_Lock(&osi_mem_local_key_directory.lock);
|
||||
|
||||
#if defined(OSI_USERSPACE_ENV)
|
||||
#if defined(OSI_ENV_USERSPACE)
|
||||
osi_list_Append(&osi_mem_local_key_directory.ctx_list, ldata,
|
||||
struct osi_mem_local_ctx_data, hdr.ctx_list);
|
||||
#endif
|
||||
@ -247,7 +248,7 @@ osi_mem_local_ctx_init(osi_mem_local_ctx_id_t ctx,
|
||||
return OSI_OK;
|
||||
}
|
||||
|
||||
#if defined(OSI_KERNELSPACE_ENV) && !defined(OSI_MEM_LOCAL_PERCPU_ALLOC)
|
||||
#if defined(OSI_ENV_KERNELSPACE) && !defined(OSI_MEM_LOCAL_PERCPU_ALLOC)
|
||||
|
||||
osi_static osi_result
|
||||
osi_mem_local_cpu_init(osi_cpu_id_t cpuid, void * sdata)
|
||||
@ -320,7 +321,7 @@ osi_mem_local_alloc_ctx(struct osi_mem_local_ctx_data * ldata,
|
||||
return res;
|
||||
}
|
||||
|
||||
#ifdef OSI_KERNELSPACE_ENV
|
||||
#ifdef OSI_ENV_KERNELSPACE
|
||||
/*
|
||||
* cpu iterator function
|
||||
*
|
||||
@ -338,7 +339,7 @@ osi_mem_local_alloc_cpu(osi_cpu_id_t cpuid, void * sdata)
|
||||
ldata = osi_mem_local_ctx_get_ctx(cpuid);
|
||||
return osi_mem_local_alloc_ctx(ldata, info);
|
||||
}
|
||||
#endif /* OSI_KERNELSPACE_ENV */
|
||||
#endif /* OSI_ENV_KERNELSPACE */
|
||||
|
||||
/*
|
||||
* allocate space in the main buffer
|
||||
@ -377,7 +378,7 @@ osi_mem_local_alloc(osi_mem_local_key_t key, size_t len_in, size_t align_in)
|
||||
struct osi_mem_local_alloc_info info;
|
||||
info.key = key;
|
||||
info.offset = save_offset;
|
||||
#if defined(OSI_KERNELSPACE_ENV)
|
||||
#if defined(OSI_ENV_KERNELSPACE)
|
||||
res = osi_cpu_list_iterate(&osi_mem_local_alloc_cpu, &info);
|
||||
#else
|
||||
{
|
||||
@ -397,7 +398,7 @@ osi_mem_local_alloc(osi_mem_local_key_t key, size_t len_in, size_t align_in)
|
||||
/*
|
||||
* osi_mem_local context lookup
|
||||
*/
|
||||
#if defined(OSI_USERSPACE_ENV)
|
||||
#if defined(OSI_ENV_USERSPACE)
|
||||
struct osi_mem_local_ctx_data *
|
||||
osi_mem_local_ctx_get_ctx(osi_mem_local_ctx_id_t ctxid)
|
||||
{
|
||||
@ -414,7 +415,7 @@ osi_mem_local_ctx_get_ctx(osi_mem_local_ctx_id_t ctxid)
|
||||
osi_mutex_Unlock(&osi_mem_local_key_directory.lock);
|
||||
return ret;
|
||||
}
|
||||
#endif /* OSI_USERSPACE_ENV */
|
||||
#endif /* OSI_ENV_USERSPACE */
|
||||
|
||||
/*
|
||||
* set the context-local value for a key
|
||||
@ -444,8 +445,7 @@ osi_mem_local_set(osi_mem_local_key_t key,
|
||||
* intialization routines
|
||||
*/
|
||||
|
||||
osi_result
|
||||
osi_mem_local_PkgInit(void)
|
||||
OSI_INIT_FUNC_DECL(osi_mem_local_PkgInit)
|
||||
{
|
||||
osi_result res;
|
||||
osi_cpu_id_t max_id, i;
|
||||
@ -465,9 +465,9 @@ osi_mem_local_PkgInit(void)
|
||||
osi_mem_local_key_directory.buffer_offset = OSI_MEM_LOCAL_PAYLOAD_OFFSET;
|
||||
|
||||
osi_mutex_Init(&osi_mem_local_key_directory.lock,
|
||||
&osi_common_options.mutex_opts);
|
||||
osi_impl_mutex_opts());
|
||||
|
||||
#ifdef OSI_KERNELSPACE_ENV
|
||||
#ifdef OSI_ENV_KERNELSPACE
|
||||
res = osi_mem_local_os_alloc_percpu_buffers();
|
||||
#else
|
||||
osi_list_Init(&osi_mem_local_key_directory.ctx_list);
|
||||
@ -476,8 +476,7 @@ osi_mem_local_PkgInit(void)
|
||||
return res;
|
||||
}
|
||||
|
||||
osi_result
|
||||
osi_mem_local_PkgShutdown(void)
|
||||
OSI_FINI_FUNC_DECL(osi_mem_local_PkgShutdown)
|
||||
{
|
||||
osi_result res;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2006, Sine Nomine Associates and others.
|
||||
* Copyright 2006-2007, Sine Nomine Associates and others.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software has been released under the terms of the IBM Public
|
||||
@ -58,7 +58,7 @@
|
||||
* -- set the osi_mem_local_ctx_data struct for this context
|
||||
*
|
||||
* the following interface is only required if
|
||||
* !defined(OSI_MEM_LOCAL_CPU_ARRAY) && defined(OSI_KERNELSPACE_ENV)
|
||||
* !defined(OSI_MEM_LOCAL_CPU_ARRAY) && defined(OSI_ENV_KERNELSPACE)
|
||||
* struct osi_mem_local_ctx_data * osi_mem_local_ctx_get_ctx(osi_mem_local_ctx_id_t);
|
||||
* -- get the osi_mem_local_ctx_data struct for a specific context
|
||||
*
|
||||
@ -78,7 +78,7 @@
|
||||
#include <osi/COMMON/mem_local_types.h>
|
||||
|
||||
|
||||
#if defined(OSI_KERNELSPACE_ENV) && defined(OSI_MEM_LOCAL_CPU_ARRAY)
|
||||
#if defined(OSI_ENV_KERNELSPACE) && defined(OSI_MEM_LOCAL_CPU_ARRAY)
|
||||
/*
|
||||
* Many platforms don't provide a mechanism for cpu-local storage
|
||||
* for kernel modules, so we have to do it ourselves. This
|
||||
@ -87,16 +87,16 @@
|
||||
*/
|
||||
osi_extern struct osi_mem_local_ctx_data ** osi_mem_local_ctx_data;
|
||||
|
||||
#define osi_mem_local_ctx_get() (osi_mem_local_ctx_data[osi_cpu_current()])
|
||||
#define osi_mem_local_ctx_get() (osi_mem_local_ctx_data[osi_cpu_current_id()])
|
||||
#define osi_mem_local_ctx_put()
|
||||
#define osi_mem_local_ctx_get_ctx(ctx) (osi_mem_local_ctx_data[ctx])
|
||||
#define osi_mem_local_ctx_set(ctx) (osi_mem_local_ctx_data[osi_cpu_current()] = (ctx))
|
||||
#define osi_mem_local_ctx_set(ctx) (osi_mem_local_ctx_data[osi_cpu_current_id()] = (ctx))
|
||||
#endif /* OSI_MEM_LOCAL_CPU_ARRAY */
|
||||
|
||||
|
||||
OSI_INIT_FUNC_PROTOTYPE(osi_mem_local_PkgInit);
|
||||
OSI_FINI_FUNC_PROTOTYPE(osi_mem_local_PkgShutdown);
|
||||
|
||||
osi_extern osi_result osi_mem_local_PkgInit(void);
|
||||
osi_extern osi_result osi_mem_local_PkgShutdown(void);
|
||||
osi_extern osi_result osi_mem_local_ctx_init(osi_mem_local_ctx_id_t ctx,
|
||||
struct osi_mem_local_ctx_data ** ret);
|
||||
|
||||
@ -107,12 +107,12 @@ osi_extern osi_result osi_mem_local_key_create(osi_mem_local_key_t *,
|
||||
osi_extern osi_result osi_mem_local_key_destroy(osi_mem_local_key_t);
|
||||
|
||||
osi_extern osi_result osi_mem_local_alloc(osi_mem_local_key_t,
|
||||
size_t len, size_t align);
|
||||
osi_size_t len, osi_size_t align);
|
||||
|
||||
osi_extern osi_result osi_mem_local_set(osi_mem_local_key_t,
|
||||
void * data);
|
||||
|
||||
#if defined(OSI_USERSPACE_ENV)
|
||||
#if defined(OSI_ENV_USERSPACE)
|
||||
/* get a specific thread's mem local context structure */
|
||||
osi_extern struct osi_mem_local_ctx_data * osi_mem_local_ctx_get_ctx(osi_mem_local_ctx_id_t);
|
||||
#endif
|
||||
@ -122,7 +122,7 @@ osi_extern struct osi_mem_local_ctx_data * osi_mem_local_ctx_get_ctx(osi_mem_loc
|
||||
* context-local getters
|
||||
*/
|
||||
|
||||
#if defined(OSI_KERNELSPACE_ENV)
|
||||
#if defined(OSI_ENV_KERNELSPACE)
|
||||
#if defined(OSI_MEM_LOCAL_PREEMPT_INTERNAL)
|
||||
|
||||
#define osi_mem_local_get(key) \
|
||||
@ -141,13 +141,13 @@ osi_extern struct osi_mem_local_ctx_data * osi_mem_local_ctx_get_ctx(osi_mem_loc
|
||||
osi_Macro_End
|
||||
|
||||
#endif /* !OSI_MEM_LOCAL_PREEMPT_INTERNAL */
|
||||
#else /* !OSI_KERNELSPACE_ENV */
|
||||
#else /* !OSI_ENV_KERNELSPACE */
|
||||
|
||||
#define osi_mem_local_get(key) \
|
||||
(osi_mem_local_ctx_get()->keys[key])
|
||||
#define osi_mem_local_put(key)
|
||||
|
||||
#endif /* !OSI_KERNELSPACE_ENV */
|
||||
#endif /* !OSI_ENV_KERNELSPACE */
|
||||
|
||||
|
||||
#if (OSI_ENV_INLINE_INCLUDE)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user