From 33c3b1c89ad5155ec1073825f76b24f528afbb6c Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 10 Mar 2020 23:42:42 -0500 Subject: [PATCH] Convert epicsShareAPI to epicsStdCall in modules/ca --- modules/ca/src/client/access.cpp | 72 +++++------ modules/ca/src/client/addrList.h | 8 +- modules/ca/src/client/ca_client_context.cpp | 4 +- modules/ca/src/client/cacIO.h | 2 +- modules/ca/src/client/cadef.h | 134 ++++++++++---------- modules/ca/src/client/caerr.h | 2 +- modules/ca/src/client/iocinf.cpp | 8 +- modules/ca/src/client/oldAccess.h | 74 +++++------ modules/ca/src/client/oldChannelNotify.cpp | 42 +++--- modules/ca/src/client/syncgrp.cpp | 16 +-- modules/ca/src/client/test_event.cpp | 4 +- modules/ca/src/client/udpiiu.cpp | 4 +- modules/ca/src/client/udpiiu.h | 4 +- 13 files changed, 187 insertions(+), 187 deletions(-) diff --git a/modules/ca/src/client/access.cpp b/modules/ca/src/client/access.cpp index 42e25686d..a290805f7 100644 --- a/modules/ca/src/client/access.cpp +++ b/modules/ca/src/client/access.cpp @@ -163,13 +163,13 @@ int fetchClientContext ( ca_client_context **ppcac ) * ca_task_initialize () */ // extern "C" -int epicsShareAPI ca_task_initialize ( void ) +int epicsStdCall ca_task_initialize ( void ) { return ca_context_create ( ca_disable_preemptive_callback ); } // extern "C" -int epicsShareAPI ca_context_create ( +int epicsStdCall ca_context_create ( ca_preemptive_callback_select premptiveCallbackSelect ) { ca_client_context *pcac; @@ -209,7 +209,7 @@ int epicsShareAPI ca_context_create ( // defunct // // extern "C" -int epicsShareAPI ca_modify_host_name ( const char * ) +int epicsStdCall ca_modify_host_name ( const char * ) { return ECA_NORMAL; } @@ -220,7 +220,7 @@ int epicsShareAPI ca_modify_host_name ( const char * ) // defunct // // extern "C" -int epicsShareAPI ca_modify_user_name ( const char * ) +int epicsStdCall ca_modify_user_name ( const char * ) { return ECA_NORMAL; } @@ -229,7 +229,7 @@ int epicsShareAPI ca_modify_user_name ( const char * ) // ca_context_destroy () // // extern "C" -void epicsShareAPI ca_context_destroy () +void epicsStdCall ca_context_destroy () { ca_client_context *pcac; @@ -248,7 +248,7 @@ void epicsShareAPI ca_context_destroy () * releases all resources alloc to a channel access client */ // extern "C" -int epicsShareAPI ca_task_exit () +int epicsStdCall ca_task_exit () { ca_context_destroy (); return ECA_NORMAL; @@ -261,7 +261,7 @@ int epicsShareAPI ca_task_exit () * backwards compatible entry point to ca_search_and_connect() */ // extern "C" -int epicsShareAPI ca_build_and_connect ( const char *name_str, chtype get_type, +int epicsStdCall ca_build_and_connect ( const char *name_str, chtype get_type, arrayElementCount get_count, chid * chan, void *pvalue, caCh *conn_func, void *puser ) { @@ -276,7 +276,7 @@ int epicsShareAPI ca_build_and_connect ( const char *name_str, chtype get_type, * ca_search_and_connect() */ // extern "C" -int epicsShareAPI ca_search_and_connect ( +int epicsStdCall ca_search_and_connect ( const char * name_str, chid * chanptr, caCh * conn_func, void * puser ) { @@ -285,7 +285,7 @@ int epicsShareAPI ca_search_and_connect ( } // extern "C" -int epicsShareAPI ca_create_channel ( +int epicsStdCall ca_create_channel ( const char * name_str, caCh * conn_func, void * puser, capri priority, chid * chanptr ) { @@ -360,7 +360,7 @@ int epicsShareAPI ca_create_channel ( * its context */ // extern "C" -int epicsShareAPI ca_clear_channel ( chid pChan ) +int epicsStdCall ca_clear_channel ( chid pChan ) { ca_client_context & cac = pChan->getClientCtx (); { @@ -399,7 +399,7 @@ int epicsShareAPI ca_clear_channel ( chid pChan ) * Specify an event subroutine to be run for asynch exceptions */ // extern "C" -int epicsShareAPI ca_add_exception_event ( caExceptionHandler *pfunc, void *arg ) +int epicsStdCall ca_add_exception_event ( caExceptionHandler *pfunc, void *arg ) { ca_client_context *pcac; int caStatus = fetchClientContext ( &pcac ); @@ -415,7 +415,7 @@ int epicsShareAPI ca_add_exception_event ( caExceptionHandler *pfunc, void *arg /* * ca_add_masked_array_event */ -int epicsShareAPI ca_add_masked_array_event ( +int epicsStdCall ca_add_masked_array_event ( chtype type, arrayElementCount count, chid pChan, caEventCallBackFunc *pCallBack, void *pCallBackArg, ca_real, ca_real, ca_real, @@ -428,19 +428,19 @@ int epicsShareAPI ca_add_masked_array_event ( /* * ca_clear_event () */ -int epicsShareAPI ca_clear_event ( evid pMon ) +int epicsStdCall ca_clear_event ( evid pMon ) { return ca_clear_subscription ( pMon ); } // extern "C" -chid epicsShareAPI ca_evid_to_chid ( evid pMon ) +chid epicsStdCall ca_evid_to_chid ( evid pMon ) { return & pMon->channel (); } // extern "C" -int epicsShareAPI ca_pend ( ca_real timeout, int early ) +int epicsStdCall ca_pend ( ca_real timeout, int early ) { if ( early ) { return ca_pend_io ( timeout ); @@ -454,7 +454,7 @@ int epicsShareAPI ca_pend ( ca_real timeout, int early ) * ca_pend_event () */ // extern "C" -int epicsShareAPI ca_pend_event ( ca_real timeout ) +int epicsStdCall ca_pend_event ( ca_real timeout ) { ca_client_context *pcac; int status = fetchClientContext ( &pcac ); @@ -481,7 +481,7 @@ int epicsShareAPI ca_pend_event ( ca_real timeout ) * ca_pend_io () */ // extern "C" -int epicsShareAPI ca_pend_io ( ca_real timeout ) +int epicsStdCall ca_pend_io ( ca_real timeout ) { ca_client_context *pcac; int status = fetchClientContext ( &pcac ); @@ -506,7 +506,7 @@ int epicsShareAPI ca_pend_io ( ca_real timeout ) /* * ca_flush_io () */ -int epicsShareAPI ca_flush_io () +int epicsStdCall ca_flush_io () { ca_client_context * pcac; int caStatus = fetchClientContext (&pcac); @@ -523,7 +523,7 @@ int epicsShareAPI ca_flush_io () /* * CA_TEST_IO () */ -int epicsShareAPI ca_test_io () +int epicsStdCall ca_test_io () { ca_client_context *pcac; int caStatus = fetchClientContext ( &pcac ); @@ -543,7 +543,7 @@ int epicsShareAPI ca_test_io () * CA_SIGNAL() */ // extern "C" -void epicsShareAPI ca_signal ( long ca_status, const char *message ) +void epicsStdCall ca_signal ( long ca_status, const char *message ) { ca_signal_with_file_and_lineno ( ca_status, message, NULL, 0 ); } @@ -558,7 +558,7 @@ void epicsShareAPI ca_signal ( long ca_status, const char *message ) * (if they call this routine again). */ // extern "C" -const char * epicsShareAPI ca_message ( long ca_status ) +const char * epicsStdCall ca_message ( long ca_status ) { unsigned msgNo = CA_EXTRACT_MSG_NO ( ca_status ); @@ -574,7 +574,7 @@ const char * epicsShareAPI ca_message ( long ca_status ) * ca_signal_with_file_and_lineno() */ // extern "C" -void epicsShareAPI ca_signal_with_file_and_lineno ( long ca_status, +void epicsStdCall ca_signal_with_file_and_lineno ( long ca_status, const char *message, const char *pfilenm, int lineno ) { ca_signal_formated ( ca_status, pfilenm, lineno, message ); @@ -584,7 +584,7 @@ void epicsShareAPI ca_signal_with_file_and_lineno ( long ca_status, * ca_signal_formated() */ // extern "C" -void epicsShareAPI ca_signal_formated ( long ca_status, const char *pfilenm, +void epicsStdCall ca_signal_formated ( long ca_status, const char *pfilenm, int lineno, const char *pFormat, ... ) { ca_client_context *pcac; @@ -620,7 +620,7 @@ void epicsShareAPI ca_signal_formated ( long ca_status, const char *pfilenm, * */ // extern "C" -int epicsShareAPI ca_add_fd_registration ( CAFDHANDLER * func, void * arg ) +int epicsStdCall ca_add_fd_registration ( CAFDHANDLER * func, void * arg ) { ca_client_context *pcac; int caStatus = fetchClientContext ( &pcac ); @@ -638,7 +638,7 @@ int epicsShareAPI ca_add_fd_registration ( CAFDHANDLER * func, void * arg ) * function that returns the CA version string */ // extern "C" -const char * epicsShareAPI ca_version () +const char * epicsStdCall ca_version () { return CA_VERSION_STRING ( CA_MINOR_PROTOCOL_REVISION ); } @@ -647,7 +647,7 @@ const char * epicsShareAPI ca_version () * ca_replace_printf_handler () */ // extern "C" -int epicsShareAPI ca_replace_printf_handler ( caPrintfFunc *ca_printf_func ) +int epicsStdCall ca_replace_printf_handler ( caPrintfFunc *ca_printf_func ) { ca_client_context *pcac; int caStatus = fetchClientContext (&pcac); @@ -667,7 +667,7 @@ int epicsShareAPI ca_replace_printf_handler ( caPrintfFunc *ca_printf_func ) * (for testing purposes only) */ // extern "C" -unsigned epicsShareAPI ca_get_ioc_connection_count () +unsigned epicsStdCall ca_get_ioc_connection_count () { ca_client_context * pcac; int caStatus = fetchClientContext ( & pcac ); @@ -678,7 +678,7 @@ unsigned epicsShareAPI ca_get_ioc_connection_count () return pcac->circuitCount (); } -unsigned epicsShareAPI ca_beacon_anomaly_count () +unsigned epicsStdCall ca_beacon_anomaly_count () { ca_client_context * pcac; int caStatus = fetchClientContext ( & pcac ); @@ -690,7 +690,7 @@ unsigned epicsShareAPI ca_beacon_anomaly_count () } // extern "C" -int epicsShareAPI ca_channel_status ( epicsThreadId /* tid */ ) +int epicsStdCall ca_channel_status ( epicsThreadId /* tid */ ) { ::printf ("The R3.14 EPICS OS abstraction API does not allow peeking at thread private storage of another thread.\n"); ::printf ("Please call \"ca_client_status ( unsigned level )\" from the subsystem specific diagnostic code.\n"); @@ -698,7 +698,7 @@ int epicsShareAPI ca_channel_status ( epicsThreadId /* tid */ ) } // extern "C" -int epicsShareAPI ca_client_status ( unsigned level ) +int epicsStdCall ca_client_status ( unsigned level ) { ca_client_context *pcac; int caStatus = fetchClientContext ( &pcac ); @@ -710,7 +710,7 @@ int epicsShareAPI ca_client_status ( unsigned level ) return ECA_NORMAL; } -int epicsShareAPI ca_context_status ( ca_client_context * pcac, unsigned level ) +int epicsStdCall ca_context_status ( ca_client_context * pcac, unsigned level ) { pcac->show ( level ); return ECA_NORMAL; @@ -723,7 +723,7 @@ int epicsShareAPI ca_context_status ( ca_client_context * pcac, unsigned level ) * by another thread */ // extern "C" -struct ca_client_context * epicsShareAPI ca_current_context () +struct ca_client_context * epicsStdCall ca_current_context () { struct ca_client_context *pCtx; if ( caClientContextId ) { @@ -743,7 +743,7 @@ struct ca_client_context * epicsShareAPI ca_current_context () * by another thread */ // extern "C" -int epicsShareAPI ca_attach_context ( struct ca_client_context * pCtx ) +int epicsStdCall ca_attach_context ( struct ca_client_context * pCtx ) { ca_client_context *pcac = (ca_client_context *) epicsThreadPrivateGet ( caClientContextId ); if ( pcac && pCtx != 0 ) { @@ -756,14 +756,14 @@ int epicsShareAPI ca_attach_context ( struct ca_client_context * pCtx ) return ECA_NORMAL; } -void epicsShareAPI ca_detach_context () +void epicsStdCall ca_detach_context () { if ( caClientContextId ) { epicsThreadPrivateSet ( caClientContextId, 0 ); } } -int epicsShareAPI ca_preemtive_callback_is_enabled () +int epicsStdCall ca_preemtive_callback_is_enabled () { ca_client_context *pcac = (ca_client_context *) epicsThreadPrivateGet ( caClientContextId ); if ( ! pcac ) { @@ -774,7 +774,7 @@ int epicsShareAPI ca_preemtive_callback_is_enabled () // extern "C" -void epicsShareAPI ca_self_test () +void epicsStdCall ca_self_test () { ca_client_context *pcac = (ca_client_context *) epicsThreadPrivateGet ( caClientContextId ); if ( ! pcac ) { diff --git a/modules/ca/src/client/addrList.h b/modules/ca/src/client/addrList.h index c59f8e7af..bc0fd9d7e 100644 --- a/modules/ca/src/client/addrList.h +++ b/modules/ca/src/client/addrList.h @@ -19,17 +19,17 @@ extern "C" { #endif -LIBCA_API void epicsShareAPI configureChannelAccessAddressList +LIBCA_API void epicsStdCall configureChannelAccessAddressList ( struct ELLLIST *pList, SOCKET sock, unsigned short port ); -LIBCA_API int epicsShareAPI addAddrToChannelAccessAddressList +LIBCA_API int epicsStdCall addAddrToChannelAccessAddressList ( struct ELLLIST *pList, const ENV_PARAM *pEnv, unsigned short port, int ignoreNonDefaultPort ); -LIBCA_API void epicsShareAPI printChannelAccessAddressList +LIBCA_API void epicsStdCall printChannelAccessAddressList ( const struct ELLLIST *pList ); -LIBCA_API void epicsShareAPI removeDuplicateAddresses +LIBCA_API void epicsStdCall removeDuplicateAddresses ( struct ELLLIST *pDestList, ELLLIST *pSrcList, int silent); #ifdef __cplusplus diff --git a/modules/ca/src/client/ca_client_context.cpp b/modules/ca/src/client/ca_client_context.cpp index 6e5bbb88e..f9b02e192 100644 --- a/modules/ca/src/client/ca_client_context.cpp +++ b/modules/ca/src/client/ca_client_context.cpp @@ -735,12 +735,12 @@ void ca_client_context::installDefaultService ( cacService & service ) ca_client_context::pDefaultService = & service; } -void epicsShareAPI caInstallDefaultService ( cacService & service ) +void epicsStdCall caInstallDefaultService ( cacService & service ) { ca_client_context::installDefaultService ( service ); } -LIBCA_API int epicsShareAPI ca_clear_subscription ( evid pMon ) +LIBCA_API int epicsStdCall ca_clear_subscription ( evid pMon ) { oldChannelNotify & chan = pMon->channel (); ca_client_context & cac = chan.getClientCtx (); diff --git a/modules/ca/src/client/cacIO.h b/modules/ca/src/client/cacIO.h index 640b9a3c1..699626a54 100644 --- a/modules/ca/src/client/cacIO.h +++ b/modules/ca/src/client/cacIO.h @@ -316,7 +316,7 @@ public: cacContextNotify & ) = 0; }; -LIBCA_API void epicsShareAPI caInstallDefaultService ( cacService & service ); +LIBCA_API void epicsStdCall caInstallDefaultService ( cacService & service ); LIBCA_API extern epicsThreadPrivateId caClientCallbackThreadId; diff --git a/modules/ca/src/client/cadef.h b/modules/ca/src/client/cadef.h index afa81f927..32cef0070 100644 --- a/modules/ca/src/client/cadef.h +++ b/modules/ca/src/client/cadef.h @@ -91,7 +91,7 @@ typedef struct event_handler_args { } evargs; typedef void caEventCallBackFunc (struct event_handler_args); -LIBCA_API void epicsShareAPI ca_test_event +LIBCA_API void epicsStdCall ca_test_event ( struct event_handler_args ); @@ -147,13 +147,13 @@ typedef unsigned CA_SYNC_GID; #define TYPENOTCONN (-1) /* the channel's native type when disconnected */ -LIBCA_API short epicsShareAPI ca_field_type (chid chan); -LIBCA_API unsigned long epicsShareAPI ca_element_count (chid chan); -LIBCA_API const char * epicsShareAPI ca_name (chid chan); -LIBCA_API void epicsShareAPI ca_set_puser (chid chan, void *puser); -LIBCA_API void * epicsShareAPI ca_puser (chid chan); -LIBCA_API unsigned epicsShareAPI ca_read_access (chid chan); -LIBCA_API unsigned epicsShareAPI ca_write_access (chid chan); +LIBCA_API short epicsStdCall ca_field_type (chid chan); +LIBCA_API unsigned long epicsStdCall ca_element_count (chid chan); +LIBCA_API const char * epicsStdCall ca_name (chid chan); +LIBCA_API void epicsStdCall ca_set_puser (chid chan, void *puser); +LIBCA_API void * epicsStdCall ca_puser (chid chan); +LIBCA_API unsigned epicsStdCall ca_read_access (chid chan); +LIBCA_API unsigned epicsStdCall ca_write_access (chid chan); /* * cs_ - `channel state' @@ -164,27 +164,27 @@ LIBCA_API unsigned epicsShareAPI ca_write_access (chid chan); * cs_closed channel deleted by user */ enum channel_state {cs_never_conn, cs_prev_conn, cs_conn, cs_closed}; -LIBCA_API enum channel_state epicsShareAPI ca_state (chid chan); +LIBCA_API enum channel_state epicsStdCall ca_state (chid chan); /************************************************************************/ /* Perform Library Initialization */ /* */ /* Must be called once before calling any of the other routines */ /************************************************************************/ -LIBCA_API int epicsShareAPI ca_task_initialize (void); +LIBCA_API int epicsStdCall ca_task_initialize (void); enum ca_preemptive_callback_select { ca_disable_preemptive_callback, ca_enable_preemptive_callback }; -LIBCA_API int epicsShareAPI +LIBCA_API int epicsStdCall ca_context_create (enum ca_preemptive_callback_select select); -LIBCA_API void epicsShareAPI ca_detach_context (); +LIBCA_API void epicsStdCall ca_detach_context (); /************************************************************************/ /* Remove CA facility from your task */ /* */ /* Normally called automatically at task exit */ /************************************************************************/ -LIBCA_API int epicsShareAPI ca_task_exit (void); -LIBCA_API void epicsShareAPI ca_context_destroy (void); +LIBCA_API int epicsStdCall ca_task_exit (void); +LIBCA_API void epicsStdCall ca_context_destroy (void); typedef unsigned capri; #define CA_PRIORITY_MAX 99 @@ -207,7 +207,7 @@ typedef unsigned capri; * priority R priority level in the server 0 - 100 * pChanID RW channel id written here */ -LIBCA_API int epicsShareAPI ca_create_channel +LIBCA_API int epicsStdCall ca_create_channel ( const char *pChanName, caCh *pConnStateCallback, @@ -222,7 +222,7 @@ LIBCA_API int epicsShareAPI ca_create_channel * chan R channel identifier * pfunc R address of connection call-back function */ -LIBCA_API int epicsShareAPI ca_change_connection_event +LIBCA_API int epicsStdCall ca_change_connection_event ( chid chan, caCh * pfunc @@ -234,7 +234,7 @@ LIBCA_API int epicsShareAPI ca_change_connection_event * chan R channel identifier * pfunc R address of access rights call-back function */ -LIBCA_API int epicsShareAPI ca_replace_access_rights_event ( +LIBCA_API int epicsStdCall ca_replace_access_rights_event ( chid chan, caArh *pfunc ); @@ -249,7 +249,7 @@ LIBCA_API int epicsShareAPI ca_replace_access_rights_event ( * call-back function */ typedef void caExceptionHandler (struct exception_handler_args); -LIBCA_API int epicsShareAPI ca_add_exception_event +LIBCA_API int epicsStdCall ca_add_exception_event ( caExceptionHandler *pfunc, void *pArg @@ -261,7 +261,7 @@ LIBCA_API int epicsShareAPI ca_add_exception_event * * chanId R channel ID */ -LIBCA_API int epicsShareAPI ca_clear_channel +LIBCA_API int epicsStdCall ca_clear_channel ( chid chanId ); @@ -309,7 +309,7 @@ ca_array_put(DBR_FLOAT, 1u, chan, (const dbr_float_t *) pValue) * chan R channel identifier * pValue R new channel value copied from this location */ -LIBCA_API int epicsShareAPI ca_array_put +LIBCA_API int epicsStdCall ca_array_put ( chtype type, unsigned long count, @@ -334,7 +334,7 @@ LIBCA_API int epicsShareAPI ca_array_put * pFunc R pointer to call-back function * pArg R copy of this pointer passed to pFunc */ -LIBCA_API int epicsShareAPI ca_array_put_callback +LIBCA_API int epicsStdCall ca_array_put_callback ( chtype type, unsigned long count, @@ -391,7 +391,7 @@ ca_array_get(DBR_FLOAT, 1u, chan, (dbr_float_t *)(pValue)) * chan R channel identifier * pValue W channel value copied to this location */ -LIBCA_API int epicsShareAPI ca_array_get +LIBCA_API int epicsStdCall ca_array_get ( chtype type, unsigned long count, @@ -450,7 +450,7 @@ ca_array_get_callback (type, 1u, chan, pFunc, pArg) * pFunc R pointer to call-back function * pArg R copy of this pointer passed to pFunc */ -LIBCA_API int epicsShareAPI ca_array_get_callback +LIBCA_API int epicsStdCall ca_array_get_callback ( chtype type, unsigned long count, @@ -480,7 +480,7 @@ LIBCA_API int epicsShareAPI ca_array_get_callback * pArg R copy of this pointer passed to pFunc * pEventID W event id written at specified address */ -LIBCA_API int epicsShareAPI ca_create_subscription +LIBCA_API int epicsStdCall ca_create_subscription ( chtype type, unsigned long count, @@ -501,12 +501,12 @@ LIBCA_API int epicsShareAPI ca_create_subscription * * eventID R event id */ -LIBCA_API int epicsShareAPI ca_clear_subscription +LIBCA_API int epicsStdCall ca_clear_subscription ( evid eventID ); -LIBCA_API chid epicsShareAPI ca_evid_to_chid ( evid id ); +LIBCA_API chid epicsStdCall ca_evid_to_chid ( evid id ); /************************************************************************/ @@ -560,7 +560,7 @@ LIBCA_API chid epicsShareAPI ca_evid_to_chid ( evid id ); * * timeOut R wait for this delay in seconds */ -LIBCA_API int epicsShareAPI ca_pend_event (ca_real timeOut); +LIBCA_API int epicsStdCall ca_pend_event (ca_real timeOut); #define ca_poll() ca_pend_event(1e-12) /* @@ -570,10 +570,10 @@ LIBCA_API int epicsShareAPI ca_pend_event (ca_real timeOut); * if all get requests (or search requests with null * connection handler pointer have completed) */ -LIBCA_API int epicsShareAPI ca_pend_io (ca_real timeOut); +LIBCA_API int epicsStdCall ca_pend_io (ca_real timeOut); /* calls ca_pend_io() if early is true otherwise ca_pend_event() is called */ -LIBCA_API int epicsShareAPI ca_pend (ca_real timeout, int early); +LIBCA_API int epicsStdCall ca_pend (ca_real timeout, int early); /* * ca_test_io() @@ -581,7 +581,7 @@ LIBCA_API int epicsShareAPI ca_pend (ca_real timeout, int early); * returns TRUE when get requests (or search requests with null * connection handler pointer) are outstanding */ -LIBCA_API int epicsShareAPI ca_test_io (void); +LIBCA_API int epicsStdCall ca_test_io (void); /************************************************************************/ /* Send out all outstanding messages in the send queue */ @@ -589,7 +589,7 @@ LIBCA_API int epicsShareAPI ca_test_io (void); /* * ca_flush_io() */ -LIBCA_API int epicsShareAPI ca_flush_io (void); +LIBCA_API int epicsStdCall ca_flush_io (void); /* @@ -598,7 +598,7 @@ LIBCA_API int epicsShareAPI ca_flush_io (void); * errorCode R status returned from channel access function * pCtxStr R context string included with error print out */ -LIBCA_API void epicsShareAPI ca_signal +LIBCA_API void epicsStdCall ca_signal ( long errorCode, const char *pCtxStr @@ -612,7 +612,7 @@ LIBCA_API void epicsShareAPI ca_signal * lineNo R line number included with error print out * */ -LIBCA_API void epicsShareAPI ca_signal_with_file_and_lineno +LIBCA_API void epicsStdCall ca_signal_with_file_and_lineno ( long errorCode, const char *pCtxStr, @@ -628,7 +628,7 @@ LIBCA_API void epicsShareAPI ca_signal_with_file_and_lineno * pFormat R printf dtyle format string (and optional arguments) * */ -LIBCA_API void epicsShareAPI ca_signal_formated (long ca_status, const char *pfilenm, +LIBCA_API void epicsStdCall ca_signal_formated (long ca_status, const char *pfilenm, int lineno, const char *pFormat, ...); /* @@ -638,9 +638,9 @@ LIBCA_API void epicsShareAPI ca_signal_formated (long ca_status, const char *pfi * * !!!! this function is _not_ thread safe !!!! */ -LIBCA_API const char * epicsShareAPI ca_host_name (chid channel); +LIBCA_API const char * epicsStdCall ca_host_name (chid channel); /* thread safe version */ -LIBCA_API unsigned epicsShareAPI ca_get_host_name ( chid pChan, +LIBCA_API unsigned epicsStdCall ca_get_host_name ( chid pChan, char *pBuf, unsigned bufLength ); /* @@ -663,7 +663,7 @@ typedef void CAFDHANDLER (void *parg, int fd, int opened); * when an fd is created or deleted * pArg R argument passed to above function */ -LIBCA_API int epicsShareAPI ca_add_fd_registration +LIBCA_API int epicsStdCall ca_add_fd_registration ( CAFDHANDLER *pHandler, void *pArg @@ -687,7 +687,7 @@ LIBCA_API int epicsShareAPI ca_add_fd_registration * * pgid W pointer to sync group id that will be written */ -LIBCA_API int epicsShareAPI ca_sg_create (CA_SYNC_GID * pgid); +LIBCA_API int epicsStdCall ca_sg_create (CA_SYNC_GID * pgid); /* * ca_sg_delete() @@ -696,7 +696,7 @@ LIBCA_API int epicsShareAPI ca_sg_create (CA_SYNC_GID * pgid); * * gid R sync group id */ -LIBCA_API int epicsShareAPI ca_sg_delete (const CA_SYNC_GID gid); +LIBCA_API int epicsStdCall ca_sg_delete (const CA_SYNC_GID gid); /* * ca_sg_block() @@ -707,7 +707,7 @@ LIBCA_API int epicsShareAPI ca_sg_delete (const CA_SYNC_GID gid); * timeout R wait for this duration prior to timing out * and returning ECA_TIMEOUT */ -LIBCA_API int epicsShareAPI ca_sg_block (const CA_SYNC_GID gid, ca_real timeout); +LIBCA_API int epicsStdCall ca_sg_block (const CA_SYNC_GID gid, ca_real timeout); /* * ca_sg_test() @@ -718,14 +718,14 @@ LIBCA_API int epicsShareAPI ca_sg_block (const CA_SYNC_GID gid, ca_real timeout) * * returns one of ECA_BADSYNCGRP, ECA_IOINPROGRESS, ECA_IODONE */ -LIBCA_API int epicsShareAPI ca_sg_test (const CA_SYNC_GID gid); +LIBCA_API int epicsStdCall ca_sg_test (const CA_SYNC_GID gid); /* * ca_sg_reset * * gid R sync group id */ -LIBCA_API int epicsShareAPI ca_sg_reset(const CA_SYNC_GID gid); +LIBCA_API int epicsStdCall ca_sg_reset(const CA_SYNC_GID gid); /* * ca_sg_array_get() @@ -739,7 +739,7 @@ LIBCA_API int epicsShareAPI ca_sg_reset(const CA_SYNC_GID gid); * chan R channel identifier * pValue W channel value copied to this location */ -LIBCA_API int epicsShareAPI ca_sg_array_get +LIBCA_API int epicsStdCall ca_sg_array_get ( const CA_SYNC_GID gid, chtype type, @@ -763,7 +763,7 @@ ca_sg_array_get (gid, type, 1u, chan, pValue) * chan R channel identifier * pValue R new channel value copied from this location */ -LIBCA_API int epicsShareAPI ca_sg_array_put +LIBCA_API int epicsStdCall ca_sg_array_put ( const CA_SYNC_GID gid, chtype type, @@ -782,9 +782,9 @@ ca_sg_array_put (gid, type, 1u, chan, pValue) * * gid R sync group id */ -LIBCA_API int epicsShareAPI ca_sg_stat (CA_SYNC_GID gid); +LIBCA_API int epicsStdCall ca_sg_stat (CA_SYNC_GID gid); -LIBCA_API void epicsShareAPI ca_dump_dbr (chtype type, unsigned count, const void * pbuffer); +LIBCA_API void epicsStdCall ca_dump_dbr (chtype type, unsigned count, const void * pbuffer); /* @@ -797,14 +797,14 @@ LIBCA_API void epicsShareAPI ca_dump_dbr (chtype type, unsigned count, const voi * * (returns true or false) */ -LIBCA_API int epicsShareAPI ca_v42_ok (chid chan); +LIBCA_API int epicsStdCall ca_v42_ok (chid chan); /* * ca_version() * * returns the CA version string */ -LIBCA_API const char * epicsShareAPI ca_version (void); +LIBCA_API const char * epicsStdCall ca_version (void); /* * ca_replace_printf_handler () @@ -819,7 +819,7 @@ LIBCA_API const char * epicsShareAPI ca_version (void); */ #ifndef CA_DONT_INCLUDE_STDARGH typedef int caPrintfFunc (const char *pformat, va_list args); -LIBCA_API int epicsShareAPI ca_replace_printf_handler ( +LIBCA_API int epicsStdCall ca_replace_printf_handler ( caPrintfFunc *ca_printf_func ); #endif /*CA_DONT_INCLUDE_STDARGH*/ @@ -827,24 +827,24 @@ LIBCA_API int epicsShareAPI ca_replace_printf_handler ( /* * (for testing purposes only) */ -LIBCA_API unsigned epicsShareAPI ca_get_ioc_connection_count (void); -LIBCA_API int epicsShareAPI ca_preemtive_callback_is_enabled (void); -LIBCA_API void epicsShareAPI ca_self_test (void); -LIBCA_API unsigned epicsShareAPI ca_beacon_anomaly_count (void); -LIBCA_API unsigned epicsShareAPI ca_search_attempts (chid chan); -LIBCA_API double epicsShareAPI ca_beacon_period (chid chan); -LIBCA_API double epicsShareAPI ca_receive_watchdog_delay (chid chan); +LIBCA_API unsigned epicsStdCall ca_get_ioc_connection_count (void); +LIBCA_API int epicsStdCall ca_preemtive_callback_is_enabled (void); +LIBCA_API void epicsStdCall ca_self_test (void); +LIBCA_API unsigned epicsStdCall ca_beacon_anomaly_count (void); +LIBCA_API unsigned epicsStdCall ca_search_attempts (chid chan); +LIBCA_API double epicsStdCall ca_beacon_period (chid chan); +LIBCA_API double epicsStdCall ca_receive_watchdog_delay (chid chan); /* * used when an auxillary thread needs to join a CA client context started * by another thread */ -LIBCA_API struct ca_client_context * epicsShareAPI ca_current_context (); -LIBCA_API int epicsShareAPI ca_attach_context ( struct ca_client_context * context ); +LIBCA_API struct ca_client_context * epicsStdCall ca_current_context (); +LIBCA_API int epicsStdCall ca_attach_context ( struct ca_client_context * context ); -LIBCA_API int epicsShareAPI ca_client_status ( unsigned level ); -LIBCA_API int epicsShareAPI ca_context_status ( struct ca_client_context *, unsigned level ); +LIBCA_API int epicsStdCall ca_client_status ( unsigned level ); +LIBCA_API int epicsStdCall ca_context_status ( struct ca_client_context *, unsigned level ); /* * deprecated @@ -853,16 +853,16 @@ LIBCA_API int epicsShareAPI ca_context_status ( struct ca_client_context *, unsi ca_build_and_connect(NAME, XXXXX, 1, CHIDPTR, YYYYY, 0, 0) #define ca_array_build(NAME,XXXXX, ZZZZZZ, CHIDPTR,YYYYY)\ ca_build_and_connect(NAME, XXXXX, ZZZZZZ, CHIDPTR, YYYYY, 0, 0) -LIBCA_API int epicsShareAPI ca_build_and_connect +LIBCA_API int epicsStdCall ca_build_and_connect ( const char *pChanName, chtype, unsigned long, chid * pChanID, void *, caCh * pFunc, void * pArg ); #define ca_search(pChanName, pChanID)\ ca_search_and_connect (pChanName, pChanID, 0, 0) -LIBCA_API int epicsShareAPI ca_search_and_connect +LIBCA_API int epicsStdCall ca_search_and_connect ( const char * pChanName, chid * pChanID, caCh *pFunc, void * pArg ); -LIBCA_API int epicsShareAPI ca_channel_status (epicsThreadId tid); -LIBCA_API int epicsShareAPI ca_clear_event ( evid eventID ); +LIBCA_API int epicsStdCall ca_channel_status (epicsThreadId tid); +LIBCA_API int epicsStdCall ca_clear_event ( evid eventID ); #define ca_add_event(type,chan,pFunc,pArg,pEventID)\ ca_add_array_event(type,1u,chan,pFunc,pArg,0.0,0.0,0.0,pEventID) #define ca_add_delta_event(TYPE,CHID,ENTRY,ARG,DELTA,EVID)\ @@ -871,7 +871,7 @@ ca_add_array_event(type,1u,chan,pFunc,pArg,0.0,0.0,0.0,pEventID) ca_add_array_event(TYPE,1,CHID,ENTRY,ARG,P_DELTA,N_DELTA,TO,EVID) #define ca_add_array_event(TYPE,COUNT,CHID,ENTRY,ARG,P_DELTA,N_DELTA,TO,EVID)\ ca_add_masked_array_event(TYPE,COUNT,CHID,ENTRY,ARG,P_DELTA,N_DELTA,TO,EVID, DBE_VALUE | DBE_ALARM) -LIBCA_API int epicsShareAPI ca_add_masked_array_event +LIBCA_API int epicsStdCall ca_add_masked_array_event ( chtype type, unsigned long count, chid chanId, caEventCallBackFunc * pFunc, void * pArg, ca_real p_delta, ca_real n_delta, ca_real timeout, evid * pEventID, long mask ); @@ -879,8 +879,8 @@ LIBCA_API int epicsShareAPI ca_add_masked_array_event /* * defunct */ -LIBCA_API int epicsShareAPI ca_modify_user_name ( const char *pUserName ); -LIBCA_API int epicsShareAPI ca_modify_host_name ( const char *pHostName ); +LIBCA_API int epicsStdCall ca_modify_user_name ( const char *pUserName ); +LIBCA_API int epicsStdCall ca_modify_host_name ( const char *pHostName ); #ifdef __cplusplus } diff --git a/modules/ca/src/client/caerr.h b/modules/ca/src/client/caerr.h index ead86db9f..9104a4f02 100644 --- a/modules/ca/src/client/caerr.h +++ b/modules/ca/src/client/caerr.h @@ -140,7 +140,7 @@ extern "C" { #endif -LIBCA_API const char * epicsShareAPI ca_message(long ca_status); +LIBCA_API const char * epicsStdCall ca_message(long ca_status); LIBCA_API extern const char * ca_message_text []; diff --git a/modules/ca/src/client/iocinf.cpp b/modules/ca/src/client/iocinf.cpp index c0f6e7cab..8dcf8c087 100644 --- a/modules/ca/src/client/iocinf.cpp +++ b/modules/ca/src/client/iocinf.cpp @@ -70,7 +70,7 @@ static char *getToken ( const char **ppString, char *pBuf, unsigned bufSIze ) /* * addAddrToChannelAccessAddressList () */ -extern "C" int epicsShareAPI addAddrToChannelAccessAddressList +extern "C" int epicsStdCall addAddrToChannelAccessAddressList ( ELLLIST *pList, const ENV_PARAM *pEnv, unsigned short port, int ignoreNonDefaultPort ) { @@ -119,7 +119,7 @@ extern "C" int epicsShareAPI addAddrToChannelAccessAddressList /* * removeDuplicateAddresses () */ -extern "C" void epicsShareAPI removeDuplicateAddresses +extern "C" void epicsStdCall removeDuplicateAddresses ( ELLLIST *pDestList, ELLLIST *pSrcList, int silent ) { ELLNODE *pRawNode; @@ -179,7 +179,7 @@ static void forcePort ( ELLLIST *pList, unsigned short port ) /* * configureChannelAccessAddressList () */ -extern "C" void epicsShareAPI configureChannelAccessAddressList +extern "C" void epicsStdCall configureChannelAccessAddressList ( ELLLIST *pList, SOCKET sock, unsigned short port ) { ELLLIST tmpList; @@ -247,7 +247,7 @@ extern "C" void epicsShareAPI configureChannelAccessAddressList /* * printChannelAccessAddressList () */ -extern "C" void epicsShareAPI printChannelAccessAddressList ( const ELLLIST *pList ) +extern "C" void epicsStdCall printChannelAccessAddressList ( const ELLLIST *pList ) { osiSockAddrNode *pNode; diff --git a/modules/ca/src/client/oldAccess.h b/modules/ca/src/client/oldAccess.h index 273b550c5..4fdb89a33 100644 --- a/modules/ca/src/client/oldAccess.h +++ b/modules/ca/src/client/oldAccess.h @@ -48,53 +48,53 @@ public: epicsGuard < epicsMutex > & mutexGuard ); // legacy C API - friend unsigned epicsShareAPI ca_get_host_name ( + friend unsigned epicsStdCall ca_get_host_name ( chid pChan, char * pBuf, unsigned bufLength ); - friend const char * epicsShareAPI ca_host_name ( + friend const char * epicsStdCall ca_host_name ( chid pChan ); - friend const char * epicsShareAPI ca_name ( + friend const char * epicsStdCall ca_name ( chid pChan ); - friend void epicsShareAPI ca_set_puser ( + friend void epicsStdCall ca_set_puser ( chid pChan, void * puser ); - friend void * epicsShareAPI ca_puser ( + friend void * epicsStdCall ca_puser ( chid pChan ); - friend int epicsShareAPI ca_change_connection_event ( + friend int epicsStdCall ca_change_connection_event ( chid pChan, caCh * pfunc ); - friend int epicsShareAPI ca_replace_access_rights_event ( + friend int epicsStdCall ca_replace_access_rights_event ( chid pChan, caArh *pfunc ); - friend int epicsShareAPI ca_array_get ( chtype type, + friend int epicsStdCall ca_array_get ( chtype type, arrayElementCount count, chid pChan, void * pValue ); - friend int epicsShareAPI ca_array_get_callback ( chtype type, + friend int epicsStdCall ca_array_get_callback ( chtype type, arrayElementCount count, chid pChan, caEventCallBackFunc *pfunc, void *arg ); - friend int epicsShareAPI ca_array_put ( + friend int epicsStdCall ca_array_put ( chtype type, arrayElementCount count, chid pChan, const void * pValue ); - friend int epicsShareAPI ca_array_put_callback ( + friend int epicsStdCall ca_array_put_callback ( chtype type, arrayElementCount count, chid pChan, const void *pValue, caEventCallBackFunc *pfunc, void *usrarg ); - friend double epicsShareAPI ca_beacon_period ( + friend double epicsStdCall ca_beacon_period ( chid pChan ); - friend unsigned epicsShareAPI ca_search_attempts ( + friend unsigned epicsStdCall ca_search_attempts ( chid pChan ); - friend unsigned epicsShareAPI ca_write_access ( + friend unsigned epicsStdCall ca_write_access ( chid pChan ); - friend unsigned epicsShareAPI ca_read_access ( + friend unsigned epicsStdCall ca_read_access ( chid pChan ); - friend short epicsShareAPI ca_field_type ( + friend short epicsStdCall ca_field_type ( chid pChan ); - friend arrayElementCount epicsShareAPI ca_element_count ( + friend arrayElementCount epicsStdCall ca_element_count ( chid pChan ); - friend int epicsShareAPI ca_v42_ok ( + friend int epicsStdCall ca_v42_ok ( chid pChan ); - friend int epicsShareAPI ca_create_subscription ( + friend int epicsStdCall ca_create_subscription ( chtype type, arrayElementCount count, chid pChan, long mask, caEventCallBackFunc * pCallBack, void * pCallBackArg, evid * monixptr ); - friend enum channel_state epicsShareAPI ca_state ( + friend enum channel_state epicsStdCall ca_state ( chid pChan ); - friend double epicsShareAPI ca_receive_watchdog_delay ( + friend double epicsStdCall ca_receive_watchdog_delay ( chid pChan ); unsigned getName ( @@ -340,35 +340,35 @@ public: void whenThereIsAnExceptionDestroySyncGroupIO ( epicsGuard < epicsMutex > &, T & ); // legacy C API - friend int epicsShareAPI ca_create_channel ( + friend int epicsStdCall ca_create_channel ( const char * name_str, caCh * conn_func, void * puser, capri priority, chid * chanptr ); - friend int epicsShareAPI ca_clear_channel ( chid pChan ); - friend int epicsShareAPI ca_array_get ( chtype type, + friend int epicsStdCall ca_clear_channel ( chid pChan ); + friend int epicsStdCall ca_array_get ( chtype type, arrayElementCount count, chid pChan, void * pValue ); - friend int epicsShareAPI ca_array_get_callback ( chtype type, + friend int epicsStdCall ca_array_get_callback ( chtype type, arrayElementCount count, chid pChan, caEventCallBackFunc *pfunc, void *arg ); - friend int epicsShareAPI ca_array_put ( chtype type, + friend int epicsStdCall ca_array_put ( chtype type, arrayElementCount count, chid pChan, const void * pValue ); - friend int epicsShareAPI ca_array_put_callback ( chtype type, + friend int epicsStdCall ca_array_put_callback ( chtype type, arrayElementCount count, chid pChan, const void * pValue, caEventCallBackFunc *pfunc, void *usrarg ); - friend int epicsShareAPI ca_create_subscription ( + friend int epicsStdCall ca_create_subscription ( chtype type, arrayElementCount count, chid pChan, long mask, caEventCallBackFunc * pCallBack, void * pCallBackArg, evid *monixptr ); - friend int epicsShareAPI ca_flush_io (); - friend int epicsShareAPI ca_clear_subscription ( evid pMon ); - friend int epicsShareAPI ca_sg_create ( CA_SYNC_GID * pgid ); - friend int epicsShareAPI ca_sg_delete ( const CA_SYNC_GID gid ); - friend int epicsShareAPI ca_sg_block ( const CA_SYNC_GID gid, ca_real timeout ); - friend int epicsShareAPI ca_sg_reset ( const CA_SYNC_GID gid ); - friend int epicsShareAPI ca_sg_test ( const CA_SYNC_GID gid ); - friend int epicsShareAPI ca_sg_array_get ( const CA_SYNC_GID gid, + friend int epicsStdCall ca_flush_io (); + friend int epicsStdCall ca_clear_subscription ( evid pMon ); + friend int epicsStdCall ca_sg_create ( CA_SYNC_GID * pgid ); + friend int epicsStdCall ca_sg_delete ( const CA_SYNC_GID gid ); + friend int epicsStdCall ca_sg_block ( const CA_SYNC_GID gid, ca_real timeout ); + friend int epicsStdCall ca_sg_reset ( const CA_SYNC_GID gid ); + friend int epicsStdCall ca_sg_test ( const CA_SYNC_GID gid ); + friend int epicsStdCall ca_sg_array_get ( const CA_SYNC_GID gid, chtype type, arrayElementCount count, chid pChan, void *pValue ); - friend int epicsShareAPI ca_sg_array_put ( const CA_SYNC_GID gid, + friend int epicsStdCall ca_sg_array_put ( const CA_SYNC_GID gid, chtype type, arrayElementCount count, chid pChan, const void *pValue ); friend int ca_sync_group_destroy ( CallbackGuard & cbGuard, diff --git a/modules/ca/src/client/oldChannelNotify.cpp b/modules/ca/src/client/oldChannelNotify.cpp index 1af7a7453..2c546edbb 100644 --- a/modules/ca/src/client/oldChannelNotify.cpp +++ b/modules/ca/src/client/oldChannelNotify.cpp @@ -172,7 +172,7 @@ void oldChannelNotify::operator delete ( void * ) /* * ca_get_host_name () */ -unsigned epicsShareAPI ca_get_host_name ( +unsigned epicsStdCall ca_get_host_name ( chid pChan, char * pBuf, unsigned bufLength ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef() ); @@ -185,7 +185,7 @@ unsigned epicsShareAPI ca_get_host_name ( * !!!! not thread safe !!!! * */ -const char * epicsShareAPI ca_host_name ( +const char * epicsStdCall ca_host_name ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); @@ -195,7 +195,7 @@ const char * epicsShareAPI ca_host_name ( /* * ca_set_puser () */ -void epicsShareAPI ca_set_puser ( +void epicsStdCall ca_set_puser ( chid pChan, void * puser ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); @@ -205,7 +205,7 @@ void epicsShareAPI ca_set_puser ( /* * ca_get_puser () */ -void * epicsShareAPI ca_puser ( +void * epicsStdCall ca_puser ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); @@ -215,7 +215,7 @@ void * epicsShareAPI ca_puser ( /* * Specify an event subroutine to be run for connection events */ -int epicsShareAPI ca_change_connection_event ( chid pChan, caCh * pfunc ) +int epicsStdCall ca_change_connection_event ( chid pChan, caCh * pfunc ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); if ( ! pChan->currentlyConnected ) { @@ -237,7 +237,7 @@ int epicsShareAPI ca_change_connection_event ( chid pChan, caCh * pfunc ) /* * ca_replace_access_rights_event */ -int epicsShareAPI ca_replace_access_rights_event ( +int epicsStdCall ca_replace_access_rights_event ( chid pChan, caArh *pfunc ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); @@ -264,7 +264,7 @@ int epicsShareAPI ca_replace_access_rights_event ( /* * ca_array_get () */ -int epicsShareAPI ca_array_get ( chtype type, +int epicsStdCall ca_array_get ( chtype type, arrayElementCount count, chid pChan, void *pValue ) { int caStatus; @@ -332,7 +332,7 @@ int epicsShareAPI ca_array_get ( chtype type, /* * ca_array_get_callback () */ -int epicsShareAPI ca_array_get_callback ( chtype type, +int epicsStdCall ca_array_get_callback ( chtype type, arrayElementCount count, chid pChan, caEventCallBackFunc *pfunc, void *arg ) { @@ -409,7 +409,7 @@ void oldChannelNotify::read ( /* * ca_array_put_callback () */ -int epicsShareAPI ca_array_put_callback ( chtype type, arrayElementCount count, +int epicsStdCall ca_array_put_callback ( chtype type, arrayElementCount count, chid pChan, const void *pValue, caEventCallBackFunc *pfunc, void *usrarg ) { int caStatus; @@ -473,7 +473,7 @@ int epicsShareAPI ca_array_put_callback ( chtype type, arrayElementCount count, /* * ca_array_put () */ -int epicsShareAPI ca_array_put ( chtype type, arrayElementCount count, +int epicsStdCall ca_array_put ( chtype type, arrayElementCount count, chid pChan, const void * pValue ) { if ( type < 0 ) { @@ -527,7 +527,7 @@ int epicsShareAPI ca_array_put ( chtype type, arrayElementCount count, return caStatus; } -int epicsShareAPI ca_create_subscription ( +int epicsStdCall ca_create_subscription ( chtype type, arrayElementCount count, chid pChan, long mask, caEventCallBackFunc * pCallBack, void * pCallBackArg, evid * monixptr ) @@ -618,7 +618,7 @@ void oldChannelNotify::write ( /* * ca_field_type() */ -short epicsShareAPI ca_field_type ( chid pChan ) +short epicsStdCall ca_field_type ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); return pChan->io.nativeType ( guard ); @@ -627,7 +627,7 @@ short epicsShareAPI ca_field_type ( chid pChan ) /* * ca_element_count () */ -arrayElementCount epicsShareAPI ca_element_count ( chid pChan ) +arrayElementCount epicsStdCall ca_element_count ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); return pChan->io.nativeElementCount ( guard ); @@ -636,7 +636,7 @@ arrayElementCount epicsShareAPI ca_element_count ( chid pChan ) /* * ca_state () */ -enum channel_state epicsShareAPI ca_state ( chid pChan ) +enum channel_state epicsStdCall ca_state ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); if ( pChan->io.connected ( guard ) ) { @@ -653,7 +653,7 @@ enum channel_state epicsShareAPI ca_state ( chid pChan ) /* * ca_read_access () */ -unsigned epicsShareAPI ca_read_access ( chid pChan ) +unsigned epicsStdCall ca_read_access ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); return pChan->io.accessRights(guard).readPermit(); @@ -662,7 +662,7 @@ unsigned epicsShareAPI ca_read_access ( chid pChan ) /* * ca_write_access () */ -unsigned epicsShareAPI ca_write_access ( chid pChan ) +unsigned epicsStdCall ca_write_access ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); return pChan->io.accessRights(guard).writePermit(); @@ -671,25 +671,25 @@ unsigned epicsShareAPI ca_write_access ( chid pChan ) /* * ca_name () */ -const char * epicsShareAPI ca_name ( chid pChan ) +const char * epicsStdCall ca_name ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); return pChan->io.pName ( guard ); } -unsigned epicsShareAPI ca_search_attempts ( chid pChan ) +unsigned epicsStdCall ca_search_attempts ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); return pChan->io.searchAttempts ( guard ); } -double epicsShareAPI ca_beacon_period ( chid pChan ) +double epicsStdCall ca_beacon_period ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); return pChan->io.beaconPeriod ( guard ); } -double epicsShareAPI ca_receive_watchdog_delay ( chid pChan ) +double epicsStdCall ca_receive_watchdog_delay ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); return pChan->io.receiveWatchdogDelay ( guard ); @@ -698,7 +698,7 @@ double epicsShareAPI ca_receive_watchdog_delay ( chid pChan ) /* * ca_v42_ok(chid chan) */ -int epicsShareAPI ca_v42_ok ( chid pChan ) +int epicsStdCall ca_v42_ok ( chid pChan ) { epicsGuard < epicsMutex > guard ( pChan->cacCtx.mutexRef () ); return pChan->io.ca_v42_ok ( guard ); diff --git a/modules/ca/src/client/syncgrp.cpp b/modules/ca/src/client/syncgrp.cpp index 1ba8057d0..e938fa579 100644 --- a/modules/ca/src/client/syncgrp.cpp +++ b/modules/ca/src/client/syncgrp.cpp @@ -21,7 +21,7 @@ /* * ca_sg_create() */ -extern "C" int epicsShareAPI ca_sg_create ( CA_SYNC_GID * pgid ) +extern "C" int epicsStdCall ca_sg_create ( CA_SYNC_GID * pgid ) { ca_client_context * pcac; int caStatus; @@ -65,7 +65,7 @@ int ca_sync_group_destroy ( CallbackGuard & cbGuard, epicsGuard < epicsMutex > & /* * ca_sg_delete() */ -extern "C" int epicsShareAPI ca_sg_delete ( const CA_SYNC_GID gid ) +extern "C" int epicsStdCall ca_sg_delete ( const CA_SYNC_GID gid ) { ca_client_context * pcac; int caStatus = fetchClientContext ( & pcac ); @@ -124,7 +124,7 @@ void sync_group_reset ( ca_client_context & client, CASG & sg ) // !!!! is disabled. This prevents the preemptive callback lock from being released // !!!! by other threads than the one that locked it. // -extern "C" int epicsShareAPI ca_sg_block ( +extern "C" int epicsStdCall ca_sg_block ( const CA_SYNC_GID gid, ca_real timeout ) { ca_client_context *pcac; @@ -152,7 +152,7 @@ extern "C" int epicsShareAPI ca_sg_block ( /* * ca_sg_reset */ -extern "C" int epicsShareAPI ca_sg_reset ( const CA_SYNC_GID gid ) +extern "C" int epicsStdCall ca_sg_reset ( const CA_SYNC_GID gid ) { ca_client_context *pcac; int caStatus = fetchClientContext (&pcac); @@ -176,7 +176,7 @@ extern "C" int epicsShareAPI ca_sg_reset ( const CA_SYNC_GID gid ) /* * ca_sg_stat */ -extern "C" int epicsShareAPI ca_sg_stat ( const CA_SYNC_GID gid ) +extern "C" int epicsStdCall ca_sg_stat ( const CA_SYNC_GID gid ) { ca_client_context * pcac; int caStatus = fetchClientContext ( &pcac ); @@ -199,7 +199,7 @@ extern "C" int epicsShareAPI ca_sg_stat ( const CA_SYNC_GID gid ) /* * ca_sg_test */ -extern "C" int epicsShareAPI ca_sg_test ( const CA_SYNC_GID gid ) +extern "C" int epicsStdCall ca_sg_test ( const CA_SYNC_GID gid ) { ca_client_context * pcac; int caStatus = fetchClientContext ( &pcac ); @@ -243,7 +243,7 @@ extern "C" int epicsShareAPI ca_sg_test ( const CA_SYNC_GID gid ) /* * ca_sg_array_put() */ -extern "C" int epicsShareAPI ca_sg_array_put ( const CA_SYNC_GID gid, chtype type, +extern "C" int epicsStdCall ca_sg_array_put ( const CA_SYNC_GID gid, chtype type, arrayElementCount count, chid pChan, const void *pValue ) { ca_client_context *pcac; @@ -305,7 +305,7 @@ extern "C" int epicsShareAPI ca_sg_array_put ( const CA_SYNC_GID gid, chtype typ /* * ca_sg_array_get() */ -extern "C" int epicsShareAPI ca_sg_array_get ( const CA_SYNC_GID gid, chtype type, +extern "C" int epicsStdCall ca_sg_array_get ( const CA_SYNC_GID gid, chtype type, arrayElementCount count, chid pChan, void *pValue ) { ca_client_context *pcac; diff --git a/modules/ca/src/client/test_event.cpp b/modules/ca/src/client/test_event.cpp index 78179f31e..18469ab3b 100644 --- a/modules/ca/src/client/test_event.cpp +++ b/modules/ca/src/client/test_event.cpp @@ -17,7 +17,7 @@ #include "cadef.h" -extern "C" void epicsShareAPI ca_test_event ( struct event_handler_args args ) +extern "C" void epicsStdCall ca_test_event ( struct event_handler_args args ) { chtype nativeType = ca_field_type ( args.chid ); const char * pNativeTypeName = ""; @@ -47,7 +47,7 @@ extern "C" void epicsShareAPI ca_test_event ( struct event_handler_args args ) * ca_dump_dbr() * dump the specified dbr type to stdout */ -extern "C" void epicsShareAPI ca_dump_dbr ( +extern "C" void epicsStdCall ca_dump_dbr ( chtype type, unsigned count, const void * pbuffer ) { unsigned i; diff --git a/modules/ca/src/client/udpiiu.cpp b/modules/ca/src/client/udpiiu.cpp index de94f1f63..e3879bae2 100644 --- a/modules/ca/src/client/udpiiu.cpp +++ b/modules/ca/src/client/udpiiu.cpp @@ -461,7 +461,7 @@ void udpiiu :: M_repeaterTimerNotify :: repeaterRegistrationMessage ( unsigned a * * register with the repeater */ -void epicsShareAPI caRepeaterRegistrationMessage ( +void epicsStdCall caRepeaterRegistrationMessage ( SOCKET sock, unsigned repeaterPort, unsigned attemptNumber ) { osiSockAddr saddr; @@ -578,7 +578,7 @@ void epicsShareAPI caRepeaterRegistrationMessage ( * * 072392 - problem solved by using SO_REUSEADDR */ -void epicsShareAPI caStartRepeaterIfNotInstalled ( unsigned repeaterPort ) +void epicsStdCall caStartRepeaterIfNotInstalled ( unsigned repeaterPort ) { bool installed = false; int status; diff --git a/modules/ca/src/client/udpiiu.h b/modules/ca/src/client/udpiiu.h index 00e415622..47ad4088d 100644 --- a/modules/ca/src/client/udpiiu.h +++ b/modules/ca/src/client/udpiiu.h @@ -41,9 +41,9 @@ extern "C" void cacRecvThreadUDP ( void *pParam ); -LIBCA_API void epicsShareAPI caStartRepeaterIfNotInstalled ( +LIBCA_API void epicsStdCall caStartRepeaterIfNotInstalled ( unsigned repeaterPort ); -LIBCA_API void epicsShareAPI caRepeaterRegistrationMessage ( +LIBCA_API void epicsStdCall caRepeaterRegistrationMessage ( SOCKET sock, unsigned repeaterPort, unsigned attemptNumber ); extern "C" LIBCA_API void caRepeaterThread ( void * pDummy );