#include <linux/list.h>
-int libcfs_arch_init(void);
-void libcfs_arch_cleanup(void);
-
/* need both kernel and user-land acceptor */
#define LNET_ACCEPTOR_MIN_RESERVED_PORT 512
#define LNET_ACCEPTOR_MAX_RESERVED_PORT 1023
#ifndef __LIBCFS_PRIM_H__
#define __LIBCFS_PRIM_H__
-/*
- * Timer
- */
-typedef void (cfs_timer_func_t)(ulong_ptr_t);
-
void add_wait_queue_exclusive_head(wait_queue_head_t *, wait_queue_t *);
-void cfs_init_timer(struct timer_list *t);
-void cfs_timer_init(struct timer_list *t, cfs_timer_func_t *func, void *arg);
-void cfs_timer_arm(struct timer_list *t, unsigned long deadline);
-void cfs_timer_disarm(struct timer_list *t);
-int cfs_timer_is_armed(struct timer_list *t);
-unsigned long cfs_timer_deadline(struct timer_list *t);
-
/*
* Memory
*/
}
EXPORT_SYMBOL(add_wait_queue_exclusive_head);
-void cfs_init_timer(struct timer_list *t)
-{
- init_timer(t);
-}
-EXPORT_SYMBOL(cfs_init_timer);
-
-void cfs_timer_init(struct timer_list *t, cfs_timer_func_t *func, void *arg)
-{
- init_timer(t);
- t->function = func;
- t->data = (unsigned long)arg;
-}
-EXPORT_SYMBOL(cfs_timer_init);
-
-void cfs_timer_arm(struct timer_list *t, unsigned long deadline)
-{
- mod_timer(t, deadline);
-}
-EXPORT_SYMBOL(cfs_timer_arm);
-
-void cfs_timer_disarm(struct timer_list *t)
-{
- del_timer(t);
-}
-EXPORT_SYMBOL(cfs_timer_disarm);
-
-int cfs_timer_is_armed(struct timer_list *t)
-{
- return timer_pending(t);
-}
-EXPORT_SYMBOL(cfs_timer_is_armed);
-
-unsigned long cfs_timer_deadline(struct timer_list *t)
-{
- return t->expires;
-}
-EXPORT_SYMBOL(cfs_timer_deadline);
-
-void cfs_enter_debugger(void)
-{
-#if defined(CONFIG_KGDB)
- /* BREAKPOINT(); */
-#else
- /* nothing */
-#endif
-}
-EXPORT_SYMBOL(cfs_enter_debugger);
-
-
sigset_t
cfs_block_allsigs(void)
{
spin_unlock_irqrestore(¤t->sighand->siglock, flags);
}
EXPORT_SYMBOL(cfs_clear_sigpending);
-
-int
-libcfs_arch_init(void)
-{
- return 0;
-}
-EXPORT_SYMBOL(libcfs_arch_init);
-
-void
-libcfs_arch_cleanup(void)
-{
- return;
-}
-EXPORT_SYMBOL(libcfs_arch_cleanup);
-
{
int rc;
- libcfs_arch_init();
libcfs_init_nidstrings();
rc = libcfs_debug_init(5 * 1024 * 1024);
rc = libcfs_debug_cleanup();
if (rc)
pr_err("LustreError: libcfs_debug_cleanup: %d\n", rc);
-
- libcfs_arch_cleanup();
}
MODULE_VERSION("1.0.0");
if (array->paa_reqs_count == NULL)
goto free_reqs_array;
- cfs_timer_init(&svcpt->scp_at_timer, ptlrpc_at_timer, svcpt);
+ setup_timer(&svcpt->scp_at_timer, ptlrpc_at_timer,
+ (unsigned long)svcpt);
+
/* At SOW, service time should be quick; 10s seems generous. If client
* timeout is less than this, we'll be sending an early reply. */
at_init(&svcpt->scp_at_estimate, 10, 0);
__s32 next;
if (array->paa_count == 0) {
- cfs_timer_disarm(&svcpt->scp_at_timer);
+ del_timer(&svcpt->scp_at_timer);
return;
}
if (next <= 0) {
ptlrpc_at_timer((unsigned long)svcpt);
} else {
- cfs_timer_arm(&svcpt->scp_at_timer, cfs_time_shift(next));
+ mod_timer(&svcpt->scp_at_timer, cfs_time_shift(next));
CDEBUG(D_INFO, "armed %s at %+ds\n",
svcpt->scp_service->srv_name, next);
}
/* early disarm AT timer... */
ptlrpc_service_for_each_part(svcpt, i, svc) {
if (svcpt->scp_service != NULL)
- cfs_timer_disarm(&svcpt->scp_at_timer);
+ del_timer(&svcpt->scp_at_timer);
}
}
break;
/* In case somebody rearmed this in the meantime */
- cfs_timer_disarm(&svcpt->scp_at_timer);
+ del_timer(&svcpt->scp_at_timer);
array = &svcpt->scp_at_array;
kfree(array->paa_reqs_array);