[openib-general] [PATCH] kDAPL: remove DAT_BOOLEAN
Tom Duffy
tduffy at sun.com
Tue May 10 10:51:05 PDT 2005
I am sending this as a separate patch because I am not sure what the
"right" thing to do is. Looking around the kernel, it seems booleans
are handled in different ways. Some places, they are enums, others just
#defines.
In e1000, ixgb, compaq fc, DAT960, and xfs, they are enums. In jfs and
arch parisc, a bool is an int and TRUE and FALSE are #define'd. TRUE
and FALSE are defined so many times in the kernel, it seems rather
ridiculous. Maybe the right thing to do is fix the whole kernel in a
consistent way and submit an upstream patch, but this will require quite
a bit of janitorial work.
I don't mind using either way in kDAPL (or some third -- getting rid of
bool's all together?), but this patch uses the enum method. At least we
need to get rid of the DAT_ prefix.
Singed-off-by: Tom Duffy <tduffy at sun.com>
Index: linux-kernel/test/dapltest/test/dapl_performance_util.c
===================================================================
--- linux-kernel/test/dapltest/test/dapl_performance_util.c (revision 2295)
+++ linux-kernel/test/dapltest/test/dapl_performance_util.c (working copy)
@@ -35,8 +35,8 @@ DT_Performance_Test_Create (
Per_Test_Data_t *pt_ptr,
DAT_IA_HANDLE *ia_handle,
DAT_IA_ADDRESS_PTR remote_ia_addr,
- DAT_BOOLEAN is_server,
- DAT_BOOLEAN is_remote_little_endian,
+ boolean_t is_server,
+ boolean_t is_remote_little_endian,
Performance_Test_t **perf_test)
{
Performance_Test_t *test_ptr;
@@ -266,7 +266,7 @@ int
DT_Performance_Test_Destroy (
Per_Test_Data_t *pt_ptr,
Performance_Test_t *test_ptr,
- DAT_BOOLEAN is_server)
+ boolean_t is_server)
{
DAT_RETURN ret;
DAT_EP_HANDLE ep_handle;
Index: linux-kernel/test/dapltest/test/dapl_cnxn.c
===================================================================
--- linux-kernel/test/dapltest/test/dapl_cnxn.c (revision 2295)
+++ linux-kernel/test/dapltest/test/dapl_cnxn.c (working copy)
@@ -32,8 +32,8 @@ int
get_ep_connection_state (DT_Tdep_Print_Head *phead, DAT_EP_HANDLE ep_handle)
{
DAT_EP_STATE ep_state;
- DAT_BOOLEAN in_dto_idle;
- DAT_BOOLEAN out_dto_idle;
+ boolean_t in_dto_idle;
+ boolean_t out_dto_idle;
DAT_RETURN ret;
char *recv_status = "Idle";
char *req_status = "Idle";
Index: linux-kernel/test/dapltest/test/dapl_transaction_test.c
===================================================================
--- linux-kernel/test/dapltest/test/dapl_transaction_test.c (revision 2295)
+++ linux-kernel/test/dapltest/test/dapl_transaction_test.c (working copy)
@@ -159,9 +159,9 @@ DT_Transaction_Test_Server (void *params
bool
DT_Transaction_Create_Test (Per_Test_Data_t * pt_ptr,
DAT_IA_HANDLE *ia_handle,
- DAT_BOOLEAN is_server,
+ boolean_t is_server,
unsigned int port_num,
- DAT_BOOLEAN remote_is_little_endian,
+ boolean_t remote_is_little_endian,
DAT_IA_ADDRESS_PTR remote_ia_addr)
{
Transaction_Test_t *test_ptr;
@@ -820,7 +820,7 @@ retry:
*/
for (j = 0; j < test_ptr->cmd->num_ops; j++)
{
- DAT_BOOLEAN us;
+ boolean_t us;
us = (pt_ptr->local_is_server &&
test_ptr->ep_context[i].op[j].server_initiated) ||
@@ -1039,7 +1039,7 @@ retry:
RMI_RECV_BUFFER_ID);
for (j = 0; j < test_ptr->cmd->num_ops; j++)
{
- DAT_BOOLEAN us;
+ boolean_t us;
us = (pt_ptr->local_is_server &&
test_ptr->ep_context[i].op[j].server_initiated) ||
Index: linux-kernel/test/dapltest/test/dapl_bpool.c
===================================================================
--- linux-kernel/test/dapltest/test/dapl_bpool.c (revision 2295)
+++ linux-kernel/test/dapltest/test/dapl_bpool.c (working copy)
@@ -93,8 +93,8 @@ DT_BpoolAlloc (
DAT_COUNT seg_size,
DAT_COUNT num_segs,
DAT_COUNT alignment,
- DAT_BOOLEAN enable_rdma_write,
- DAT_BOOLEAN enable_rdma_read)
+ boolean_t enable_rdma_write,
+ boolean_t enable_rdma_read)
{
unsigned char *module = "DT_BpoolAlloc";
unsigned char *alloc_ptr = NULL;
Index: linux-kernel/test/dapltest/test/dapl_test_util.c
===================================================================
--- linux-kernel/test/dapltest/test/dapl_test_util.c (revision 2295)
+++ linux-kernel/test/dapltest/test/dapl_test_util.c (working copy)
@@ -30,7 +30,7 @@
/* -----------------------------------------------------------
* Gather info about default attributes
*/
-DAT_BOOLEAN
+boolean_t
DT_query ( Per_Test_Data_t *pt_ptr,
DAT_IA_HANDLE ia_handle,
DAT_EP_HANDLE ep_handle)
@@ -158,7 +158,7 @@ DT_query ( Per_Test_Data_t *pt_ptr,
/* -----------------------------------------------------------
* Post a recv buffer
*/
-DAT_BOOLEAN
+boolean_t
DT_post_recv_buffer (DT_Tdep_Print_Head *phead,
DAT_EP_HANDLE ep_handle,
Bpool * bp,
@@ -203,7 +203,7 @@ DT_post_recv_buffer (DT_Tdep_Print_Head
/* -----------------------------------------------------------
* Post a send buffer
*/
-DAT_BOOLEAN
+boolean_t
DT_post_send_buffer (DT_Tdep_Print_Head *phead,
DAT_EP_HANDLE ep_handle,
Bpool * bp,
Index: linux-kernel/test/dapltest/include/dapl_performance_test.h
===================================================================
--- linux-kernel/test/dapltest/include/dapl_performance_test.h (revision 2295)
+++ linux-kernel/test/dapltest/include/dapl_performance_test.h (working copy)
@@ -67,7 +67,7 @@ typedef struct
Per_Test_Data_t *pt_ptr;
Performance_Cmd_t *cmd;
DAT_IA_ADDRESS_PTR remote_ia_addr;
- DAT_BOOLEAN is_remote_little_endian;
+ boolean_t is_remote_little_endian;
DAT_CONN_QUAL base_port;
struct dat_ia_attr ia_attr;
DAT_IA_HANDLE ia_handle;
Index: linux-kernel/test/dapltest/include/dapl_proto.h
===================================================================
--- linux-kernel/test/dapltest/include/dapl_proto.h (revision 2295)
+++ linux-kernel/test/dapltest/include/dapl_proto.h (working copy)
@@ -88,8 +88,8 @@ Bpool * DT_BpoolAlloc (Per_Test_
DAT_COUNT seg_size,
DAT_COUNT num_segs,
DAT_COUNT alignment,
- DAT_BOOLEAN enable_rdma_write,
- DAT_BOOLEAN enable_rdma_read);
+ boolean_t enable_rdma_write,
+ boolean_t enable_rdma_read);
bool DT_Bpool_Destroy (Per_Test_Data_t * pt_ptr,
DT_Tdep_Print_Head *phead,
@@ -267,13 +267,13 @@ bool DT_Performance_Test_Serv
bool DT_Performance_Test_Create (Per_Test_Data_t * pt_ptr,
DAT_IA_HANDLE * ia_handle,
DAT_IA_ADDRESS_PTR remote_ia_addr,
- DAT_BOOLEAN is_server,
- DAT_BOOLEAN is_remote_little_endian,
+ boolean_t is_server,
+ boolean_t is_remote_little_endian,
Performance_Test_t **perf_test);
int DT_Performance_Test_Destroy (Per_Test_Data_t * pt_ptr,
Performance_Test_t *test_ptr,
- DAT_BOOLEAN is_server);
+ boolean_t is_server);
bool DT_performance_post_rdma_op (Performance_Ep_Context_t *ep_context,
DAT_EVD_HANDLE reqt_evd_hdl,
@@ -349,17 +349,17 @@ Per_Test_Data_t *DT_Alloc_Per_Test_Data
void DT_Free_Per_Test_Data (Per_Test_Data_t * pt_ptr);
/* dapl_test_util.c */
-DAT_BOOLEAN DT_query (Per_Test_Data_t *pt_ptr,
+boolean_t DT_query (Per_Test_Data_t *pt_ptr,
DAT_IA_HANDLE ia_handle,
DAT_EP_HANDLE ep_handle);
-DAT_BOOLEAN DT_post_recv_buffer (DT_Tdep_Print_Head* phead,
+boolean_t DT_post_recv_buffer (DT_Tdep_Print_Head* phead,
DAT_EP_HANDLE ep_handle,
Bpool * bp,
int index,
int size);
-DAT_BOOLEAN DT_post_send_buffer (DT_Tdep_Print_Head* phead,
+boolean_t DT_post_send_buffer (DT_Tdep_Print_Head* phead,
DAT_EP_HANDLE ep_handle,
Bpool * bp,
int index,
@@ -471,9 +471,9 @@ void DT_Transaction_Test_Serv
bool DT_Transaction_Create_Test (Per_Test_Data_t * pt_ptr,
DAT_IA_HANDLE * ia_handle,
- DAT_BOOLEAN is_server,
+ boolean_t is_server,
unsigned int port_num,
- DAT_BOOLEAN remote_is_little_endian,
+ boolean_t remote_is_little_endian,
DAT_IA_ADDRESS_PTR remote_ia_addr);
void DT_Transaction_Main (void *param);
Index: linux-kernel/test/dapltest/include/dapl_bpool.h
===================================================================
--- linux-kernel/test/dapltest/include/dapl_bpool.h (revision 2295)
+++ linux-kernel/test/dapltest/include/dapl_bpool.h (working copy)
@@ -49,8 +49,8 @@ struct Bpool_tag {
DAT_LMR_HANDLE lmr_handle; /* local access */
DAT_LMR_CONTEXT lmr_context;
struct dat_lmr_triplet *tripl_start; /* local IOV */
- DAT_BOOLEAN enable_rdma_write; /* remote access */
- DAT_BOOLEAN enable_rdma_read;
+ boolean_t enable_rdma_write; /* remote access */
+ boolean_t enable_rdma_read;
DAT_RMR_HANDLE rmr_handle;
DAT_RMR_CONTEXT rmr_context;
DAT_EVD_HANDLE rmr_evd_handle;
Index: linux-kernel/test/dapltest/include/dapl_transaction_test.h
===================================================================
--- linux-kernel/test/dapltest/include/dapl_transaction_test.h (revision 2295)
+++ linux-kernel/test/dapltest/include/dapl_transaction_test.h (working copy)
@@ -35,11 +35,11 @@
typedef struct
{
- DAT_BOOLEAN server_initiated;
+ boolean_t server_initiated;
DT_Transfer_Type transfer_type;
uint32_t num_segs;
uint32_t seg_size;
- DAT_BOOLEAN reap_send_on_recv;
+ boolean_t reap_send_on_recv;
Bpool *bp;
/* RDMA info */
@@ -72,8 +72,8 @@ typedef struct
typedef struct
{
/* This group set up by DT_Transaction_Create_Test() */
- DAT_BOOLEAN is_server;
- DAT_BOOLEAN remote_is_little_endian;
+ boolean_t is_server;
+ boolean_t remote_is_little_endian;
Per_Test_Data_t *pt_ptr;
DAT_IA_HANDLE ia_handle;
Transaction_Cmd_t *cmd;
Index: linux-kernel/test/dapltest/cmd/dapl_netaddr.c
===================================================================
--- linux-kernel/test/dapltest/cmd/dapl_netaddr.c (revision 2295)
+++ linux-kernel/test/dapltest/cmd/dapl_netaddr.c (working copy)
@@ -125,7 +125,7 @@ DT_NetAddrLookupHostAddress (DAT_IA_ADDR
DT_Mdep_printf ("getaddrinfo (%s) failed (%s)\n",
hostname, whatzit);
- return DAT_FALSE;
+ return FALSE;
}
/* Pull out IP address and print it as a sanity check */
@@ -139,6 +139,6 @@ DT_NetAddrLookupHostAddress (DAT_IA_ADDR
*to_netaddr = * ((DAT_IA_ADDRESS_PTR) target->ai_addr);
- return ( DAT_TRUE );
+ return ( TRUE );
}
Index: linux-kernel/test/dapltest/mdep/linux/dapl_mdep_user.c
===================================================================
--- linux-kernel/test/dapltest/mdep/linux/dapl_mdep_user.c (revision 2295)
+++ linux-kernel/test/dapltest/mdep/linux/dapl_mdep_user.c (working copy)
@@ -431,7 +431,7 @@ DT_Mdep_wait_object_init (
DT_WAIT_OBJECT *wait_obj)
{
- wait_obj->signaled = DAT_FALSE;
+ wait_obj->signaled = FALSE;
if ( 0 != pthread_cond_init ( &wait_obj->cv, NULL ) )
{
return (-1);
@@ -492,7 +492,7 @@ DT_Mdep_wait_object_wait (
future.tv_nsec = now.tv_usec * 1000;
pthread_mutex_lock (&wait_obj->lock);
- while ( wait_obj->signaled == DAT_FALSE && pthread_status == 0)
+ while ( wait_obj->signaled == FALSE && pthread_status == 0)
{
pthread_status = pthread_cond_timedwait (
&wait_obj->cv, &wait_obj->lock, &future );
@@ -512,7 +512,7 @@ DT_Mdep_wait_object_wait (
else
{
pthread_mutex_lock (&wait_obj->lock);
- while ( wait_obj->signaled == DAT_FALSE && pthread_status == 0)
+ while ( wait_obj->signaled == FALSE && pthread_status == 0)
{
pthread_status = pthread_cond_wait (
&wait_obj->cv, &wait_obj->lock );
Index: linux-kernel/test/dapltest/kdapl/kdapl_tdep_evd.c
===================================================================
--- linux-kernel/test/dapltest/kdapl/kdapl_tdep_evd.c (revision 2295)
+++ linux-kernel/test/dapltest/kdapl/kdapl_tdep_evd.c (working copy)
@@ -47,7 +47,7 @@ typedef struct Tdep_Evd_Tag
static void DT_Tdep_Event_Callback (
DAT_PVOID instance_data,
const struct dat_event *dat_event,
- DAT_BOOLEAN bool_arg);
+ boolean_t bool_arg);
/* static data */
@@ -324,7 +324,7 @@ DT_Tdep_evd_free (DAT_EVD_HANDLE evd_han
static void DT_Tdep_Event_Callback (
DAT_PVOID instance_data,
const struct dat_event * dat_event,
- DAT_BOOLEAN bool_arg)
+ boolean_t bool_arg)
{
Tdep_Event *event;
Tdep_Evd *evd_ptr;
Index: linux-kernel/dat-provider/dapl_cr_callback.c
===================================================================
--- linux-kernel/dat-provider/dapl_cr_callback.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_cr_callback.c (working copy)
@@ -87,7 +87,7 @@ void dapl_cr_callback(ib_cm_handle_t ib_
sp_ptr->header.magic == DAPL_MAGIC_RSP);
/* Obtain the event number from the provider layer */
- dat_event_num = dapl_ib_get_dat_event(ib_cm_event, DAT_FALSE);
+ dat_event_num = dapl_ib_get_dat_event(ib_cm_event, FALSE);
/*
* CONNECT_REQUEST events create an event on the PSP
@@ -128,7 +128,7 @@ void dapl_cr_callback(ib_cm_handle_t ib_
*/
spin_lock(&sp_ptr->header.lock);
- if (sp_ptr->listening == DAT_FALSE) {
+ if (sp_ptr->listening == FALSE) {
spin_unlock(&sp_ptr->header.lock);
dapl_dbg_log(DAPL_DBG_TYPE_CM,
"---> dapl_cr_callback: conn event on down SP\n");
@@ -143,7 +143,7 @@ void dapl_cr_callback(ib_cm_handle_t ib_
* RSP connections only allow a single connection. Close
* it down NOW so we reject any further connections.
*/
- sp_ptr->listening = DAT_FALSE;
+ sp_ptr->listening = FALSE;
}
spin_unlock(&sp_ptr->header.lock);
@@ -205,7 +205,7 @@ void dapl_cr_callback(ib_cm_handle_t ib_
return;
}
ep_ptr->param.ep_state = DAT_EP_STATE_DISCONNECTED;
- dapl_ib_disconnect_clean(ep_ptr, DAT_FALSE,
+ dapl_ib_disconnect_clean(ep_ptr, FALSE,
ib_cm_event);
spin_unlock(&ep_ptr->header.lock);
@@ -221,7 +221,7 @@ void dapl_cr_callback(ib_cm_handle_t ib_
*/
spin_lock(&ep_ptr->header.lock);
ep_ptr->param.ep_state = DAT_EP_STATE_DISCONNECTED;
- dapl_ib_disconnect_clean(ep_ptr, DAT_FALSE,
+ dapl_ib_disconnect_clean(ep_ptr, FALSE,
ib_cm_event);
spin_unlock(&ep_ptr->header.lock);
@@ -231,7 +231,7 @@ void dapl_cr_callback(ib_cm_handle_t ib_
{
spin_lock(&ep_ptr->header.lock);
ep_ptr->param.ep_state = DAT_EP_STATE_DISCONNECTED;
- dapl_ib_disconnect_clean(ep_ptr, DAT_FALSE,
+ dapl_ib_disconnect_clean(ep_ptr, FALSE,
ib_cm_event);
spin_unlock(&ep_ptr->header.lock);
@@ -433,7 +433,7 @@ DAPL_EP *dapl_get_sp_ep(ib_cm_handle_t i
* If this SP has been removed from service, free it
* up after the last CR is removed
*/
- if (sp_ptr->listening != DAT_TRUE && sp_ptr->cr_list_count == 0
+ if (sp_ptr->listening != TRUE && sp_ptr->cr_list_count == 0
&& sp_ptr->state != DAPL_SP_STATE_FREE) {
dapl_dbg_log(DAPL_DBG_TYPE_CM,
"--> dapl_get_sp_ep! disconnect dump sp: %p \n",
Index: linux-kernel/dat-provider/dapl_module.c
===================================================================
--- linux-kernel/dat-provider/dapl_module.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_module.c (working copy)
@@ -236,7 +236,7 @@ void dapl_add_one(struct ib_device *devi
dev_name_suffix_table[i + 1]);
provider_info.dat_version_major = DAT_VERSION_MAJOR;
provider_info.dat_version_minor = DAT_VERSION_MINOR;
- provider_info.is_thread_safe = DAT_FALSE;
+ provider_info.is_thread_safe = FALSE;
DAT_PROVIDER_INIT_FUNC_NAME(&provider_info, device, i);
}
return;
@@ -258,7 +258,7 @@ void dapl_remove_one(struct ib_device *d
dev_name_suffix_table[i + 1]);
provider_info.dat_version_major = DAT_VERSION_MAJOR;
provider_info.dat_version_minor = DAT_VERSION_MINOR;
- provider_info.is_thread_safe = DAT_FALSE;
+ provider_info.is_thread_safe = FALSE;
DAT_PROVIDER_FINI_FUNC_NAME(&provider_info);
}
return;
Index: linux-kernel/dat-provider/dapl_psp_create.c
===================================================================
--- linux-kernel/dat-provider/dapl_psp_create.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_psp_create.c (working copy)
@@ -76,7 +76,7 @@ dapl_psp_create(DAT_IA_HANDLE ia_handle,
DAPL_IA *ia_ptr;
DAPL_SP *sp_ptr;
DAPL_EVD *evd_ptr;
- DAT_BOOLEAN sp_found;
+ boolean_t sp_found;
DAT_RETURN dat_status;
ia_ptr = (DAPL_IA *) ia_handle;
@@ -115,19 +115,19 @@ dapl_psp_create(DAT_IA_HANDLE ia_handle,
* See if we have a quiescent listener to use for this PSP, else
* create one and set it listening
*/
- sp_ptr = dapl_ia_sp_search(ia_ptr, conn_qual, DAT_TRUE);
- sp_found = DAT_TRUE;
+ sp_ptr = dapl_ia_sp_search(ia_ptr, conn_qual, TRUE);
+ sp_found = TRUE;
if (sp_ptr == NULL) {
/* Allocate PSP */
- sp_found = DAT_FALSE;
- sp_ptr = dapl_sp_alloc(ia_ptr, DAT_TRUE);
+ sp_found = FALSE;
+ sp_ptr = dapl_sp_alloc(ia_ptr, TRUE);
if (sp_ptr == NULL) {
dat_status =
DAT_ERROR(DAT_INSUFFICIENT_RESOURCES,
DAT_RESOURCE_MEMORY);
goto bail;
}
- } else if (sp_ptr->listening == DAT_TRUE) {
+ } else if (sp_ptr->listening == TRUE) {
dat_status = DAT_ERROR(DAT_CONN_QUAL_IN_USE, 0);
goto bail;
}
@@ -151,13 +151,13 @@ dapl_psp_create(DAT_IA_HANDLE ia_handle,
* even before this call returns!
*/
sp_ptr->state = DAPL_SP_STATE_PSP_LISTENING;
- sp_ptr->listening = DAT_TRUE;
+ sp_ptr->listening = TRUE;
/*
* If this is a new sp we need to add it to the IA queue, and set up
* a conn_listener.
*/
- if (sp_found == DAT_FALSE) {
+ if (sp_found == FALSE) {
/* Link it onto the IA before enabling it to receive conn
* requests
*/
Index: linux-kernel/dat-provider/dapl_evd_connection_callb.c
===================================================================
--- linux-kernel/dat-provider/dapl_evd_connection_callb.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_evd_connection_callb.c (working copy)
@@ -109,7 +109,7 @@ dapl_evd_connection_callback(ib_cm_handl
}
/* Obtain the event number from the provider layer */
- dat_event_num = dapl_ib_get_dat_event(ib_cm_event, DAT_FALSE);
+ dat_event_num = dapl_ib_get_dat_event(ib_cm_event, FALSE);
switch (dat_event_num) {
case DAT_CONNECTION_EVENT_ESTABLISHED:
@@ -148,7 +148,7 @@ dapl_evd_connection_callback(ib_cm_handl
* another connection
*/
ep_ptr->param.ep_state = DAT_EP_STATE_DISCONNECTED;
- dapl_ib_disconnect_clean(ep_ptr, DAT_TRUE, ib_cm_event);
+ dapl_ib_disconnect_clean(ep_ptr, TRUE, ib_cm_event);
spin_unlock(&ep_ptr->header.lock);
break;
@@ -156,7 +156,7 @@ dapl_evd_connection_callback(ib_cm_handl
case DAT_CONNECTION_EVENT_PEER_REJECTED:
{
ep_ptr->param.ep_state = DAT_EP_STATE_DISCONNECTED;
- dapl_ib_disconnect_clean(ep_ptr, DAT_TRUE, ib_cm_event);
+ dapl_ib_disconnect_clean(ep_ptr, TRUE, ib_cm_event);
spin_unlock(&ep_ptr->header.lock);
break;
@@ -164,7 +164,7 @@ dapl_evd_connection_callback(ib_cm_handl
case DAT_CONNECTION_EVENT_UNREACHABLE:
{
ep_ptr->param.ep_state = DAT_EP_STATE_DISCONNECTED;
- dapl_ib_disconnect_clean(ep_ptr, DAT_TRUE, ib_cm_event);
+ dapl_ib_disconnect_clean(ep_ptr, TRUE, ib_cm_event);
spin_unlock(&ep_ptr->header.lock);
break;
@@ -172,7 +172,7 @@ dapl_evd_connection_callback(ib_cm_handl
case DAT_CONNECTION_EVENT_NON_PEER_REJECTED:
{
ep_ptr->param.ep_state = DAT_EP_STATE_DISCONNECTED;
- dapl_ib_disconnect_clean(ep_ptr, DAT_TRUE, ib_cm_event);
+ dapl_ib_disconnect_clean(ep_ptr, TRUE, ib_cm_event);
spin_unlock(&ep_ptr->header.lock);
break;
@@ -180,7 +180,7 @@ dapl_evd_connection_callback(ib_cm_handl
case DAT_CONNECTION_EVENT_BROKEN:
{
ep_ptr->param.ep_state = DAT_EP_STATE_DISCONNECTED;
- dapl_ib_disconnect_clean(ep_ptr, DAT_FALSE,
+ dapl_ib_disconnect_clean(ep_ptr, FALSE,
ib_cm_event);
spin_unlock(&ep_ptr->header.lock);
Index: linux-kernel/dat-provider/dapl_psp_create_any.c
===================================================================
--- linux-kernel/dat-provider/dapl_psp_create_any.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_psp_create_any.c (working copy)
@@ -121,7 +121,7 @@ dapl_psp_create_any(DAT_IA_HANDLE ia_han
}
/* Allocate PSP */
- sp_ptr = dapl_sp_alloc(ia_ptr, DAT_TRUE);
+ sp_ptr = dapl_sp_alloc(ia_ptr, TRUE);
if (sp_ptr == NULL) {
dat_status =
DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
@@ -149,7 +149,7 @@ dapl_psp_create_any(DAT_IA_HANDLE ia_han
* even before this call returns!
*/
sp_ptr->state = DAPL_SP_STATE_PSP_LISTENING;
- sp_ptr->listening = DAT_TRUE;
+ sp_ptr->listening = TRUE;
limit_conn_qual = 0;
lcl_conn_qual = hint_conn_qual;
Index: linux-kernel/dat-provider/dapl_psp_free.c
===================================================================
--- linux-kernel/dat-provider/dapl_psp_free.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_psp_free.c (working copy)
@@ -89,7 +89,7 @@ DAT_RETURN dapl_psp_free(DAT_PSP_HANDLE
*/
spin_lock(&sp_ptr->header.lock);
- sp_ptr->listening = DAT_FALSE;
+ sp_ptr->listening = FALSE;
/* Release reference on EVD. If an error was encountered in a previous
* free the evd_handle will be NULL
Index: linux-kernel/dat-provider/dapl_ep_get_status.c
===================================================================
--- linux-kernel/dat-provider/dapl_ep_get_status.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_ep_get_status.c (working copy)
@@ -62,7 +62,7 @@
DAT_RETURN
dapl_ep_get_status(DAT_EP_HANDLE ep_handle,
DAT_EP_STATE * ep_state,
- DAT_BOOLEAN * in_dto_idle, DAT_BOOLEAN * out_dto_idle)
+ boolean_t *in_dto_idle, boolean_t *out_dto_idle)
{
DAPL_EP *ep_ptr;
DAT_RETURN dat_status;
@@ -92,14 +92,12 @@ dapl_ep_get_status(DAT_EP_HANDLE ep_hand
if (in_dto_idle != NULL) {
*in_dto_idle =
- (atomic_read(&ep_ptr->recv_count)) ? DAT_FALSE :
- DAT_TRUE;
+ (atomic_read(&ep_ptr->recv_count)) ? FALSE : TRUE;
}
if (out_dto_idle != NULL) {
*out_dto_idle =
- (atomic_read(&ep_ptr->req_count)) ? DAT_FALSE :
- DAT_TRUE;
+ (atomic_read(&ep_ptr->req_count)) ? FALSE : TRUE;
}
bail:
Index: linux-kernel/dat-provider/dapl_ia_query.c
===================================================================
--- linux-kernel/dat-provider/dapl_ia_query.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_ia_query.c (working copy)
@@ -68,9 +68,9 @@ dapl_ia_query(DAT_IA_HANDLE ia_handle,
DAPL_IA *ia_ptr;
DAT_RETURN dat_status;
struct evd_merge_type {
- DAT_BOOLEAN array[6][6];
+ boolean_t array[6][6];
} *evd_merge;
- DAT_BOOLEAN val;
+ boolean_t val;
int i;
int j;
@@ -120,9 +120,9 @@ dapl_ia_query(DAT_IA_HANDLE ia_handle,
provider_attr->dat_qos_supported = DAT_QOS_BEST_EFFORT;
provider_attr->completion_flags_supported =
DAT_COMPLETION_DEFAULT_FLAG;
- provider_attr->is_thread_safe = DAT_FALSE;
+ provider_attr->is_thread_safe = FALSE;
provider_attr->max_private_data_size = IB_MAX_REQ_PDATA_SIZE;
- provider_attr->supports_multipath = DAT_FALSE;
+ provider_attr->supports_multipath = FALSE;
provider_attr->ep_creator = DAT_PSP_CREATES_EP_NEVER;
provider_attr->optimal_buffer_alignment = DAPL_OPTIMAL_ALIGNMENT;
/* The value of pz_support may vary by transport */
@@ -149,17 +149,17 @@ dapl_ia_query(DAT_IA_HANDLE ia_handle,
evd_merge =
(struct evd_merge_type *)&provider_attr->
evd_stream_merging_supported[0][0];
- val = DAT_TRUE;
+ val = TRUE;
for (i = 0; i < 6; i++) {
if (i > 4) {
/* ASYNC EVD is 5, so entire row will be 0 */
- val = DAT_FALSE;
+ val = FALSE;
}
for (j = 0; j < 5; j++) {
evd_merge->array[i][j] = val;
}
/* Set the ASYNC_EVD column to FALSE */
- evd_merge->array[i][5] = DAT_FALSE;
+ evd_merge->array[i][5] = FALSE;
}
#ifndef DAPL_MERGE_CM_DTO
@@ -169,9 +169,9 @@ dapl_ia_query(DAT_IA_HANDLE ia_handle,
* skip the following code
*/
/* DAT_EVD_DTO_FLAG | DAT_EVD_CONNECTION_FLAG */
- evd_merge->array[2][3] = DAT_FALSE;
+ evd_merge->array[2][3] = FALSE;
/* DAT_EVD_CONNECTION_FLAG | DAT_EVD_DTO_FLAG */
- evd_merge->array[3][2] = DAT_FALSE;
+ evd_merge->array[3][2] = FALSE;
#endif /* DAPL_MERGE_CM_DTO */
}
Index: linux-kernel/dat-provider/dapl_mr_util.h
===================================================================
--- linux-kernel/dat-provider/dapl_mr_util.h (revision 2295)
+++ linux-kernel/dat-provider/dapl_mr_util.h (working copy)
@@ -49,7 +49,7 @@
extern DAT_VADDR
dapl_mr_get_address(DAT_REGION_DESCRIPTION desc, DAT_MEM_TYPE type);
-static __inline__ DAT_BOOLEAN
+static __inline__ boolean_t
dapl_mr_bounds_check(DAT_VADDR addr_a,
DAT_VLEN length_a, DAT_VADDR addr_b, DAT_VLEN length_b);
@@ -67,14 +67,14 @@ dapl_mr_bounds_check(DAT_VADDR addr_a,
*
*/
-static __inline__ DAT_BOOLEAN
+static __inline__ boolean_t
dapl_mr_bounds_check(DAT_VADDR addr_a,
DAT_VLEN length_a, DAT_VADDR addr_b, DAT_VLEN length_b)
{
if ((addr_a <= addr_b) && (addr_b + length_b) <= (addr_a + length_a)) {
- return DAT_TRUE;
+ return TRUE;
} else {
- return DAT_FALSE;
+ return FALSE;
}
}
Index: linux-kernel/dat-provider/dapl_adapter_util.h
===================================================================
--- linux-kernel/dat-provider/dapl_adapter_util.h (revision 2295)
+++ linux-kernel/dat-provider/dapl_adapter_util.h (working copy)
@@ -139,11 +139,11 @@ DAT_RETURN dapl_ib_mw_bind(DAPL_RMR * rm
DAT_VADDR virtual_address,
DAT_VLEN length,
DAT_MEM_PRIV_FLAGS mem_priv,
- DAT_BOOLEAN is_signaled);
+ boolean_t is_signaled);
DAT_RETURN dapl_ib_mw_unbind(DAPL_RMR * rmr,
DAPL_EP * ep,
- DAPL_COOKIE * cookie, DAT_BOOLEAN is_signaled);
+ DAPL_COOKIE * cookie, boolean_t is_signaled);
DAT_RETURN dapl_ib_query_hca(DAPL_HCA * hca_ptr,
struct dat_ia_attr *ia_attr,
@@ -163,14 +163,14 @@ DAT_DTO_COMPLETION_STATUS dapl_ib_get_dt
void dapl_ib_reinit_ep(DAPL_EP * ep_ptr);
void dapl_ib_disconnect_clean(DAPL_EP * ep_ptr,
- DAT_BOOLEAN passive,
+ boolean_t passive,
const ib_cm_events_t ib_cm_event);
DAT_RETURN dapl_ib_get_async_event(ib_error_record_t * cause_ptr,
DAT_EVENT_NUMBER * async_event);
DAT_EVENT_NUMBER dapl_ib_get_dat_event(const ib_cm_events_t ib_cm_event,
- DAT_BOOLEAN active);
+ boolean_t active);
ib_cm_events_t dapl_ib_get_cm_event(DAT_EVENT_NUMBER dat_event_num);
Index: linux-kernel/dat-provider/dapl_ia_util.c
===================================================================
--- linux-kernel/dat-provider/dapl_ia_util.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_ia_util.c (working copy)
@@ -91,7 +91,7 @@ DAPL_IA *dapl_ia_alloc(struct dat_provid
*/
ia_ptr->hca_ptr = hca_ptr;
ia_ptr->async_error_evd = NULL;
- ia_ptr->cleanup_async_error_evd = DAT_FALSE;
+ ia_ptr->cleanup_async_error_evd = FALSE;
dapl_llist_init_entry(&ia_ptr->hca_ia_list_entry);
dapl_llist_init_head(&ia_ptr->ep_list_head);
dapl_llist_init_head(&ia_ptr->lmr_list_head);
@@ -316,7 +316,7 @@ DAT_RETURN dapl_ia_abrupt_close(DAPL_IA
* Free the async EVD, shutting down callbacks from the HCA.
*/
if (ia_ptr->async_error_evd &&
- (DAT_TRUE == ia_ptr->cleanup_async_error_evd)) {
+ (TRUE == ia_ptr->cleanup_async_error_evd)) {
dat_status = dapl_ia_teardown_callbacks(ia_ptr);
atomic_dec(&ia_ptr->async_error_evd->evd_ref_count);
@@ -382,7 +382,7 @@ DAT_RETURN dapl_ia_graceful_close(DAPL_I
/* if the async evd does not need to be cleaned up */
/* (ie. it was not created by dapl_ia_open) */
/* then the evd list should be empty */
- if (DAT_FALSE == ia_ptr->cleanup_async_error_evd) {
+ if (FALSE == ia_ptr->cleanup_async_error_evd) {
if (!dapl_llist_is_empty(&ia_ptr->evd_list_head)) {
dat_status =
DAT_ERROR(DAT_INVALID_STATE,
@@ -437,7 +437,7 @@ DAT_RETURN dapl_ia_graceful_close(DAPL_I
/* Tear down the async EVD if needed, first shutting down callbacks. */
if (ia_ptr->async_error_evd &&
- (DAT_TRUE == ia_ptr->cleanup_async_error_evd)) {
+ (TRUE == ia_ptr->cleanup_async_error_evd)) {
cur_dat_status = dapl_ia_teardown_callbacks(ia_ptr);
if (DAT_SUCCESS != cur_dat_status) {
dat_status = cur_dat_status;
@@ -683,7 +683,7 @@ void dapl_ia_unlink_sp(DAPL_IA * ia_ptr,
*
*/
DAPL_SP *dapl_ia_sp_search(DAPL_IA * ia_ptr,
- DAT_CONN_QUAL conn_qual, DAT_BOOLEAN is_psp)
+ DAT_CONN_QUAL conn_qual, boolean_t is_psp)
{
DAPL_SP *sp_ptr;
DAPL_LLIST_HEAD *list_head;
Index: linux-kernel/dat-provider/dapl_provider.c
===================================================================
--- linux-kernel/dat-provider/dapl_provider.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_provider.c (working copy)
@@ -135,7 +135,7 @@ struct dat_provider g_dapl_provider_temp
* *
*********************************************************************/
-static DAT_BOOLEAN
+static boolean_t
dapl_provider_list_key_cmp(const char *name_a, const char *name_b);
/*********************************************************************
@@ -319,17 +319,17 @@ DAT_RETURN dapl_provider_list_remove(con
return status;
}
-DAT_BOOLEAN dapl_provider_list_key_cmp(const char *name_a, const char *name_b)
+boolean_t dapl_provider_list_key_cmp(const char *name_a, const char *name_b)
{
unsigned int len;
len = strlen(name_a);
if (strlen(name_b) != len) {
- return DAT_FALSE;
+ return FALSE;
} else if (memcmp(name_a, name_b, len)) {
- return DAT_FALSE;
+ return FALSE;
} else {
- return DAT_TRUE;
+ return TRUE;
}
}
Index: linux-kernel/dat-provider/dapl_openib_cm.c
===================================================================
--- linux-kernel/dat-provider/dapl_openib_cm.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_openib_cm.c (working copy)
@@ -511,7 +511,7 @@ DAT_RETURN dapl_ib_disconnect(DAPL_EP *
*/
void
dapl_ib_disconnect_clean(DAPL_EP * ep_ptr,
- DAT_BOOLEAN active,
+ boolean_t active,
const ib_cm_events_t ib_cm_event)
{
int status;
Index: linux-kernel/dat-provider/dapl_ia_util.h
===================================================================
--- linux-kernel/dat-provider/dapl_ia_util.h (revision 2295)
+++ linux-kernel/dat-provider/dapl_ia_util.h (working copy)
@@ -78,7 +78,7 @@ void dapl_ia_unlink_sp(DAPL_IA * ia_ptr,
void dapl_ia_link_rsp(DAPL_IA * ia_ptr, DAPL_SP * sp_info);
DAPL_SP *dapl_ia_sp_search(DAPL_IA * ia_ptr,
- DAT_CONN_QUAL conn_qual, DAT_BOOLEAN is_psp);
+ DAT_CONN_QUAL conn_qual, boolean_t is_psp);
DAT_RETURN dapl_ia_setup_callbacks(DAPL_IA * ia_ptr, DAPL_EVD * async_evd_ptr);
Index: linux-kernel/dat-provider/dapl_rmr_bind.c
===================================================================
--- linux-kernel/dat-provider/dapl_rmr_bind.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_rmr_bind.c (working copy)
@@ -79,7 +79,7 @@ dapl_rmr_bind_fuse(DAPL_RMR * rmr,
DAPL_LMR *lmr;
DAPL_COOKIE *cookie;
DAT_RETURN dat_status;
- DAT_BOOLEAN is_signaled;
+ boolean_t is_signaled;
dat_status =
dapl_hash_search(rmr->header.owner_ia->hca_ptr->lmr_hash_table,
@@ -104,7 +104,7 @@ dapl_rmr_bind_fuse(DAPL_RMR * rmr,
goto bail;
}
- if (DAT_FALSE ==
+ if (FALSE ==
dapl_mr_bounds_check(dapl_mr_get_address
(lmr->param.region_desc, lmr->param.mem_type),
lmr->param.length,
@@ -146,8 +146,8 @@ dapl_rmr_bind_fuse(DAPL_RMR * rmr,
}
is_signaled =
- (completion_flags & DAT_COMPLETION_SUPPRESS_FLAG) ? DAT_FALSE :
- DAT_TRUE;
+ (completion_flags & DAT_COMPLETION_SUPPRESS_FLAG) ? FALSE :
+ TRUE;
/*
* Take reference before posting to avoid race conditions with
@@ -196,7 +196,7 @@ dapl_rmr_bind_unfuse(DAPL_RMR * rmr,
{
DAPL_COOKIE *cookie;
DAT_RETURN dat_status;
- DAT_BOOLEAN is_signaled;
+ boolean_t is_signaled;
dat_status = DAT_SUCCESS;
/*
@@ -246,8 +246,8 @@ dapl_rmr_bind_unfuse(DAPL_RMR * rmr,
}
is_signaled =
- (completion_flags & DAT_COMPLETION_UNSIGNALLED_FLAG) ? DAT_FALSE :
- DAT_TRUE;
+ (completion_flags & DAT_COMPLETION_UNSIGNALLED_FLAG) ? FALSE :
+ TRUE;
/*
* Take reference before posting to avoid race conditions with
Index: linux-kernel/dat-provider/dapl_openib_util.c
===================================================================
--- linux-kernel/dat-provider/dapl_openib_util.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_openib_util.c (working copy)
@@ -623,7 +623,7 @@ dapl_ib_mw_bind(DAPL_RMR * rmr,
DAPL_COOKIE * cookie,
DAT_VADDR virtual_address,
DAT_VLEN length,
- DAT_MEM_PRIV_FLAGS mem_priv, DAT_BOOLEAN is_signaled)
+ DAT_MEM_PRIV_FLAGS mem_priv, boolean_t is_signaled)
{
int ib_status;
struct ib_mw_bind mw_bind_prop;
@@ -632,7 +632,7 @@ dapl_ib_mw_bind(DAPL_RMR * rmr,
mw_bind_prop.length = length;
mw_bind_prop.mw_access_flags = dapl_ib_convert_mem_privileges(mem_priv);
mw_bind_prop.send_flags =
- (is_signaled == DAT_TRUE) ? IB_SEND_SIGNALED : 0;
+ (is_signaled == TRUE) ? IB_SEND_SIGNALED : 0;
mw_bind_prop.mr = lmr->mr_handle;
mw_bind_prop.wr_id = (u64) (uintptr_t) cookie;
dapl_dbg_log(DAPL_DBG_TYPE_UTIL,
@@ -673,7 +673,7 @@ dapl_ib_mw_bind(DAPL_RMR * rmr,
*/
DAT_RETURN
dapl_ib_mw_unbind(DAPL_RMR * rmr,
- DAPL_EP * ep, DAPL_COOKIE * cookie, DAT_BOOLEAN is_signaled)
+ DAPL_EP * ep, DAPL_COOKIE * cookie, boolean_t is_signaled)
{
int ib_status;
struct ib_mw_bind mw_bind_prop;
@@ -682,7 +682,7 @@ dapl_ib_mw_unbind(DAPL_RMR * rmr,
mw_bind_prop.length = 0;
mw_bind_prop.mw_access_flags = 0;
mw_bind_prop.send_flags =
- (is_signaled == DAT_TRUE) ? IB_SEND_SIGNALED : 0;
+ (is_signaled == TRUE) ? IB_SEND_SIGNALED : 0;
mw_bind_prop.mr = NULL;
mw_bind_prop.wr_id = (u64) (uintptr_t) cookie;
ib_status = ib_bind_mw(ep->qp_handle, rmr->mw_handle, &mw_bind_prop);
@@ -1051,7 +1051,7 @@ static struct ib_cm_event_map {
*/
DAT_EVENT_NUMBER
-dapl_ib_get_dat_event(const ib_cm_events_t ib_cm_event, DAT_BOOLEAN active)
+dapl_ib_get_dat_event(const ib_cm_events_t ib_cm_event, boolean_t active)
{
DAT_EVENT_NUMBER dat_event_num;
int index;
Index: linux-kernel/dat-provider/dapl_ep_modify.c
===================================================================
--- linux-kernel/dat-provider/dapl_ep_modify.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_ep_modify.c (working copy)
@@ -322,18 +322,18 @@ DAT_RETURN dapl_ep_modify(DAT_EP_HANDLE
DAT_RETURN dat_status;
/* Flag indicating we've allocated a new one of these. */
- DAT_BOOLEAN qp_allocated = DAT_FALSE;
- DAT_BOOLEAN rqst_cb_allocated = DAT_FALSE;
- DAT_BOOLEAN recv_cb_allocated = DAT_FALSE;
- DAT_BOOLEAN rqst_iov_allocated = DAT_FALSE;
- DAT_BOOLEAN recv_iov_allocated = DAT_FALSE;
+ boolean_t qp_allocated = FALSE;
+ boolean_t rqst_cb_allocated = FALSE;
+ boolean_t recv_cb_allocated = FALSE;
+ boolean_t rqst_iov_allocated = FALSE;
+ boolean_t recv_iov_allocated = FALSE;
/* Flag indicating we've used (assigned to QP) a new one of these. */
- DAT_BOOLEAN qp_used = DAT_FALSE;
- DAT_BOOLEAN rqst_cb_used = DAT_FALSE;
- DAT_BOOLEAN recv_cb_used = DAT_FALSE;
- DAT_BOOLEAN rqst_iov_used = DAT_FALSE;
- DAT_BOOLEAN recv_iov_used = DAT_FALSE;
+ boolean_t qp_used = FALSE;
+ boolean_t rqst_cb_used = FALSE;
+ boolean_t recv_cb_used = FALSE;
+ boolean_t rqst_iov_used = FALSE;
+ boolean_t recv_iov_used = FALSE;
dat_status = dapl_ep_modify_validate_parameters(ep_handle,
mask,
@@ -381,14 +381,14 @@ DAT_RETURN dapl_ep_modify(DAT_EP_HANDLE
if (DAT_SUCCESS != dat_status) {
goto bail;
}
- rqst_cb_allocated = DAT_TRUE;
+ rqst_cb_allocated = TRUE;
dat_status = dapl_cb_create(&alloc_ep.recv_buffer, ep1, /* For pointer in buffer bool. */
ep_attr1.max_recv_dtos);
if (DAT_SUCCESS != dat_status) {
goto bail;
}
- recv_cb_allocated = DAT_TRUE;
+ recv_cb_allocated = TRUE;
alloc_ep.send_iov_num = ep_attr1.max_request_iov;
alloc_ep.send_iov = kmalloc(ep_attr1.max_request_iov
@@ -399,7 +399,7 @@ DAT_RETURN dapl_ep_modify(DAT_EP_HANDLE
DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
goto bail;
}
- recv_iov_allocated = DAT_TRUE;
+ recv_iov_allocated = TRUE;
alloc_ep.recv_iov_num = ep_attr1.max_recv_iov;
alloc_ep.recv_iov = kmalloc(ep_attr1.max_recv_iov
@@ -410,13 +410,13 @@ DAT_RETURN dapl_ep_modify(DAT_EP_HANDLE
DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
goto bail;
}
- recv_iov_allocated = DAT_TRUE;
+ recv_iov_allocated = TRUE;
dat_status = dapl_ib_qp_alloc(ia, &alloc_ep, ep1);
if (dat_status != DAT_SUCCESS) {
goto bail;
}
- qp_allocated = DAT_TRUE;
+ qp_allocated = TRUE;
/*
* Now we atomically modify the EP, under lock
@@ -473,26 +473,26 @@ DAT_RETURN dapl_ep_modify(DAT_EP_HANDLE
&& (ep_param->ep_attr.max_recv_dtos
!= ep2->param.ep_attr.max_recv_dtos)) {
new_ep.recv_buffer = alloc_ep.recv_buffer;
- recv_cb_used = DAT_TRUE;
+ recv_cb_used = TRUE;
}
if (mask & DAT_EP_FIELD_EP_ATTR_MAX_REQUEST_DTOS
&& (ep_param->ep_attr.max_request_dtos
!= ep2->param.ep_attr.max_request_dtos)) {
new_ep.req_buffer = alloc_ep.req_buffer;
- rqst_cb_used = DAT_TRUE;
+ rqst_cb_used = TRUE;
}
if (mask & DAT_EP_FIELD_EP_ATTR_MAX_RECV_IOV
&& new_ep.recv_iov_num != ep2->recv_iov_num) {
new_ep.recv_iov = alloc_ep.recv_iov;
- recv_iov_used = DAT_TRUE;
+ recv_iov_used = TRUE;
}
if (mask & DAT_EP_FIELD_EP_ATTR_MAX_REQUEST_IOV
&& new_ep.send_iov_num != ep2->send_iov_num) {
new_ep.send_iov = alloc_ep.send_iov;
- recv_iov_used = DAT_TRUE;
+ recv_iov_used = TRUE;
}
/*
Index: linux-kernel/dat-provider/dapl_cno_util.c
===================================================================
--- linux-kernel/dat-provider/dapl_cno_util.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_cno_util.c (working copy)
@@ -131,7 +131,7 @@ dapl_cno_trigger (
cno_ptr->cno_upcall.upcall_func (
cno_ptr->cno_upcall.instance_data,
&event,
- DAT_FALSE);
+ FALSE);
}
dat_status = dapl_evd_dequeue ( (DAT_EVD_HANDLE)evd_ptr, &event);
}
Index: linux-kernel/dat-provider/dapl_timer_util.c
===================================================================
--- linux-kernel/dat-provider/dapl_timer_util.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_timer_util.c (working copy)
@@ -97,7 +97,7 @@ dapl_timer_set(DAPL_OS_TIMER * timer,
{
DAPL_OS_TIMER *list_ptr;
DAPL_OS_TIMEVAL cur_time;
- DAT_BOOLEAN wakeup_tmo_thread;
+ boolean_t wakeup_tmo_thread;
/*
* Start the timer thread the first time we need a timer
@@ -109,7 +109,7 @@ dapl_timer_set(DAPL_OS_TIMER * timer,
}
dapl_llist_init_entry(&timer->list_entry);
- wakeup_tmo_thread = DAT_FALSE;
+ wakeup_tmo_thread = FALSE;
dapl_os_get_time(&cur_time);
timer->expires = cur_time + expires; /* calculate future time */
timer->function = func;
@@ -132,7 +132,7 @@ dapl_timer_set(DAPL_OS_TIMER * timer,
dapl_llist_add_head(&g_daplTimerHead.timer_list_head,
(DAPL_LLIST_ENTRY *) & timer->list_entry,
timer);
- wakeup_tmo_thread = DAT_TRUE;
+ wakeup_tmo_thread = TRUE;
} else {
list_ptr = (DAPL_OS_TIMER *)
dapl_llist_peek_head(&g_daplTimerHead.timer_list_head);
@@ -142,7 +142,7 @@ dapl_timer_set(DAPL_OS_TIMER * timer,
dapl_llist_add_head(&g_daplTimerHead.timer_list_head,
(DAPL_LLIST_ENTRY *) & timer->
list_entry, timer);
- wakeup_tmo_thread = DAT_TRUE;
+ wakeup_tmo_thread = TRUE;
} else {
/* Case 3: figure out where entry goes in sorted list */
list_ptr =
@@ -182,7 +182,7 @@ dapl_timer_set(DAPL_OS_TIMER * timer,
}
spin_unlock(&g_daplTimerHead.lock);
- if (wakeup_tmo_thread == DAT_TRUE) {
+ if (wakeup_tmo_thread == TRUE) {
dapl_os_wait_object_wakeup(&g_daplTimerHead.wait_object);
}
Index: linux-kernel/dat-provider/dapl_rsp_create.c
===================================================================
--- linux-kernel/dat-provider/dapl_rsp_create.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_rsp_create.c (working copy)
@@ -78,7 +78,7 @@ dapl_rsp_create(DAT_IA_HANDLE ia_handle,
DAPL_SP *sp_ptr;
DAPL_EVD *evd_ptr;
DAPL_EP *ep_ptr;
- DAT_BOOLEAN sp_found;
+ boolean_t sp_found;
DAT_RETURN dat_status;
dat_status = DAT_SUCCESS;
@@ -123,13 +123,13 @@ dapl_rsp_create(DAT_IA_HANDLE ia_handle,
goto bail;
}
- sp_ptr = dapl_ia_sp_search(ia_ptr, conn_qual, DAT_FALSE);
- sp_found = DAT_TRUE;
+ sp_ptr = dapl_ia_sp_search(ia_ptr, conn_qual, FALSE);
+ sp_found = TRUE;
if (sp_ptr == NULL) {
- sp_found = DAT_FALSE;
+ sp_found = FALSE;
/* Allocate RSP */
- sp_ptr = dapl_sp_alloc(ia_ptr, DAT_FALSE);
+ sp_ptr = dapl_sp_alloc(ia_ptr, FALSE);
if (sp_ptr == NULL) {
dat_status =
DAT_ERROR(DAT_INSUFFICIENT_RESOURCES,
@@ -162,9 +162,9 @@ dapl_rsp_create(DAT_IA_HANDLE ia_handle,
* even before this call returns!
*/
sp_ptr->state = DAPL_SP_STATE_RSP_LISTENING;
- sp_ptr->listening = DAT_TRUE;
+ sp_ptr->listening = TRUE;
- if (sp_found == DAT_FALSE) {
+ if (sp_found == FALSE) {
/* Link it onto the IA */
dapl_ia_link_rsp(ia_ptr, sp_ptr);
Index: linux-kernel/dat-provider/dapl_ep_util.c
===================================================================
--- linux-kernel/dat-provider/dapl_ep_util.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_ep_util.c (working copy)
@@ -359,7 +359,7 @@ void dapl_ep_timeout(uintptr_t arg)
*cm event number.
*/
ib_cm_event = dapl_ib_get_cm_event(DAT_CONNECTION_EVENT_DISCONNECTED);
- dapl_ib_disconnect_clean(ep_ptr, DAT_TRUE, ib_cm_event);
+ dapl_ib_disconnect_clean(ep_ptr, TRUE, ib_cm_event);
(void)dapl_evd_post_connection_event((DAPL_EVD *) ep_ptr->param.
connect_evd_handle,
Index: linux-kernel/dat-provider/dapl_rmr_util.h
===================================================================
--- linux-kernel/dat-provider/dapl_rmr_util.h (revision 2295)
+++ linux-kernel/dat-provider/dapl_rmr_util.h (working copy)
@@ -49,7 +49,7 @@ extern DAPL_RMR *dapl_rmr_alloc(DAPL_PZ
extern void dapl_rmr_dealloc(DAPL_RMR * rmr);
-static __inline__ DAT_BOOLEAN
+static __inline__ boolean_t
dapl_rmr_validate_completion_flag(DAT_COMPLETION_FLAGS mask,
DAT_COMPLETION_FLAGS allow,
DAT_COMPLETION_FLAGS request);
@@ -60,15 +60,15 @@ dapl_rmr_validate_completion_flag(DAT_CO
* *
*********************************************************************/
-static __inline__ DAT_BOOLEAN
+static __inline__ boolean_t
dapl_rmr_validate_completion_flag(DAT_COMPLETION_FLAGS mask,
DAT_COMPLETION_FLAGS allow,
DAT_COMPLETION_FLAGS request)
{
if ((mask & request) && !(mask & allow)) {
- return DAT_FALSE;
+ return FALSE;
} else {
- return DAT_TRUE;
+ return TRUE;
}
}
Index: linux-kernel/dat-provider/dapl_rsp_free.c
===================================================================
--- linux-kernel/dat-provider/dapl_rsp_free.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_rsp_free.c (working copy)
@@ -112,13 +112,13 @@ DAT_RETURN dapl_rsp_free(DAT_RSP_HANDLE
* else the last disconnect on this RSP will free it up. The RSP
* is used to contain CR records for each connection, which
* contain information necessary to disconnect.
- * sp_ptr->listening will be DAT_TRUE if there has never been a
- * connection event, and DAT_FALSE if a connection attempt resulted
+ * sp_ptr->listening will be TRUE if there has never been a
+ * connection event, and FALSE if a connection attempt resulted
* in a reject.
*/
if (sp_ptr->cr_list_count == 0) {
/* This RSP has never been used. Clean it up */
- sp_ptr->listening = DAT_FALSE;
+ sp_ptr->listening = FALSE;
sp_ptr->state = DAPL_SP_STATE_FREE;
spin_unlock(&sp_ptr->header.lock);
Index: linux-kernel/dat-provider/dapl_ia_open.c
===================================================================
--- linux-kernel/dat-provider/dapl_ia_open.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_ia_open.c (working copy)
@@ -47,7 +47,7 @@
* LOCAL PROTOTYPES
*/
-void dapl_hca_cleanup(DAPL_HCA * hca_ptr, DAT_BOOLEAN dec_ref);
+void dapl_hca_cleanup(DAPL_HCA * hca_ptr, boolean_t dec_ref);
/*
* Open a provider and return a handle. The handle enables the user
@@ -124,7 +124,7 @@ dapl_ia_open(const DAT_NAME_PTR name,
&hca_ptr->ia_attr,
NULL, &hca_ptr->hca_address);
if (dat_status != DAT_SUCCESS) {
- dapl_hca_cleanup(hca_ptr, DAT_FALSE);
+ dapl_hca_cleanup(hca_ptr, FALSE);
spin_unlock(&hca_ptr->lock);
goto bail;
}
@@ -137,7 +137,7 @@ dapl_ia_open(const DAT_NAME_PTR name,
ia_ptr = dapl_ia_alloc(provider, hca_ptr);
if (!ia_ptr) {
spin_lock(&hca_ptr->lock);
- dapl_hca_cleanup(hca_ptr, DAT_TRUE);
+ dapl_hca_cleanup(hca_ptr, TRUE);
spin_unlock(&hca_ptr->lock);
dat_status =
DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
@@ -173,7 +173,7 @@ dapl_ia_open(const DAT_NAME_PTR name,
goto bail;
}
- ia_ptr->cleanup_async_error_evd = DAT_FALSE;
+ ia_ptr->cleanup_async_error_evd = FALSE;
ia_ptr->async_error_evd = evd_ptr;
} else {
/* Verify we have >0 length, and let the provider check the size */
@@ -204,13 +204,13 @@ dapl_ia_open(const DAT_NAME_PTR name,
dat_status = dapl_ia_setup_callbacks(ia_ptr, evd_ptr);
if (dat_status != DAT_SUCCESS) {
/* Assign the EVD so it gets cleaned up */
- ia_ptr->cleanup_async_error_evd = DAT_TRUE;
+ ia_ptr->cleanup_async_error_evd = TRUE;
ia_ptr->async_error_evd = evd_ptr;
goto bail;
}
}
- ia_ptr->cleanup_async_error_evd = DAT_TRUE;
+ ia_ptr->cleanup_async_error_evd = TRUE;
ia_ptr->async_error_evd = evd_ptr;
}
@@ -236,10 +236,10 @@ dapl_ia_open(const DAT_NAME_PTR name,
* Clean up partially allocated HCA stuff. Strictly to make cleanup
* simple.
*/
-void dapl_hca_cleanup(DAPL_HCA * hca_ptr, DAT_BOOLEAN dec_ref)
+void dapl_hca_cleanup(DAPL_HCA * hca_ptr, boolean_t dec_ref)
{
dapl_ib_close_hca(hca_ptr);
- if (dec_ref == DAT_TRUE) {
+ if (dec_ref == TRUE) {
atomic_dec(&hca_ptr->handle_ref_count);
}
}
Index: linux-kernel/dat-provider/dapl_evd_util.c
===================================================================
--- linux-kernel/dat-provider/dapl_evd_util.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_evd_util.c (working copy)
@@ -163,7 +163,7 @@ DAPL_EVD *dapl_evd_alloc(DAPL_IA * ia_pt
evd_ptr->evd_producer_locking_needed = 1; /* Conservative value. */
evd_ptr->ib_cq_handle = IB_INVALID_HANDLE;
atomic_set(&evd_ptr->evd_ref_count, 0);
- evd_ptr->catastrophic_overflow = DAT_FALSE;
+ evd_ptr->catastrophic_overflow = FALSE;
evd_ptr->qlen = qlen;
evd_ptr->cno_ptr = cno_ptr;
@@ -476,7 +476,7 @@ dapl_evd_post_overflow_event(DAPL_EVD *
* In that case we've got a catastrophic overflow.
*/
if (async_evd_ptr == overflow_evd_ptr) {
- async_evd_ptr->catastrophic_overflow = DAT_TRUE;
+ async_evd_ptr->catastrophic_overflow = TRUE;
async_evd_ptr->evd_state = DAPL_EVD_STATE_DEAD;
return;
}
@@ -484,7 +484,7 @@ dapl_evd_post_overflow_event(DAPL_EVD *
overflow_event = dapl_evd_get_event(overflow_evd_ptr);
if (!overflow_event) {
/* this is not good */
- overflow_evd_ptr->catastrophic_overflow = DAT_TRUE;
+ overflow_evd_ptr->catastrophic_overflow = TRUE;
overflow_evd_ptr->evd_state = DAPL_EVD_STATE_DEAD;
return;
}
Index: linux-kernel/dat-provider/dapl_sp_util.c
===================================================================
--- linux-kernel/dat-provider/dapl_sp_util.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_sp_util.c (working copy)
@@ -59,7 +59,7 @@
* pointer to sp info struct
*
*/
-DAPL_SP *dapl_sp_alloc(DAPL_IA * ia_ptr, DAT_BOOLEAN is_psp)
+DAPL_SP *dapl_sp_alloc(DAPL_IA * ia_ptr, boolean_t is_psp)
{
DAPL_SP *sp_ptr;
Index: linux-kernel/dat-provider/dapl_hash.c
===================================================================
--- linux-kernel/dat-provider/dapl_hash.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_hash.c (working copy)
@@ -153,25 +153,24 @@ dapl_hash_rehash(DAPL_HASH_ELEM * elemen
*
* Inputs:
* table, key and datum to be added
- * allow_dup - DAT_TRUE if dups are allowed
+ * allow_dup - TRUE if dups are allowed
* Outputs:
* report_dup - should you care to know
* Returns:
- * DAT_TRUE on success
+ * TRUE on success
*/
-static DAT_BOOLEAN
-dapl_hash_add(DAPL_HASH_TABLEP p_table,
- DAPL_HASH_KEY key,
- void *datum, DAT_BOOLEAN allow_dup, DAT_BOOLEAN * report_dup)
+static boolean_t
+dapl_hash_add(DAPL_HASH_TABLEP p_table, DAPL_HASH_KEY key, void *datum,
+ boolean_t allow_dup, boolean_t *report_dup)
{
void *olddatum;
DAPL_HASH_KEY hashValue, save_key = key;
DAPL_HASH_ELEM *found;
- DAT_BOOLEAN status = DAT_FALSE;
+ boolean_t status = FALSE;
unsigned int chain_len = 0;
if (report_dup) {
- (*report_dup) = DAT_FALSE;
+ (*report_dup) = FALSE;
}
if (NO_DATUM(datum)) {
@@ -181,7 +180,7 @@ dapl_hash_add(DAPL_HASH_TABLEP p_table,
dapl_dbg_log(DAPL_DBG_TYPE_ERR,
"dapl_hash_add () called with magic NO_DATA value (%p) "
"used as datum!\n", datum);
- return DAT_FALSE;
+ return FALSE;
}
DAPL_HASHLOOKUP(p_table, key, olddatum, found);
@@ -190,14 +189,14 @@ dapl_hash_add(DAPL_HASH_TABLEP p_table,
* key exists already
*/
if (report_dup) {
- *report_dup = DAT_TRUE;
+ *report_dup = TRUE;
}
if (!allow_dup) {
dapl_dbg_log(DAPL_DBG_TYPE_ERR,
"dapl_hash_add () called with duplicate key ("
F64x ")\n", key);
- return DAT_FALSE;
+ return FALSE;
}
}
@@ -211,7 +210,7 @@ dapl_hash_add(DAPL_HASH_TABLEP p_table,
p_table->table[hashValue].datum = datum;
p_table->table[hashValue].next_element = NULL;
p_table->num_entries++;
- status = DAT_TRUE;
+ status = TRUE;
} else {
DAPL_HASH_ELEM *newelement = (DAPL_HASH_ELEM *)
kmalloc(sizeof(DAPL_HASH_ELEM), GFP_ATOMIC);
@@ -231,10 +230,10 @@ dapl_hash_add(DAPL_HASH_TABLEP p_table,
}
lastelement->next_element = newelement;
p_table->num_entries++;
- status = DAT_TRUE;
+ status = TRUE;
} else {
/* allocation failed - should not happen */
- status = DAT_FALSE;
+ status = FALSE;
}
}
@@ -262,9 +261,9 @@ dapl_hash_add(DAPL_HASH_TABLEP p_table,
* Inputs:
* element, key to be deleted
* Returns:
- * DAT_TRUE on success
+ * TRUE on success
*/
-static DAT_BOOLEAN
+static boolean_t
dapl_hash_delete_element(DAPL_HASH_ELEM * element,
DAPL_HASH_KEY key, DAPL_HASH_DATA * p_datum)
{
@@ -309,7 +308,7 @@ dapl_hash_delete_element(DAPL_HASH_ELEM
}
}
- return (curelement != NULL ? DAT_TRUE : DAT_FALSE);
+ return (curelement != NULL ? TRUE : FALSE);
}
/*********************************************************************
@@ -405,7 +404,7 @@ dapl_hash_insert(DAPL_HASH_TABLE * p_tab
dat_status = DAT_SUCCESS;
spin_lock(&p_table->lock);
- if (!dapl_hash_add(p_table, key, data, DAT_FALSE, NULL)) {
+ if (!dapl_hash_add(p_table, key, data, FALSE, NULL)) {
dat_status =
DAT_ERROR(DAT_INSUFFICIENT_RESOURCES, DAT_RESOURCE_MEMORY);
}
Index: linux-kernel/dat-provider/dapl_sp_util.h
===================================================================
--- linux-kernel/dat-provider/dapl_sp_util.h (revision 2295)
+++ linux-kernel/dat-provider/dapl_sp_util.h (working copy)
@@ -37,7 +37,7 @@
#ifndef DAPL_PSP_UTIL_H
#define DAPL_PSP_UTIL_H
-DAPL_SP *dapl_sp_alloc(DAPL_IA * ia_ptr, DAT_BOOLEAN is_psp);
+DAPL_SP *dapl_sp_alloc(DAPL_IA * ia_ptr, boolean_t is_psp);
void dapl_sp_free_sp(DAPL_SP * sp_ptr);
Index: linux-kernel/dat-provider/dapl.h
===================================================================
--- linux-kernel/dat-provider/dapl.h (revision 2295)
+++ linux-kernel/dat-provider/dapl.h (working copy)
@@ -240,7 +240,7 @@ struct dapl_ia {
DAPL_HEADER header;
DAPL_HCA *hca_ptr;
DAPL_EVD *async_error_evd;
- DAT_BOOLEAN cleanup_async_error_evd;
+ boolean_t cleanup_async_error_evd;
DAPL_LLIST_ENTRY hca_ia_list_entry; /* HCAs list of IAs */
DAPL_LLIST_HEAD ep_list_head; /* EP queue */
@@ -269,7 +269,7 @@ struct dapl_evd
DAT_EVD_FLAGS evd_flags;
/* Derived from evd_flags; see dapls_evd_internal_create. */
- DAT_BOOLEAN evd_producer_locking_needed;
+ boolean_t evd_producer_locking_needed;
/* Every EVD has a CQ unless it is a SOFTWARE_EVENT only EVD */
ib_cq_handle_t ib_cq_handle;
@@ -280,7 +280,7 @@ struct dapl_evd
atomic_t evd_ref_count;
/* Set if there has been a catastrophic overflow */
- DAT_BOOLEAN catastrophic_overflow;
+ boolean_t catastrophic_overflow;
/* the actual events */
DAT_COUNT qlen;
@@ -395,7 +395,7 @@ struct dapl_sp {
DAT_EP_HANDLE ep_handle;
/* maintenence fields */
- DAT_BOOLEAN listening; /* PSP is registered & active */
+ boolean_t listening; /* PSP is registered & active */
ib_cm_srvc_handle_t cm_srvc_handle; /* Used by CM */
DAPL_LLIST_HEAD cr_list_head; /* CR pending queue */
DAT_COUNT cr_list_count; /* count of CRs on queue */
@@ -617,8 +617,8 @@ extern DAT_RETURN dapl_ep_post_rdma_writ
extern DAT_RETURN dapl_ep_get_status(DAT_EP_HANDLE, /* ep_handle */
DAT_EP_STATE *, /* ep_state */
- DAT_BOOLEAN *, /* in_dto_idle */
- DAT_BOOLEAN *); /* out_dto_idle */
+ boolean_t *, /* in_dto_idle */
+ boolean_t *); /* out_dto_idle */
extern DAT_RETURN dapl_ep_free(DAT_EP_HANDLE); /* ep_handle */
@@ -757,7 +757,7 @@ extern void dapl_llist_init_head(DAPL_LL
extern void dapl_llist_init_entry(DAPL_LLIST_ENTRY * entry);
-extern DAT_BOOLEAN dapl_llist_is_empty(DAPL_LLIST_HEAD * head);
+extern boolean_t dapl_llist_is_empty(DAPL_LLIST_HEAD * head);
extern void dapl_llist_add_head(DAPL_LLIST_HEAD * head,
DAPL_LLIST_ENTRY * entry, void *data);
Index: linux-kernel/dat-provider/dapl_psp_query.c
===================================================================
--- linux-kernel/dat-provider/dapl_psp_query.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_psp_query.c (working copy)
@@ -45,7 +45,7 @@ DAT_RETURN dapl_psp_query(DAT_PSP_HANDLE
DAT_RETURN status;
if (DAPL_BAD_HANDLE(psp_handle, DAPL_MAGIC_PSP) ||
- ((DAPL_SP *) psp_handle)->listening != DAT_TRUE) {
+ ((DAPL_SP *) psp_handle)->listening != TRUE) {
status =
DAT_ERROR(DAT_INVALID_HANDLE, DAT_INVALID_HANDLE_PSP);
goto bail;
Index: linux-kernel/dat-provider/dapl_llist.c
===================================================================
--- linux-kernel/dat-provider/dapl_llist.c (revision 2295)
+++ linux-kernel/dat-provider/dapl_llist.c (working copy)
@@ -80,7 +80,7 @@ void dapl_llist_init_entry(DAPL_LLIST_EN
*
* Purpose: returns TRUE if the linked list is empty
*/
-DAT_BOOLEAN dapl_llist_is_empty(DAPL_LLIST_HEAD * head)
+boolean_t dapl_llist_is_empty(DAPL_LLIST_HEAD * head)
{
return (*head == NULL);
}
Index: linux-kernel/dat/dictionary.c
===================================================================
--- linux-kernel/dat/dictionary.c (revision 2295)
+++ linux-kernel/dat/dictionary.c (working copy)
@@ -62,7 +62,7 @@ static DAT_RETURN
dat_dictionary_key_dup(const struct dat_provider_info *old_key,
struct dat_provider_info *new_key);
-static DAT_BOOLEAN
+static boolean_t
dat_dictionary_key_is_equal(const struct dat_provider_info *key_a,
const struct dat_provider_info *key_b);
@@ -270,7 +270,7 @@ DAT_RETURN dat_dictionary_search(DAT_DIC
for (cur_node = p_dictionary->head->next;
p_dictionary->tail != cur_node; cur_node = cur_node->next) {
- if (DAT_TRUE == dat_dictionary_key_is_equal(&cur_node->key,
+ if (TRUE == dat_dictionary_key_is_equal(&cur_node->key,
key)) {
if (NULL != p_data)
*p_data = cur_node->data;
@@ -335,7 +335,7 @@ DAT_RETURN dat_dictionary_remove(DAT_DIC
for (cur_node = p_dictionary->head->next;
p_dictionary->tail != cur_node; cur_node = cur_node->next) {
- if (DAT_TRUE == dat_dictionary_key_is_equal(&cur_node->key,
+ if (TRUE == dat_dictionary_key_is_equal(&cur_node->key,
key)) {
if (NULL != p_data)
*p_data = cur_node->data;
@@ -387,7 +387,7 @@ DAT_RETURN dat_dictionary_key_dup(const
* Function: dat_dictionary_key_is_equal
***********************************************************************/
-DAT_BOOLEAN dat_dictionary_key_is_equal(const struct dat_provider_info *key_a,
+boolean_t dat_dictionary_key_is_equal(const struct dat_provider_info *key_a,
const struct dat_provider_info *key_b)
{
BUG_ON(NULL == key_a);
@@ -398,8 +398,8 @@ DAT_BOOLEAN dat_dictionary_key_is_equal(
&& (key_a->dat_version_major == key_b->dat_version_major)
&& (key_a->dat_version_minor == key_b->dat_version_minor)
&& (key_a->is_thread_safe == key_b->is_thread_safe)) {
- return DAT_TRUE;
+ return TRUE;
} else {
- return DAT_FALSE;
+ return FALSE;
}
}
Index: linux-kernel/dat/core.c
===================================================================
--- linux-kernel/dat/core.c (revision 2295)
+++ linux-kernel/dat/core.c (working copy)
@@ -133,19 +133,19 @@ module_exit(dat_fini);
* of handling DAT API calls and false otherwise.
*/
-DAT_BOOLEAN dat_check_state(void)
+boolean_t dat_check_state(void)
{
- DAT_BOOLEAN status;
+ boolean_t status;
if ( (DAT_MODULE_STATE_UNINITIALIZED == g_state) ||
(DAT_MODULE_STATE_INITIALIZING == g_state) ) {
dat_init();
- status = DAT_TRUE;
+ status = TRUE;
} else if ( (DAT_MODULE_STATE_DEINITIALIZED == g_state) ||
(DAT_MODULE_STATE_DEINITIALIZING == g_state) ) {
- status = DAT_FALSE;
+ status = FALSE;
} else {
- status = DAT_TRUE;
+ status = TRUE;
}
return status;
Index: linux-kernel/dat/api.c
===================================================================
--- linux-kernel/dat/api.c (revision 2295)
+++ linux-kernel/dat/api.c (working copy)
@@ -580,7 +580,7 @@ DAT_RETURN dat_ia_openv(const DAT_NAME_P
DAT_EVD_HANDLE *async_event_handle,
DAT_IA_HANDLE *ia_handle,
u32 dat_major, u32 dat_minor,
- DAT_BOOLEAN thread_safety)
+ boolean_t thread_safety)
{
DAT_IA_OPEN_FUNC ia_open_func;
struct dat_provider_info info;
@@ -602,7 +602,7 @@ DAT_RETURN dat_ia_openv(const DAT_NAME_P
return DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG1);
}
- if (DAT_FALSE == dat_check_state()) {
+ if (FALSE == dat_check_state()) {
return DAT_ERROR(DAT_INVALID_STATE, 0);
}
@@ -642,7 +642,7 @@ DAT_RETURN dat_ia_close(DAT_IA_HANDLE ia
dat_dbg_print(DAT_DBG_CLASS_CONSUMER_API,
"%s(ia:%x, flags:%x)\n", __func__, ia_handle, flags);
- if (DAT_FALSE == dat_check_state()) {
+ if (FALSE == dat_check_state()) {
return DAT_ERROR(DAT_INVALID_STATE, 0);
}
@@ -739,7 +739,7 @@ DAT_RETURN dat_registry_add_provider(con
if (DAT_IS_BAD_POINTER(provider_info))
return DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG2);
- if (DAT_FALSE == dat_check_state())
+ if (FALSE == dat_check_state())
return DAT_ERROR(DAT_INVALID_STATE, 0);
return dat_dr_insert(provider_info, provider->ia_open_func);
@@ -761,7 +761,7 @@ DAT_RETURN dat_registry_remove_provider(
if (DAT_IS_BAD_POINTER(provider))
return DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG1);
- if (DAT_FALSE == dat_check_state())
+ if (FALSE == dat_check_state())
return DAT_ERROR(DAT_INVALID_STATE, 0);
return dat_dr_remove(provider_info);
@@ -785,7 +785,7 @@ DAT_RETURN dat_registry_list_providers(D
__func__, max_to_return, entries_returned,
dat_provider_list);
- if (DAT_FALSE == dat_check_state())
+ if (FALSE == dat_check_state())
return DAT_ERROR(DAT_INVALID_STATE, 0);
if ((DAT_IS_BAD_POINTER(entries_returned)))
Index: linux-kernel/dat/dat.h
===================================================================
--- linux-kernel/dat/dat.h (revision 2295)
+++ linux-kernel/dat/dat.h (working copy)
@@ -35,7 +35,7 @@
#define DAT_VERSION_MAJOR 1
#define DAT_VERSION_MINOR 2
-#define DAT_THREADSAFE DAT_FALSE
+#define DAT_THREADSAFE FALSE
/* unsigned longest native to compiler */
typedef unsigned long long DAT_UVERYLONG;
@@ -364,10 +364,12 @@ struct dat_named_attr {
const char *value;
};
-typedef enum dat_boolean {
- DAT_FALSE = 0,
- DAT_TRUE = 1
-} DAT_BOOLEAN;
+typedef enum {
+#undef FALSE
+ FALSE = 0,
+#undef TRUE
+ TRUE = 1
+} boolean_t;
typedef union dat_context {
DAT_PVOID as_ptr;
@@ -930,7 +932,7 @@ typedef enum dat_upcall_policy {
} DAT_UPCALL_POLICY;
typedef void (*DAT_UPCALL_FUNC) (DAT_PVOID, const struct dat_event *,
- DAT_BOOLEAN);
+ boolean_t);
struct dat_upcall_object {
DAT_PVOID instance_data;
@@ -950,7 +952,7 @@ struct dat_provider_info {
char ia_name[DAT_NAME_MAX_LENGTH];
u32 dat_version_major;
u32 dat_version_minor;
- DAT_BOOLEAN is_thread_safe;
+ boolean_t is_thread_safe;
};
struct dat_evd_param {
@@ -1033,8 +1035,8 @@ struct dat_ia_attr {
DAT_COUNT max_iov_segments_per_rdma_write;
DAT_COUNT max_rdma_read_in;
DAT_COUNT max_rdma_read_out;
- DAT_BOOLEAN max_rdma_read_per_ep_in_guaranteed;
- DAT_BOOLEAN max_rdma_read_per_ep_out_guaranteed;
+ boolean_t max_rdma_read_per_ep_in_guaranteed;
+ boolean_t max_rdma_read_per_ep_out_guaranteed;
DAT_COUNT num_transport_attr;
struct dat_named_attr *transport_attr;
DAT_COUNT num_vendor_attr;
@@ -1079,21 +1081,21 @@ struct dat_provider_attr {
DAT_IOV_OWNERSHIP iov_ownership_on_return;
DAT_QOS dat_qos_supported;
DAT_COMPLETION_FLAGS completion_flags_supported;
- DAT_BOOLEAN is_thread_safe;
+ boolean_t is_thread_safe;
DAT_COUNT max_private_data_size;
- DAT_BOOLEAN supports_multipath;
+ boolean_t supports_multipath;
DAT_EP_CREATOR_FOR_PSP ep_creator;
DAT_UPCALL_POLICY upcall_policy;
u32 optimal_buffer_alignment;
- const DAT_BOOLEAN evd_stream_merging_supported[6][6];
- DAT_BOOLEAN srq_supported;
+ const boolean_t evd_stream_merging_supported[6][6];
+ boolean_t srq_supported;
DAT_COUNT srq_watermarks_supported;
- DAT_BOOLEAN srq_ep_pz_difference_supported;
+ boolean_t srq_ep_pz_difference_supported;
DAT_COUNT srq_info_supported;
DAT_COUNT ep_recv_info_supported;
- DAT_BOOLEAN lmr_sync_req;
- DAT_BOOLEAN dto_async_return_guaranteed;
- DAT_BOOLEAN rdma_write_for_rdma_read_req;
+ boolean_t lmr_sync_req;
+ boolean_t dto_async_return_guaranteed;
+ boolean_t rdma_write_for_rdma_read_req;
DAT_COUNT num_provider_specific_attr;
struct dat_named_attr *provider_specific_attr;
};
@@ -1110,7 +1112,7 @@ typedef DAT_RETURN (*DAT_IA_OPEN_FUNC) (
typedef DAT_RETURN (*DAT_IA_OPENV_FUNC) (
const DAT_NAME_PTR, DAT_COUNT, DAT_EVD_HANDLE *, DAT_IA_HANDLE *,
- u32, u32, DAT_BOOLEAN);
+ u32, u32, boolean_t);
typedef DAT_RETURN (*DAT_IA_CLOSE_FUNC) (DAT_IA_HANDLE, DAT_CLOSE_FLAGS);
@@ -1185,7 +1187,7 @@ typedef DAT_RETURN (*DAT_EP_POST_RDMA_WR
const struct dat_rmr_triplet *, DAT_COMPLETION_FLAGS);
typedef DAT_RETURN (*DAT_EP_GET_STATUS_FUNC) (
- DAT_EP_HANDLE, DAT_EP_STATE *, DAT_BOOLEAN *, DAT_BOOLEAN *);
+ DAT_EP_HANDLE, DAT_EP_STATE *, boolean_t *, boolean_t *);
typedef DAT_RETURN (*DAT_EP_FREE_FUNC) (DAT_EP_HANDLE);
@@ -1381,7 +1383,7 @@ extern DAT_RETURN dat_registry_remove_pr
*/
extern DAT_RETURN dat_ia_openv(const DAT_NAME_PTR, DAT_COUNT,
DAT_EVD_HANDLE *, DAT_IA_HANDLE *,
- u32, u32, DAT_BOOLEAN);
+ u32, u32, boolean_t);
#define dat_ia_open(name, qlen, async_evd, ia) \
dat_ia_openv((name), (qlen), (async_evd), (ia), \
@@ -1581,8 +1583,8 @@ static inline DAT_RETURN dat_ep_free(DAT
static inline DAT_RETURN dat_ep_get_status(DAT_EP_HANDLE ep,
DAT_EP_STATE * state,
- DAT_BOOLEAN * recv_idle,
- DAT_BOOLEAN * req_idle)
+ boolean_t *recv_idle,
+ boolean_t *req_idle)
{
return DAT_CALL_PROVIDER_FUNC(
ep_get_status_func, ep, state, recv_idle, req_idle);
Index: linux-kernel/dat/core.h
===================================================================
--- linux-kernel/dat/core.h (revision 2295)
+++ linux-kernel/dat/core.h (working copy)
@@ -65,6 +65,6 @@ typedef int DAT_DBG_CLASS;
extern void dat_dbg_print(DAT_DBG_CLASS val, const char *fmt, ...);
-extern DAT_BOOLEAN dat_check_state(void);
+extern boolean_t dat_check_state(void);
#endif /* CORE_H */
More information about the general
mailing list