Merged changes from 3.14 branch
Up to revno 12420 inclusive.
This commit is contained in:
@ -75,9 +75,12 @@ INSTALL_DBD = $(INSTALL_LOCATION)/dbd
|
|||||||
INSTALL_DB = $(INSTALL_LOCATION)/db
|
INSTALL_DB = $(INSTALL_LOCATION)/db
|
||||||
INSTALL_CONFIG = $(INSTALL_LOCATION)/configure
|
INSTALL_CONFIG = $(INSTALL_LOCATION)/configure
|
||||||
|
|
||||||
#Directory for OS independant build created files
|
# Directory for OS independant build created files
|
||||||
COMMON_DIR = ../O.Common
|
COMMON_DIR = ../O.Common
|
||||||
|
|
||||||
|
# The IOC's path to $(TOP), may be overridden inside the application
|
||||||
|
IOCS_APPL_TOP = $(INSTALL_LOCATION)
|
||||||
|
|
||||||
#-------------------------------------------------------
|
#-------------------------------------------------------
|
||||||
# Make echo output - suppress echoing if make's '-s' flag is set
|
# Make echo output - suppress echoing if make's '-s' flag is set
|
||||||
NOP = :
|
NOP = :
|
||||||
|
@ -389,8 +389,7 @@ $(foreach file, $(DB_INSTALLS), $(eval $(call DB_INSTALLS_template, $(file))))
|
|||||||
|
|
||||||
##################################################### register record,device,driver support
|
##################################################### register record,device,driver support
|
||||||
|
|
||||||
IOC_INST_TOP := $(firstword $(IOCS_APPL_TOP) \
|
IOC_INST_TOP := $(shell $(PERL) $(TOOLS)/fullPathName.pl $(IOCS_APPL_TOP) )
|
||||||
$(shell $(PERL) $(TOOLS)/fullPathName.pl $(INSTALL_LOCATION) ) )
|
|
||||||
|
|
||||||
%_registerRecordDeviceDriver.cpp: $(COMMON_DIR)/%.dbd
|
%_registerRecordDeviceDriver.cpp: $(COMMON_DIR)/%.dbd
|
||||||
@$(RM) $@
|
@$(RM) $@
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
#*************************************************************************
|
#*************************************************************************
|
||||||
# Copyright (c) 2002 The University of Chicago, as Operator of Argonne
|
# Copyright (c) 2013 UChicago Argonne LLC, as Operator of Argonne
|
||||||
# National Laboratory.
|
# National Laboratory.
|
||||||
# Copyright (c) 2002 The Regents of the University of California, as
|
# Copyright (c) 2002 The Regents of the University of California, as
|
||||||
# Operator of Los Alamos National Laboratory.
|
# Operator of Los Alamos National Laboratory.
|
||||||
# EPICS BASE Versions 3.13.7
|
# EPICS BASE is distributed subject to a Software License Agreement found
|
||||||
# and higher are distributed subject to a Software License Agreement found
|
# in file LICENSE that is included with this distribution.
|
||||||
# in file LICENSE that is included with this distribution.
|
|
||||||
#*************************************************************************
|
#*************************************************************************
|
||||||
#RULES.ioc
|
#RULES.ioc
|
||||||
|
|
||||||
include $(CONFIG)/RULES_DIRS
|
include $(CONFIG)/RULES_DIRS
|
||||||
|
|
||||||
build$(DIVIDER)$(ARCH) build: buildInstall
|
build$(DIVIDER)$(ARCH) build: buildInstall
|
||||||
@ -15,23 +15,18 @@ install$(DIVIDER)$(ARCH) install: buildInstall
|
|||||||
$(ARCH): buildInstall
|
$(ARCH): buildInstall
|
||||||
|
|
||||||
ifeq ($(filter $(ARCH),$(BUILD_ARCHS)),$(ARCH))
|
ifeq ($(filter $(ARCH),$(BUILD_ARCHS)),$(ARCH))
|
||||||
buildInstall$(DIVIDER)$(ARCH) buildInstall: $(TARGETS)
|
buildInstall$(DIVIDER)$(ARCH) buildInstall: $(TARGETS)
|
||||||
|
|
||||||
clean$(DIVIDER)$(ARCH) clean:
|
clean$(DIVIDER)$(ARCH) clean:
|
||||||
$(RM) cdCommands envPaths dllPath.bat
|
$(RM) cdCommands envPaths dllPath.bat
|
||||||
|
else
|
||||||
else
|
buildInstall$(DIVIDER)$(ARCH) buildInstall:
|
||||||
buildInstall$(DIVIDER)$(ARCH) buildInstall:
|
clean$(DIVIDER)$(ARCH) clean:
|
||||||
clean$(DIVIDER)$(ARCH) clean:
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
cdCommands envPaths dllPath.bat: $(wildcard $(TOP)/configure/RELEASE*) \
|
cdCommands envPaths dllPath.bat: $(wildcard $(TOP)/configure/RELEASE*) \
|
||||||
$(TOP)/configure/CONFIG $(INSTALL_BIN)
|
$(wildcard $(TOP)/configure/CONFIG_SITE*) $(INSTALL_BIN)
|
||||||
ifeq ($(IOCS_APPL_TOP),)
|
|
||||||
$(PERL) $(TOOLS)/convertRelease.pl -a $(ARCH) $@
|
|
||||||
else
|
|
||||||
$(PERL) $(TOOLS)/convertRelease.pl -a $(ARCH) -t $(IOCS_APPL_TOP) $@
|
$(PERL) $(TOOLS)/convertRelease.pl -a $(ARCH) -t $(IOCS_APPL_TOP) $@
|
||||||
endif
|
|
||||||
|
|
||||||
realclean:
|
realclean:
|
||||||
$(RM) cdCommands envPaths dllPath.bat
|
$(RM) cdCommands envPaths dllPath.bat
|
||||||
|
@ -63,11 +63,11 @@ help:
|
|||||||
@echo " rebuild - Same as clean install"
|
@echo " rebuild - Same as clean install"
|
||||||
@echo " archclean - Removes O.<arch> dirs but not O.Common dir"
|
@echo " archclean - Removes O.<arch> dirs but not O.Common dir"
|
||||||
@echo "\"Partial\" build targets supported by Makefiles:"
|
@echo "\"Partial\" build targets supported by Makefiles:"
|
||||||
@echo " inc.<arch> - Installs <arch> only header files."
|
@echo " inc$(DIVIDER)<arch> - Installs <arch> only header files."
|
||||||
@echo " build.<arch> - Builds and installs <arch> only."
|
@echo " build$(DIVIDER)<arch> - Builds and installs <arch> only."
|
||||||
@echo " install.<arch> - Builds and installs <arch> only."
|
@echo " install$(DIVIDER)<arch> - Builds and installs <arch> only."
|
||||||
@echo " clean.<arch> - Cleans <arch> binaries in O.<arch> dirs only."
|
@echo " clean$(DIVIDER)<arch> - Cleans <arch> binaries in O.<arch> dirs only."
|
||||||
@echo " uninstall.<arch> - Remove bin & lib directories for <arch> only."
|
@echo " uninstall$(DIVIDER)<arch> - Remove bin & lib directories for <arch> only."
|
||||||
@echo "Targets supported by top level Makefile:"
|
@echo "Targets supported by top level Makefile:"
|
||||||
@echo " archuninstall - Remove bin & lib directories created by this hostarch."
|
@echo " archuninstall - Remove bin & lib directories created by this hostarch."
|
||||||
@echo " uninstall - Remove install directories created by this hostarch."
|
@echo " uninstall - Remove install directories created by this hostarch."
|
||||||
|
@ -1938,8 +1938,8 @@ Termination Appear to be Ignored</a></h3>
|
|||||||
<p>Short lived CA client applications that issue a CA put request and then
|
<p>Short lived CA client applications that issue a CA put request and then
|
||||||
immediately exit the process (return from <code>main</code> or call
|
immediately exit the process (return from <code>main</code> or call
|
||||||
<code>exit</code>) may find that there request isn't executed. To guarantee
|
<code>exit</code>) may find that there request isn't executed. To guarantee
|
||||||
that the request is sent call <code>ca_flush</code> followed by
|
that the request is sent call <code>ca_flush_io()</code> followed by
|
||||||
<code>ca_context_destroy</code> prior to terminating the process.</p>
|
<code>ca_context_destroy()</code> prior to terminating the process.</p>
|
||||||
|
|
||||||
<h3><a name="Problems">ENOBUFS Messages</a></h3>
|
<h3><a name="Problems">ENOBUFS Messages</a></h3>
|
||||||
|
|
||||||
@ -2648,7 +2648,7 @@ get called in the correct order.</p>
|
|||||||
resources used by the client library such as sockets and allocated memory are
|
resources used by the client library such as sockets and allocated memory are
|
||||||
automatically released by the system when the process exits and
|
automatically released by the system when the process exits and
|
||||||
ca_context_destroy() hasn't been called, but on light weight systems such as
|
ca_context_destroy() hasn't been called, but on light weight systems such as
|
||||||
vxWorks or RTEMS no cleanup occurs unless the application call
|
vxWorks or RTEMS no cleanup occurs unless the application calls
|
||||||
ca_context_destroy().</p>
|
ca_context_destroy().</p>
|
||||||
|
|
||||||
<h4>Returns</h4>
|
<h4>Returns</h4>
|
||||||
@ -2661,16 +2661,10 @@ ca_context_destroy().</p>
|
|||||||
|
|
||||||
<h3><code><a name="ca_create_channel">ca_create_channel()</a></code></h3>
|
<h3><code><a name="ca_create_channel">ca_create_channel()</a></code></h3>
|
||||||
<pre>#include <cadef.h>
|
<pre>#include <cadef.h>
|
||||||
typedef void ( *pCallBack ) (
|
typedef void ( caCh ) (struct connection_handler_args);
|
||||||
struct connection_handler_args );
|
int ca_create_channel (const char *PVNAME,
|
||||||
int ca_create_channel
|
caCh *USERFUNC, void *PUSER,
|
||||||
(
|
capri PRIORITY, chid *PCHID );</pre>
|
||||||
const char *PROCESS_VARIABLE_NAME,
|
|
||||||
caCh *USERFUNC,
|
|
||||||
void *PUSER,
|
|
||||||
capri priority,
|
|
||||||
chid *PCHID
|
|
||||||
);</pre>
|
|
||||||
|
|
||||||
<h4>Description</h4>
|
<h4>Description</h4>
|
||||||
|
|
||||||
@ -2719,7 +2713,7 @@ time.</p>
|
|||||||
|
|
||||||
<h4>Arguments</h4>
|
<h4>Arguments</h4>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><code>PROCESS_VARIABLE_NAME</code></dt>
|
<dt><code>PVNAME</code></dt>
|
||||||
<dd>A nil terminated process variable name string. EPICS process control
|
<dd>A nil terminated process variable name string. EPICS process control
|
||||||
function block database variable names are of the form "<record
|
function block database variable names are of the form "<record
|
||||||
name>.<field name>". If the field name and the period separator
|
name>.<field name>". If the field name and the period separator
|
||||||
@ -2818,17 +2812,15 @@ subscriptions (monitors) registered with the channel.</p>
|
|||||||
<pre>#include <cadef.h>
|
<pre>#include <cadef.h>
|
||||||
int ca_put ( chtype TYPE,
|
int ca_put ( chtype TYPE,
|
||||||
chid CHID, void *PVALUE );
|
chid CHID, void *PVALUE );
|
||||||
int ca_array_put ( chtype TYPE,
|
int ca_array_put ( chtype TYPE, unsigned long COUNT,
|
||||||
unsigned long COUNT,
|
|
||||||
chid CHID, const void *PVALUE);
|
chid CHID, const void *PVALUE);
|
||||||
typedef void ( *pCallBack ) (struct event_handler_args );
|
typedef void ( caEventCallBackFunc ) (struct event_handler_args);
|
||||||
int ca_put_callback ( chtype TYPE,
|
int ca_put_callback ( chtype TYPE,
|
||||||
chid CHID, const void *PVALUE,
|
chid CHID, const void *PVALUE,
|
||||||
pCallBack PFUNC, void *USERARG );
|
caEventCallBackFunc PFUNC, void *USERARG );
|
||||||
int ca_array_put_callback ( chtype TYPE,
|
int ca_array_put_callback ( chtype TYPE, unsigned long COUNT,
|
||||||
unsigned long COUNT,
|
|
||||||
chid CHID, const void *PVALUE,
|
chid CHID, const void *PVALUE,
|
||||||
pCallBack PFUNC, void *USERARG );</pre>
|
caEventCallBackFunc PFUNC, void *USERARG );</pre>
|
||||||
|
|
||||||
<h4>Description</h4>
|
<h4>Description</h4>
|
||||||
|
|
||||||
@ -2948,12 +2940,13 @@ int ca_get ( chtype TYPE,
|
|||||||
chid CHID, void *PVALUE );
|
chid CHID, void *PVALUE );
|
||||||
int ca_array_get ( chtype TYPE, unsigned long COUNT,
|
int ca_array_get ( chtype TYPE, unsigned long COUNT,
|
||||||
chid CHID, void *PVALUE );
|
chid CHID, void *PVALUE );
|
||||||
typedef void ( *pCallBack ) (struct event_handler_args );
|
typedef void ( caEventCallBackFunc ) (struct event_handler_args);
|
||||||
int ca_get_callback ( chtype TYPE,
|
int ca_get_callback ( chtype TYPE,
|
||||||
chid CHID, pCallBack USERFUNC, void *USERARG);
|
chid CHID,
|
||||||
|
caEventCallBackFunc USERFUNC, void *USERARG);
|
||||||
int ca_array_get_callback ( chtype TYPE, unsigned long COUNT,
|
int ca_array_get_callback ( chtype TYPE, unsigned long COUNT,
|
||||||
chid CHID,
|
chid CHID,
|
||||||
pCallBack USERFUNC, void *USERARG );</pre>
|
caEventCallBackFunc USERFUNC, void *USERARG);</pre>
|
||||||
|
|
||||||
<h4>Description</h4>
|
<h4>Description</h4>
|
||||||
|
|
||||||
@ -3051,11 +3044,10 @@ when a CA get request is initiated.</p>
|
|||||||
|
|
||||||
<h3><code><a name="ca_add_event">ca_create_subscription()</a></code></h3>
|
<h3><code><a name="ca_add_event">ca_create_subscription()</a></code></h3>
|
||||||
<pre>#include <cadef.h>
|
<pre>#include <cadef.h>
|
||||||
typedef void ( *pCallBack ) (
|
typedef void ( caEventCallBackFunc ) (struct event_handler_args);
|
||||||
struct event_handler_args );
|
int ca_create_subscription ( chtype TYPE, unsigned long COUNT,
|
||||||
int ca_create_subscription ( chtype TYPE,
|
chid CHID, unsigned long MASK,
|
||||||
unsigned long COUNT, chid CHID,
|
caEventCallBackFunc USERFUNC, void *USERARG,
|
||||||
unsigned long MASK, pCallBack USERFUNC, void *USERARG,
|
|
||||||
evid *PEVID );</pre>
|
evid *PEVID );</pre>
|
||||||
|
|
||||||
<h4>Description</h4>
|
<h4>Description</h4>
|
||||||
@ -3540,7 +3532,7 @@ get the lowest latency response to the arrival of CA messages.</p>
|
|||||||
<h3><code><a name="ca_replace_printf_handler">ca_replace_printf_handler
|
<h3><code><a name="ca_replace_printf_handler">ca_replace_printf_handler
|
||||||
()</a></code></h3>
|
()</a></code></h3>
|
||||||
<pre>#include <cadef.h>
|
<pre>#include <cadef.h>
|
||||||
typedef int caPrintfFunc ( const char *pFromat, va_list args );
|
typedef int caPrintfFunc ( const char *pFormat, va_list args );
|
||||||
int ca_replace_printf_handler ( caPrintfFunc *PFUNC );</pre>
|
int ca_replace_printf_handler ( caPrintfFunc *PFUNC );</pre>
|
||||||
|
|
||||||
<h4>Description</h4>
|
<h4>Description</h4>
|
||||||
@ -3571,8 +3563,9 @@ SEVCHK ( status, "failed to install my printf handler" );</pre>
|
|||||||
|
|
||||||
<h3><code><a name="ca_replace">ca_replace_access_rights_event()</a></code></h3>
|
<h3><code><a name="ca_replace">ca_replace_access_rights_event()</a></code></h3>
|
||||||
<pre>#include <cadef.h>
|
<pre>#include <cadef.h>
|
||||||
typedef void ( *pCallBack )( struct access_rights_handler_args );
|
typedef void ( caEventCallBackFunc )(struct access_rights_handler_args);
|
||||||
int ca_replace_access_rights_event ( chid CHAN, pCallBack PFUNC );</pre>
|
int ca_replace_access_rights_event ( chid CHAN,
|
||||||
|
caEventCallBackFunc PFUNC );</pre>
|
||||||
|
|
||||||
<h4>Description</h4>
|
<h4>Description</h4>
|
||||||
|
|
||||||
@ -4029,7 +4022,7 @@ SEVCHK ( status, Sync group delete failed );</pre>
|
|||||||
|
|
||||||
<h3><code><a name="ca_sg_block">ca_sg_block()</a></code></h3>
|
<h3><code><a name="ca_sg_block">ca_sg_block()</a></code></h3>
|
||||||
<pre>#include <cadef.h>
|
<pre>#include <cadef.h>
|
||||||
int ca_sg_block ( CA_SYNC_GID GID, double timeout );</pre>
|
int ca_sg_block ( CA_SYNC_GID GID, double TIMEOUT );</pre>
|
||||||
|
|
||||||
<h4>Description</h4>
|
<h4>Description</h4>
|
||||||
|
|
||||||
@ -4050,13 +4043,16 @@ access background activity while it is waiting.</p>
|
|||||||
|
|
||||||
<h4>Arguments</h4>
|
<h4>Arguments</h4>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>GID</dt>
|
<dt><code>GID</code></dt>
|
||||||
<dd>Identifier of the synchronous group.</dd>
|
<dd>Identifier of the synchronous group.</dd>
|
||||||
|
<dt><code>TIMEOUT</code></dt>
|
||||||
|
<dd>The duration to block in this routine in seconds. A timeout of zero
|
||||||
|
seconds blocks forever.</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<h4>Examples</h4>
|
<h4>Examples</h4>
|
||||||
<pre>CA_SYNC_GID gid;
|
<pre>CA_SYNC_GID gid;
|
||||||
status = ca_sg_block(gid);
|
status = ca_sg_block(gid, 0.0);
|
||||||
SEVCHK(status, Sync group block failed);</pre>
|
SEVCHK(status, Sync group block failed);</pre>
|
||||||
|
|
||||||
<h4>Returns</h4>
|
<h4>Returns</h4>
|
||||||
@ -4267,8 +4263,8 @@ reissued.</p>
|
|||||||
|
|
||||||
<h3><code><a name="ca_client_status">ca_client_status()</a></code></h3>
|
<h3><code><a name="ca_client_status">ca_client_status()</a></code></h3>
|
||||||
<pre>int ca_client_status ( unsigned level );
|
<pre>int ca_client_status ( unsigned level );
|
||||||
int ca_context_status ( struct ca_client_context *,
|
int ca_context_status ( struct ca_client_context *CONTEXT,
|
||||||
unsigned level );</pre>
|
unsigned LEVEL );</pre>
|
||||||
|
|
||||||
<h4>Description</h4>
|
<h4>Description</h4>
|
||||||
|
|
||||||
@ -4279,7 +4275,7 @@ ca_client_status() prints information about the calling threads CA context.</p>
|
|||||||
<h4>Arguments</h4>
|
<h4>Arguments</h4>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><code>CONTEXT</code></dt>
|
<dt><code>CONTEXT</code></dt>
|
||||||
<dd>A pointer to the CA context to join with.</dd>
|
<dd>A pointer to the CA context to examine.</dd>
|
||||||
<dt><code>LEVEL</code></dt>
|
<dt><code>LEVEL</code></dt>
|
||||||
<dd>The interest level. Increasing level produces increasing detail.</dd>
|
<dd>The interest level. Increasing level produces increasing detail.</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
@ -753,16 +753,16 @@ epicsShareFunc int epicsShareAPI ca_clear_subscription ( evid pMon )
|
|||||||
ca_client_context & cac = chan.getClientCtx ();
|
ca_client_context & cac = chan.getClientCtx ();
|
||||||
// !!!! the order in which we take the mutex here prevents deadlocks
|
// !!!! the order in which we take the mutex here prevents deadlocks
|
||||||
{
|
{
|
||||||
epicsGuard < epicsMutex > guard ( cac.mutex );
|
epicsGuard < epicsMutex > guard ( cac.mutex );
|
||||||
try {
|
try {
|
||||||
// if this stalls out on a live circuit then an exception
|
// if this stalls out on a live circuit then an exception
|
||||||
// can be forthcoming which we must ignore as the clear
|
// can be forthcoming which we must ignore as the clear
|
||||||
// request must always be successful
|
// request must always be successful
|
||||||
chan.eliminateExcessiveSendBacklog ( guard );
|
chan.eliminateExcessiveSendBacklog ( guard );
|
||||||
}
|
}
|
||||||
catch ( cacChannel::notConnected & ) {
|
catch ( cacChannel::notConnected & ) {
|
||||||
// intentionally ignored
|
// intentionally ignored
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( cac.pCallbackGuard.get() &&
|
if ( cac.pCallbackGuard.get() &&
|
||||||
cac.createdByThread == epicsThreadGetIdSelf () ) {
|
cac.createdByThread == epicsThreadGetIdSelf () ) {
|
||||||
|
@ -348,7 +348,7 @@ public:
|
|||||||
|
|
||||||
template < class T >
|
template < class T >
|
||||||
void whenThereIsAnExceptionDestroySyncGroupIO ( epicsGuard < epicsMutex > &, T & );
|
void whenThereIsAnExceptionDestroySyncGroupIO ( epicsGuard < epicsMutex > &, T & );
|
||||||
|
|
||||||
// legacy C API
|
// legacy C API
|
||||||
friend int epicsShareAPI ca_create_channel (
|
friend int epicsShareAPI ca_create_channel (
|
||||||
const char * name_str, caCh * conn_func, void * puser,
|
const char * name_str, caCh * conn_func, void * puser,
|
||||||
|
@ -134,15 +134,15 @@ extern "C" int epicsShareAPI ca_sg_block (
|
|||||||
if ( status == ECA_NORMAL ) {
|
if ( status == ECA_NORMAL ) {
|
||||||
CASG * pcasg;
|
CASG * pcasg;
|
||||||
{
|
{
|
||||||
epicsGuard < epicsMutex > guard ( pcac->mutex );
|
epicsGuard < epicsMutex > guard ( pcac->mutex );
|
||||||
pcasg = pcac->lookupCASG ( guard, gid );
|
pcasg = pcac->lookupCASG ( guard, gid );
|
||||||
if ( pcasg ) {
|
if ( pcasg ) {
|
||||||
status = pcasg->block (
|
status = pcasg->block (
|
||||||
pcac->pCallbackGuard.get (), guard, timeout );
|
pcac->pCallbackGuard.get (), guard, timeout );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
status = ECA_BADSYNCGRP;
|
status = ECA_BADSYNCGRP;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( pcasg ) {
|
if ( pcasg ) {
|
||||||
sync_group_reset ( *pcac, *pcasg );
|
sync_group_reset ( *pcac, *pcasg );
|
||||||
|
@ -183,7 +183,7 @@ public:
|
|||||||
void show ( unsigned level ) const;
|
void show ( unsigned level ) const;
|
||||||
void showAllIO ( const dbChannelIO & chan, unsigned level ) const;
|
void showAllIO ( const dbChannelIO & chan, unsigned level ) const;
|
||||||
void destroyAllIO ( CallbackGuard & cbGuard,
|
void destroyAllIO ( CallbackGuard & cbGuard,
|
||||||
epicsGuard < epicsMutex > &, dbChannelIO & chan );
|
epicsGuard < epicsMutex > &, dbChannelIO & chan );
|
||||||
void ioCancel ( CallbackGuard &, epicsGuard < epicsMutex > &,
|
void ioCancel ( CallbackGuard &, epicsGuard < epicsMutex > &,
|
||||||
dbChannelIO & chan, const cacChannel::ioid &id );
|
dbChannelIO & chan, const cacChannel::ioid &id );
|
||||||
void ioShow ( epicsGuard < epicsMutex > &,
|
void ioShow ( epicsGuard < epicsMutex > &,
|
||||||
|
@ -111,8 +111,8 @@ private:
|
|||||||
epicsGuard < epicsMutex > & ) const;
|
epicsGuard < epicsMutex > & ) const;
|
||||||
unsigned long nativeElementCount (
|
unsigned long nativeElementCount (
|
||||||
epicsGuard < epicsMutex > & ) const;
|
epicsGuard < epicsMutex > & ) const;
|
||||||
dbChannelIO ( const dbChannelIO & );
|
dbChannelIO ( const dbChannelIO & );
|
||||||
dbChannelIO & operator = ( const dbChannelIO & );
|
dbChannelIO & operator = ( const dbChannelIO & );
|
||||||
void operator delete ( void * );
|
void operator delete ( void * );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ void dbSubscriptionIO::destructor ( CallbackGuard & cbGuard,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void dbSubscriptionIO::unsubscribe ( CallbackGuard & cbGuard,
|
void dbSubscriptionIO::unsubscribe ( CallbackGuard & cbGuard,
|
||||||
epicsGuard < epicsMutex > & guard )
|
epicsGuard < epicsMutex > & guard )
|
||||||
{
|
{
|
||||||
guard.assertIdenticalMutex ( this->mutex );
|
guard.assertIdenticalMutex ( this->mutex );
|
||||||
if ( this->es ) {
|
if ( this->es ) {
|
||||||
|
@ -755,6 +755,11 @@ long dbWriteRecordFP(
|
|||||||
|
|
||||||
dctonly = ((level>1) ? FALSE : TRUE);
|
dctonly = ((level>1) ? FALSE : TRUE);
|
||||||
dbInitEntry(pdbbase,pdbentry);
|
dbInitEntry(pdbbase,pdbentry);
|
||||||
|
if (precordTypename) {
|
||||||
|
if (*precordTypename == 0 || *precordTypename == '*')
|
||||||
|
precordTypename = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if(!precordTypename) {
|
if(!precordTypename) {
|
||||||
status = dbFirstRecordType(pdbentry);
|
status = dbFirstRecordType(pdbentry);
|
||||||
if(status) {
|
if(status) {
|
||||||
@ -851,6 +856,10 @@ long dbWriteMenuFP(DBBASE *pdbbase,FILE *fp,const char *menuName)
|
|||||||
fprintf(stderr,"pdbbase not specified\n");
|
fprintf(stderr,"pdbbase not specified\n");
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
if (menuName) {
|
||||||
|
if (*menuName == 0 || *menuName == '*')
|
||||||
|
menuName = 0;
|
||||||
|
}
|
||||||
pdbMenu = (dbMenu *)ellFirst(&pdbbase->menuList);
|
pdbMenu = (dbMenu *)ellFirst(&pdbbase->menuList);
|
||||||
while(pdbMenu) {
|
while(pdbMenu) {
|
||||||
if(menuName) {
|
if(menuName) {
|
||||||
@ -896,6 +905,11 @@ long dbWriteRecordTypeFP(
|
|||||||
fprintf(stderr,"pdbbase not specified\n");
|
fprintf(stderr,"pdbbase not specified\n");
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
if (recordTypeName) {
|
||||||
|
if (*recordTypeName == 0 || *recordTypeName == '*')
|
||||||
|
recordTypeName = 0;
|
||||||
|
}
|
||||||
|
|
||||||
for(pdbRecordType = (dbRecordType *)ellFirst(&pdbbase->recordTypeList);
|
for(pdbRecordType = (dbRecordType *)ellFirst(&pdbbase->recordTypeList);
|
||||||
pdbRecordType; pdbRecordType = (dbRecordType *)ellNext(&pdbRecordType->node)) {
|
pdbRecordType; pdbRecordType = (dbRecordType *)ellNext(&pdbRecordType->node)) {
|
||||||
if(recordTypeName) {
|
if(recordTypeName) {
|
||||||
@ -3172,8 +3186,9 @@ void dbDumpDevice(DBBASE *pdbbase,const char *recordTypeName)
|
|||||||
devSup *pdevSup;
|
devSup *pdevSup;
|
||||||
int gotMatch;
|
int gotMatch;
|
||||||
|
|
||||||
if(recordTypeName) {
|
if (recordTypeName) {
|
||||||
if(recordTypeName[0]==0 || recordTypeName[0] == '*') recordTypeName = 0;
|
if (*recordTypeName == 0 || *recordTypeName == '*')
|
||||||
|
recordTypeName = 0;
|
||||||
}
|
}
|
||||||
if(!pdbbase) {
|
if(!pdbbase) {
|
||||||
fprintf(stderr,"pdbbase not specified\n");
|
fprintf(stderr,"pdbbase not specified\n");
|
||||||
|
@ -31,7 +31,13 @@ static int yyAbort = 0;
|
|||||||
|
|
||||||
%%
|
%%
|
||||||
|
|
||||||
database: database database_item | database_item;
|
database: /* empty */
|
||||||
|
| database_item_list
|
||||||
|
;
|
||||||
|
|
||||||
|
database_item_list: database_item_list database_item
|
||||||
|
| database_item
|
||||||
|
;
|
||||||
|
|
||||||
database_item: include
|
database_item: include
|
||||||
| path
|
| path
|
||||||
|
@ -3,12 +3,14 @@
|
|||||||
* National Laboratory.
|
* National Laboratory.
|
||||||
* Copyright (c) 2002 The Regents of the University of California, as
|
* Copyright (c) 2002 The Regents of the University of California, as
|
||||||
* Operator of Los Alamos National Laboratory.
|
* Operator of Los Alamos National Laboratory.
|
||||||
* EPICS BASE Versions 3.13.7
|
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||||
* and higher are distributed subject to a Software License Agreement found
|
* in file LICENSE that is included with this distribution.
|
||||||
* in file LICENSE that is included with this distribution.
|
|
||||||
\*************************************************************************/
|
\*************************************************************************/
|
||||||
/*epicsConvert.h*/
|
/*epicsConvert.h*/
|
||||||
|
|
||||||
|
#ifndef INC_epicsConvert_H
|
||||||
|
#define INC_epicsConvert_H
|
||||||
|
|
||||||
#include <shareLib.h>
|
#include <shareLib.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@ -21,3 +23,4 @@ epicsShareFunc float epicsConvertDoubleToFloat(double value);
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* INC_epicsConvert_H */
|
||||||
|
@ -4,11 +4,14 @@
|
|||||||
* Copyright (c) 2002 The Regents of the University of California, as
|
* Copyright (c) 2002 The Regents of the University of California, as
|
||||||
* Operator of Los Alamos National Laboratory.
|
* Operator of Los Alamos National Laboratory.
|
||||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||||
* in file LICENSE that is included with this distribution.
|
* in file LICENSE that is included with this distribution.
|
||||||
\*************************************************************************/
|
\*************************************************************************/
|
||||||
/* epicsStdlib.h */
|
/* epicsStdlib.h */
|
||||||
/* Author: Eric Norum */
|
/* Author: Eric Norum */
|
||||||
|
|
||||||
|
#ifndef INC_epicsStdlib_H
|
||||||
|
#define INC_epicsStdlib_H
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
||||||
@ -67,3 +70,4 @@ epicsShareFunc int
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* INC_epicsStdlib_H */
|
||||||
|
@ -300,11 +300,6 @@ epicsShareFunc long locationProbe (epicsAddressType addrType, char *pLocation);
|
|||||||
|
|
||||||
#endif /* NO_DEVLIB_OLD_INTERFACE */
|
#endif /* NO_DEVLIB_OLD_INTERFACE */
|
||||||
|
|
||||||
/*
|
|
||||||
* Some vxWorks convenience routines
|
|
||||||
*/
|
|
||||||
void bcopyLongs(char *source, char *destination, int nlongs);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -3,11 +3,13 @@
|
|||||||
* National Laboratory.
|
* National Laboratory.
|
||||||
* Copyright (c) 2002 The Regents of the University of California, as
|
* Copyright (c) 2002 The Regents of the University of California, as
|
||||||
* Operator of Los Alamos National Laboratory.
|
* Operator of Los Alamos National Laboratory.
|
||||||
* EPICS BASE Versions 3.13.7
|
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||||
* and higher are distributed subject to a Software License Agreement found
|
* in file LICENSE that is included with this distribution.
|
||||||
* in file LICENSE that is included with this distribution.
|
|
||||||
\*************************************************************************/
|
\*************************************************************************/
|
||||||
|
|
||||||
|
#ifndef INC_epicsSignal_H
|
||||||
|
#define INC_epicsSignal_H
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@ -44,3 +46,4 @@ epicsShareFunc void epicsShareAPI epicsSignalRaiseSigAlarm ( struct epicsThreadO
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* INC_epicsSignal_H */
|
||||||
|
@ -19,3 +19,5 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void bcopyLongs(char *source, char *destination, int nlongs);
|
||||||
|
46
src/libCom/osi/os/WIN32/osdFindSymbol.c
Normal file
46
src/libCom/osi/os/WIN32/osdFindSymbol.c
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/*************************************************************************\
|
||||||
|
* Copyright (c) 2013 Dirk Zimoch, PSI
|
||||||
|
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||||
|
* in file LICENSE that is included with this distribution.
|
||||||
|
\*************************************************************************/
|
||||||
|
/* osi/os/WIN32/epicsFindSymbol.c */
|
||||||
|
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
#define epicsExportSharedSymbols
|
||||||
|
#include "epicsFindSymbol.h"
|
||||||
|
|
||||||
|
static int epicsLoadErrorCode = 0;
|
||||||
|
|
||||||
|
epicsShareFunc void * epicsLoadLibrary(const char *name)
|
||||||
|
{
|
||||||
|
HMODULE lib;
|
||||||
|
|
||||||
|
epicsLoadErrorCode = 0;
|
||||||
|
lib = LoadLibrary(name);
|
||||||
|
if (lib == NULL)
|
||||||
|
{
|
||||||
|
epicsLoadErrorCode = GetLastError();
|
||||||
|
}
|
||||||
|
return lib;
|
||||||
|
}
|
||||||
|
|
||||||
|
epicsShareFunc const char *epicsLoadError(void)
|
||||||
|
{
|
||||||
|
static char buffer[100];
|
||||||
|
|
||||||
|
FormatMessage(
|
||||||
|
FORMAT_MESSAGE_FROM_SYSTEM,
|
||||||
|
NULL,
|
||||||
|
epicsLoadErrorCode,
|
||||||
|
0,
|
||||||
|
buffer,
|
||||||
|
sizeof(buffer)-1, NULL );
|
||||||
|
return buffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
epicsShareFunc void * epicsShareAPI epicsFindSymbol(const char *name)
|
||||||
|
{
|
||||||
|
return GetProcAddress(0, name);
|
||||||
|
}
|
@ -3,9 +3,8 @@
|
|||||||
* National Laboratory.
|
* National Laboratory.
|
||||||
* Copyright (c) 2002 The Regents of the University of California, as
|
* Copyright (c) 2002 The Regents of the University of California, as
|
||||||
* Operator of Los Alamos National Laboratory.
|
* Operator of Los Alamos National Laboratory.
|
||||||
* EPICS BASE Versions 3.13.7
|
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||||
* and higher are distributed subject to a Software License Agreement found
|
* in file LICENSE that is included with this distribution.
|
||||||
* in file LICENSE that is included with this distribution.
|
|
||||||
\*************************************************************************/
|
\*************************************************************************/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -248,10 +247,7 @@ static void epicsParmCleanupWIN32 ( win32ThreadParam * pParm )
|
|||||||
ellDelete ( & pGbl->threadList, & pParm->node );
|
ellDelete ( & pGbl->threadList, & pParm->node );
|
||||||
LeaveCriticalSection ( & pGbl->mutex );
|
LeaveCriticalSection ( & pGbl->mutex );
|
||||||
|
|
||||||
/* close the handle if its an implicit thread id */
|
CloseHandle ( pParm->handle );
|
||||||
if ( ! pParm->funptr ) {
|
|
||||||
CloseHandle ( pParm->handle );
|
|
||||||
}
|
|
||||||
free ( pParm );
|
free ( pParm );
|
||||||
TlsSetValue ( pGbl->tlsIndexThreadLibraryEPICS, 0 );
|
TlsSetValue ( pGbl->tlsIndexThreadLibraryEPICS, 0 );
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
/*************************************************************************\
|
/*************************************************************************\
|
||||||
* Copyright (c) 2002 The University of Chicago, as Operator of Argonne
|
* Copyright (c) 2013 UChicago Argonne LLC, as Operator of Argonne
|
||||||
* National Laboratory.
|
* National Laboratory.
|
||||||
* Copyright (c) 2002 The Regents of the University of California, as
|
* Copyright (c) 2002 The Regents of the University of California, as
|
||||||
* Operator of Los Alamos National Laboratory.
|
* Operator of Los Alamos National Laboratory.
|
||||||
* EPICS BASE Versions 3.13.7
|
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||||
* and higher are distributed subject to a Software License Agreement found
|
|
||||||
* in file LICENSE that is included with this distribution.
|
* in file LICENSE that is included with this distribution.
|
||||||
\*************************************************************************/
|
\*************************************************************************/
|
||||||
/* atReboot.cpp */
|
/* atReboot.cpp */
|
||||||
@ -16,34 +15,28 @@
|
|||||||
#include "epicsDynLink.h"
|
#include "epicsDynLink.h"
|
||||||
#include "epicsExit.h"
|
#include "epicsExit.h"
|
||||||
|
|
||||||
/* osdThread references atRebootExtern just to make this module load*/
|
extern "C" {
|
||||||
int atRebootExtern;
|
|
||||||
|
|
||||||
typedef int (*sysAtReboot_t)(void(func)(void));
|
typedef int (*sysAtReboot_t)(void(func)(void));
|
||||||
|
|
||||||
class atRebootRegister {
|
void atRebootRegister(void)
|
||||||
public:
|
|
||||||
atRebootRegister();
|
|
||||||
};
|
|
||||||
|
|
||||||
atRebootRegister::atRebootRegister()
|
|
||||||
{
|
{
|
||||||
STATUS status;
|
STATUS status;
|
||||||
sysAtReboot_t sysAtReboot;
|
sysAtReboot_t sysAtReboot;
|
||||||
SYM_TYPE type;
|
SYM_TYPE type;
|
||||||
|
|
||||||
status = symFindByNameEPICS(sysSymTbl, "_sysAtReboot",
|
status = symFindByNameEPICS(sysSymTbl, "_sysAtReboot",
|
||||||
(char **)&sysAtReboot, &type);
|
(char **)&sysAtReboot, &type);
|
||||||
if (status == OK) {
|
if (status == OK) {
|
||||||
status = sysAtReboot(epicsExitCallAtExits);
|
status = sysAtReboot(epicsExitCallAtExits);
|
||||||
if (status != OK) {
|
if (status != OK) {
|
||||||
printf("atReboot: sysAtReboot returned error %d\n", status);
|
printf("atReboot: sysAtReboot returned error %d\n", status);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
printf("BSP routine sysAtReboot() not found, epicsExit() will not be\n"
|
printf("BSP routine sysAtReboot() not found, epicsExit() will not be\n"
|
||||||
"called by reboot. For reduced functionality, call\n"
|
"called by reboot. For reduced functionality, call\n"
|
||||||
" rebootHookAdd(epicsExitCallAtExits)\n");
|
" rebootHookAdd(epicsExitCallAtExits)\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static atRebootRegister atRebootRegisterObj;
|
}
|
||||||
|
@ -52,12 +52,8 @@ static int *taskIdList = 0;
|
|||||||
int taskIdListSize = 0;
|
int taskIdListSize = 0;
|
||||||
static SEM_ID epicsThreadListMutex = 0;
|
static SEM_ID epicsThreadListMutex = 0;
|
||||||
|
|
||||||
/*The following forces atReboot to be loaded*/
|
/* This routine is found in atReboot.cpp */
|
||||||
extern int atRebootExtern;
|
extern void atRebootRegister(void);
|
||||||
static struct pext {
|
|
||||||
int *pExtern;
|
|
||||||
struct pext *pext;
|
|
||||||
} pext = {&atRebootExtern, &pext};
|
|
||||||
|
|
||||||
/* definitions for implementation of epicsThreadPrivate */
|
/* definitions for implementation of epicsThreadPrivate */
|
||||||
static void **papTSD = 0;
|
static void **papTSD = 0;
|
||||||
@ -93,6 +89,7 @@ static int getOssPriorityValue(unsigned int osiPriority)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define THREAD_SEM_FLAGS (SEM_DELETE_SAFE|SEM_INVERSION_SAFE|SEM_Q_PRIORITY)
|
||||||
static void epicsThreadInit(void)
|
static void epicsThreadInit(void)
|
||||||
{
|
{
|
||||||
static int lock = 0;
|
static int lock = 0;
|
||||||
@ -104,13 +101,14 @@ static void epicsThreadInit(void)
|
|||||||
taskDelay(1);
|
taskDelay(1);
|
||||||
|
|
||||||
if (!done) {
|
if (!done) {
|
||||||
epicsThreadOnceMutex = semMCreate(SEM_DELETE_SAFE|SEM_INVERSION_SAFE|SEM_Q_PRIORITY);
|
epicsThreadOnceMutex = semMCreate(THREAD_SEM_FLAGS);
|
||||||
assert(epicsThreadOnceMutex);
|
assert(epicsThreadOnceMutex);
|
||||||
epicsThreadListMutex = semMCreate(SEM_DELETE_SAFE|SEM_INVERSION_SAFE|SEM_Q_PRIORITY);
|
epicsThreadListMutex = semMCreate(THREAD_SEM_FLAGS);
|
||||||
assert(epicsThreadListMutex);
|
assert(epicsThreadListMutex);
|
||||||
taskIdList = calloc(ID_LIST_CHUNK, sizeof(int));
|
taskIdList = calloc(ID_LIST_CHUNK, sizeof(int));
|
||||||
assert(taskIdList);
|
assert(taskIdList);
|
||||||
taskIdListSize = ID_LIST_CHUNK;
|
taskIdListSize = ID_LIST_CHUNK;
|
||||||
|
atRebootRegister();
|
||||||
done = 1;
|
done = 1;
|
||||||
}
|
}
|
||||||
lock = 0;
|
lock = 0;
|
||||||
|
@ -67,14 +67,18 @@ void osdNTPReport(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// vxWorks localtime_r interface does not match POSIX standards
|
// vxWorks localtime_r returns different things in different versions.
|
||||||
|
// It can't fail though, so we just ignore the return value.
|
||||||
int epicsTime_localtime(const time_t *clock, struct tm *result)
|
int epicsTime_localtime(const time_t *clock, struct tm *result)
|
||||||
{
|
{
|
||||||
return localtime_r(clock, result) == OK ? epicsTimeOK : epicsTimeERROR;
|
localtime_r(clock, result);
|
||||||
|
return epicsTimeOK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// vxWorks gmtime_r interface does not match POSIX standards
|
// vxWorks gmtime_r returns different things in different versions.
|
||||||
|
// It can't fail though, so we just ignore the return value.
|
||||||
int epicsTime_gmtime ( const time_t *pAnsiTime, struct tm *pTM )
|
int epicsTime_gmtime ( const time_t *pAnsiTime, struct tm *pTM )
|
||||||
{
|
{
|
||||||
return gmtime_r(pAnsiTime, pTM) == OK ? epicsTimeOK : epicsTimeERROR;
|
gmtime_r(pAnsiTime, pTM);
|
||||||
|
return epicsTimeOK;
|
||||||
}
|
}
|
||||||
|
@ -3,11 +3,13 @@
|
|||||||
* National Laboratory.
|
* National Laboratory.
|
||||||
* Copyright (c) 2002 The Regents of the University of California, as
|
* Copyright (c) 2002 The Regents of the University of California, as
|
||||||
* Operator of Los Alamos National Laboratory.
|
* Operator of Los Alamos National Laboratory.
|
||||||
* EPICS BASE Versions 3.13.7
|
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||||
* and higher are distributed subject to a Software License Agreement found
|
* in file LICENSE that is included with this distribution.
|
||||||
* in file LICENSE that is included with this distribution.
|
|
||||||
\*************************************************************************/
|
\*************************************************************************/
|
||||||
|
|
||||||
|
#ifndef INC_osiPoolStatus_H
|
||||||
|
#define INC_osiPoolStatus_H
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Revision-Id$
|
* $Revision-Id$
|
||||||
*
|
*
|
||||||
@ -39,3 +41,4 @@ epicsShareFunc int epicsShareAPI osiSufficentSpaceInPool ( size_t contiguousBloc
|
|||||||
|
|
||||||
#include "osdPoolStatus.h"
|
#include "osdPoolStatus.h"
|
||||||
|
|
||||||
|
#endif /* INC_osiPoolStatus_H */
|
||||||
|
@ -3,11 +3,13 @@
|
|||||||
* National Laboratory.
|
* National Laboratory.
|
||||||
* Copyright (c) 2002 The Regents of the University of California, as
|
* Copyright (c) 2002 The Regents of the University of California, as
|
||||||
* Operator of Los Alamos National Laboratory.
|
* Operator of Los Alamos National Laboratory.
|
||||||
* EPICS BASE Versions 3.13.7
|
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||||
* and higher are distributed subject to a Software License Agreement found
|
* in file LICENSE that is included with this distribution.
|
||||||
* in file LICENSE that is included with this distribution.
|
|
||||||
\*************************************************************************/
|
\*************************************************************************/
|
||||||
|
|
||||||
|
#ifndef INC_osiProcess_H
|
||||||
|
#define INC_osiProcess_H
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Revision-Id$
|
* $Revision-Id$
|
||||||
*
|
*
|
||||||
@ -44,3 +46,4 @@ epicsShareFunc osiSpawnDetachedProcessReturn epicsShareAPI osiSpawnDetachedProce
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* INC_osiProcess_H */
|
||||||
|
@ -48,17 +48,23 @@ MAIN(epicsTimeTest)
|
|||||||
const int wasteTime = 100000;
|
const int wasteTime = 100000;
|
||||||
const int nTimes = 10;
|
const int nTimes = 10;
|
||||||
|
|
||||||
testPlan(16 + nTimes * 18);
|
testPlan(12 + nTimes * 18);
|
||||||
|
|
||||||
{
|
try {
|
||||||
const epicsTimeStamp epochTS = {0, 0};
|
const epicsTimeStamp epochTS = {0, 0};
|
||||||
epicsTime epochET = epochTS;
|
epicsTime epochET = epochTS;
|
||||||
struct gm_tm_nano_sec epicsEpoch = epochET;
|
struct gm_tm_nano_sec epicsEpoch = epochET;
|
||||||
testOk1(epicsEpoch.ansi_tm.tm_sec == 0);
|
|
||||||
testOk1(epicsEpoch.ansi_tm.tm_min == 0);
|
testOk(epicsEpoch.ansi_tm.tm_sec == 0 &&
|
||||||
testOk1(epicsEpoch.ansi_tm.tm_hour == 0);
|
epicsEpoch.ansi_tm.tm_min == 0 &&
|
||||||
testOk1(epicsEpoch.ansi_tm.tm_yday == 0);
|
epicsEpoch.ansi_tm.tm_hour == 0 &&
|
||||||
testOk1(epicsEpoch.ansi_tm.tm_year == 90);
|
epicsEpoch.ansi_tm.tm_yday == 0 &&
|
||||||
|
epicsEpoch.ansi_tm.tm_year == 90,
|
||||||
|
"epicsTime_gmtime() for EPICS epoch");
|
||||||
|
}
|
||||||
|
catch ( ... ) {
|
||||||
|
testFail("epicsTime_gmtime() failed");
|
||||||
|
testAbort("Can't continue, check your OS!");
|
||||||
}
|
}
|
||||||
|
|
||||||
{ // badNanosecTest
|
{ // badNanosecTest
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env perl
|
#!/usr/bin/env perl
|
||||||
#*************************************************************************
|
#*************************************************************************
|
||||||
# Copyright (c) 2010 UChicago Argonne LLC, as Operator of Argonne
|
# Copyright (c) 2013 UChicago Argonne LLC, as Operator of Argonne
|
||||||
# National Laboratory.
|
# National Laboratory.
|
||||||
# Copyright (c) 2002 The Regents of the University of California, as
|
# Copyright (c) 2002 The Regents of the University of California, as
|
||||||
# Operator of Los Alamos National Laboratory.
|
# Operator of Los Alamos National Laboratory.
|
||||||
@ -24,6 +24,9 @@ $Getopt::Std::OUTPUT_HELP_VERSION = 1;
|
|||||||
# Is exception handler frame info required?
|
# Is exception handler frame info required?
|
||||||
my $need_eh_frame = 0;
|
my $need_eh_frame = 0;
|
||||||
|
|
||||||
|
# Is module destructor needed?
|
||||||
|
my $need_mod_dtor = 0;
|
||||||
|
|
||||||
# Constructor and destructor names:
|
# Constructor and destructor names:
|
||||||
# Array contains names from input file.
|
# Array contains names from input file.
|
||||||
# Hash is used to skip duplicate names.
|
# Hash is used to skip duplicate names.
|
||||||
@ -34,6 +37,7 @@ while (<>)
|
|||||||
{
|
{
|
||||||
chomp;
|
chomp;
|
||||||
$need_eh_frame++ if m/__? gxx_personality_v [0-9]/x;
|
$need_eh_frame++ if m/__? gxx_personality_v [0-9]/x;
|
||||||
|
$need_mod_dtor++ if m/__? cxa_atexit $/x;
|
||||||
next if m/__? GLOBAL_. (F | I._GLOBAL_.D) .+/x;
|
next if m/__? GLOBAL_. (F | I._GLOBAL_.D) .+/x;
|
||||||
if (m/__? GLOBAL_ . D .+/x) {
|
if (m/__? GLOBAL_ . D .+/x) {
|
||||||
my ($addr, $type, $name) = split ' ', $_, 3;
|
my ($addr, $type, $name) = split ' ', $_, 3;
|
||||||
@ -55,8 +59,11 @@ push my @out,
|
|||||||
'',
|
'',
|
||||||
'/* Declarations */',
|
'/* Declarations */',
|
||||||
(map {cDecl($_)} @ctors, @dtors),
|
(map {cDecl($_)} @ctors, @dtors),
|
||||||
|
'',
|
||||||
|
'char __dso_handle = 0;',
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
moduleDestructor() if $need_mod_dtor;
|
||||||
exceptionHandlerFrame() if $need_eh_frame;
|
exceptionHandlerFrame() if $need_eh_frame;
|
||||||
|
|
||||||
push @out,
|
push @out,
|
||||||
@ -81,6 +88,19 @@ if ($opt_o) {
|
|||||||
print join "\n", @out;
|
print join "\n", @out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Outputs the C code for registering a module destructor
|
||||||
|
sub moduleDestructor {
|
||||||
|
my $mod_dtor = 'mod_dtor';
|
||||||
|
push @dtors, $mod_dtor;
|
||||||
|
push @out,
|
||||||
|
'/* Module destructor */',
|
||||||
|
"static void $mod_dtor(void) {",
|
||||||
|
' extern void __cxa_finalize(void *);',
|
||||||
|
'',
|
||||||
|
' __cxa_finalize(&__dso_handle);',
|
||||||
|
'}',
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
||||||
# Outputs the C code for registering exception handler frame info
|
# Outputs the C code for registering exception handler frame info
|
||||||
sub exceptionHandlerFrame {
|
sub exceptionHandlerFrame {
|
||||||
@ -97,7 +117,11 @@ sub exceptionHandlerFrame {
|
|||||||
'',
|
'',
|
||||||
"static void $eh_ctor(void) {",
|
"static void $eh_ctor(void) {",
|
||||||
' extern void __register_frame_info (const void *, void *);',
|
' extern void __register_frame_info (const void *, void *);',
|
||||||
' static struct { unsigned pad[8]; } object;',
|
' static struct {',
|
||||||
|
' void *a, *b, *c, *d;',
|
||||||
|
' unsigned long e;',
|
||||||
|
' void *f, *g;',
|
||||||
|
' } object;',
|
||||||
'',
|
'',
|
||||||
' __register_frame_info(__EH_FRAME_BEGIN__, &object);',
|
' __register_frame_info(__EH_FRAME_BEGIN__, &object);',
|
||||||
'}',
|
'}',
|
||||||
@ -108,7 +132,6 @@ sub exceptionHandlerFrame {
|
|||||||
' __deregister_frame_info(__EH_FRAME_BEGIN__);',
|
' __deregister_frame_info(__EH_FRAME_BEGIN__);',
|
||||||
'}',
|
'}',
|
||||||
'';
|
'';
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub cName {
|
sub cName {
|
||||||
|
Reference in New Issue
Block a user