/*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright (c) 2012, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
/* client-side state of a RPC */
typedef struct srpc_client_rpc {
- cfs_list_t crpc_list; /* chain on user's lists */
- cfs_spinlock_t crpc_lock; /* serialize */
+ cfs_list_t crpc_list; /* chain on user's lists */
+ spinlock_t crpc_lock; /* serialize */
int crpc_service;
cfs_atomic_t crpc_refcount;
int crpc_timeout; /* # seconds to wait for reply */
/* CPU partition data of srpc service */
struct srpc_service_cd {
/** serialize */
- cfs_spinlock_t scd_lock;
+ spinlock_t scd_lock;
/** backref to service */
struct srpc_service *scd_svc;
/** event buffer */
sfw_batch_t *tsi_batch; /* batch */
sfw_test_client_ops_t *tsi_ops; /* test client operations */
- /* public parameter for all test units */
- int tsi_is_client:1; /* is test client */
- int tsi_stoptsu_onerr:1; /* stop tsu on error */
+ /* public parameter for all test units */
+ unsigned int tsi_is_client:1; /* is test client */
+ unsigned int tsi_stoptsu_onerr:1; /* stop tsu on error */
int tsi_concur; /* concurrency */
int tsi_loop; /* loop count */
- /* status of test instance */
- cfs_spinlock_t tsi_lock; /* serialize */
- int tsi_stopping:1; /* test is stopping */
+ /* status of test instance */
+ spinlock_t tsi_lock; /* serialize */
+ unsigned int tsi_stopping:1; /* test is stopping */
cfs_atomic_t tsi_nactive; /* # of active test unit */
cfs_list_t tsi_units; /* test units */
cfs_list_t tsi_free_rpcs; /* free rpcs */
CFS_INIT_LIST_HEAD(&rpc->crpc_list);
swi_init_workitem(&rpc->crpc_wi, rpc, srpc_send_rpc,
lst_sched_test[lnet_cpt_of_nid(peer.nid)]);
- cfs_spin_lock_init(&rpc->crpc_lock);
+ spin_lock_init(&rpc->crpc_lock);
cfs_atomic_set(&rpc->crpc_refcount, 1); /* 1 ref for caller */
rpc->crpc_dest = peer;
#endif
-#define lst_wait_until(cond, lock, fmt, ...) \
-do { \
- int __I = 2; \
- while (!(cond)) { \
- CDEBUG(IS_PO2(++__I) ? D_WARNING : D_NET, \
- fmt, ## __VA_ARGS__); \
- cfs_spin_unlock(&(lock)); \
- \
- selftest_wait_events(); \
- \
- cfs_spin_lock(&(lock)); \
- } \
+#define lst_wait_until(cond, lock, fmt, ...) \
+do { \
+ int __I = 2; \
+ while (!(cond)) { \
+ CDEBUG(IS_PO2(++__I) ? D_WARNING : D_NET, \
+ fmt, ## __VA_ARGS__); \
+ spin_unlock(&(lock)); \
+ \
+ selftest_wait_events(); \
+ \
+ spin_lock(&(lock)); \
+ } \
} while (0)
static inline void