本文整理汇总了C++中OS_REPORT函数的典型用法代码示例。如果您正苦于以下问题:C++ OS_REPORT函数的具体用法?C++ OS_REPORT怎么用?C++ OS_REPORT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OS_REPORT函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: v_handleServerResume
void
v_handleServerResume(
v_handleServer server)
{
if (server == NULL) {
OS_REPORT(OS_ERROR,"Kernel HandleServer",0,
"v_handleServerResume: no server specified");
} else {
server->suspended = FALSE;
OS_REPORT(OS_WARNING,"Kernel HandleServer",0,"v_handleServer is resumed.");
}
}
开发者ID:xrl,项目名称:opensplice_dds,代码行数:12,代码来源:v_handle.c
示例2: v_handleServerSuspend
void
v_handleServerSuspend(
v_handleServer server)
{
if (server == NULL) {
OS_REPORT(OS_ERROR,"Kernel HandleServer",0,
"v_handleServerSuspend: no server specified");
} else {
server->suspended = TRUE;
OS_REPORT(OS_WARNING,"Kernel HandleServer",0,"v_handleServer is suspended.");
}
}
开发者ID:xrl,项目名称:opensplice_dds,代码行数:12,代码来源:v_handle.c
示例3: v_handleServerClaims
c_long
v_handleServerClaims(
v_handleServer server)
{
if (server == NULL) {
OS_REPORT(OS_ERROR,"Kernel HandleServer",0,
"v_handleServerClaims: no server specified");
}
OS_REPORT(OS_WARNING,"Kernel HandleServer",0,
"v_handleServerClaims not yet implemented");
return 0;
}
开发者ID:xrl,项目名称:opensplice_dds,代码行数:12,代码来源:v_handle.c
示例4: u_topicNew
u_topic
u_topicNew(
const u_participant p,
const os_char *name,
const os_char *typeName,
const os_char *keyList,
u_topicQos qos)
{
u_topic _this = NULL;
v_topicAdapter kt;
v_participant kp;
u_result result;
assert(name != NULL);
assert(typeName != NULL);
assert(p != NULL);
result = u_observableWriteClaim(u_observable(p),(v_public *)(&kp), C_MM_RESERVATION_HIGH);
if (result == U_RESULT_OK) {
assert(kp);
kt = v_topicAdapterNew(kp,name,typeName,keyList,qos);
if (kt != NULL) {
_this = u_objectAlloc(sizeof(*_this), U_TOPIC, u__topicDeinitW, u__topicFreeW);
if (_this != NULL) {
result = u_topicInit(_this,name,kt,p);
if (result != U_RESULT_OK) {
OS_REPORT(OS_ERROR, "u_topicNew", result,
"Initialisation failed. "
"For Topic: <%s>", name);
u_objectFree (u_object (_this));
_this = NULL;
}
} else {
OS_REPORT(OS_ERROR, "u_topicNew", U_RESULT_OUT_OF_MEMORY,
"Create user proxy failed. "
"For Topic: <%s>", name);
}
c_free(kt);
} else {
OS_REPORT(OS_WARNING, "u_topicNew", U_RESULT_OUT_OF_MEMORY,
"Create kernel entity failed. "
"For Topic: <%s>", name);
}
u_observableRelease(u_observable(p), C_MM_RESERVATION_HIGH);
} else {
OS_REPORT(OS_WARNING, "u_topicNew", U_RESULT_INTERNAL_ERROR,
"Claim Kernel failed. "
"For Topic: <%s>", name);
}
return _this;
}
开发者ID:osrf,项目名称:opensplice,代码行数:51,代码来源:u_topic.c
示例5: u_dispatcherRemoveListener
u_result
u_dispatcherRemoveListener(
u_dispatcher _this,
u_dispatcherListener listener)
{
u_listener ul;
v_observer ko;
os_threadId tid;
u_result result = U_RESULT_OK;
struct compareArg arg;
if ((_this != NULL) && (listener != NULL)) {
os_mutexLock(&_this->mutex);
arg.listener = listener;
ul = (u_listener) c_iterResolve(_this->listeners, compare, &arg);
tid = _this->threadId;
if (ul != NULL) {
c_iterTake(_this->listeners, ul);
if (c_iterLength(_this->listeners) == 0) {
result = u_entityReadClaim(u_entity(_this), (v_entity*)(&ko));
if(result == U_RESULT_OK) {
assert(ko);
/* Wakeup the dispatch thread */
v_observerLock(ko);
v_observerNotify(ko, NULL, NULL);
v_observerUnlock(ko);
result = u_entityRelease(u_entity(_this));
if (result != U_RESULT_OK) {
OS_REPORT(OS_ERROR, "u_dispatcherRemoveListener", 0,
"Release observer failed.");
}
} else {
OS_REPORT(OS_WARNING, "u_dispatcherRemoveListener", 0,
"Failed to claim Dispatcher.");
}
}
u_listenerFree(ul);
}
os_mutexUnlock(&_this->mutex);
if ((c_iterLength(_this->listeners) == 0)
&& (os_threadIdToInteger(tid) != 0U)) {
os_threadWaitExit(tid, NULL);
}
} else {
OS_REPORT(OS_ERROR,"u_dispatcherInsertListener",0,
"Illegal parameter.");
result = U_RESULT_ILL_PARAM;
}
return result;
}
开发者ID:S73417H,项目名称:opensplice,代码行数:50,代码来源:u_dispatcher.c
示例6: u_dispatcherInsertListener
u_result
u_dispatcherInsertListener(
u_dispatcher _this,
u_dispatcherListener listener,
c_voidp userData)
{
u_listener ul;
os_threadAttr attr;
v_observer ke;
u_result result = U_RESULT_OK;
c_char *name;
if ((_this != NULL) && (listener != NULL)) {
os_mutexLock(&_this->mutex);
ul = u_listenerNew(listener,userData);
_this->listeners = c_iterInsert(_this->listeners,ul);
if (os_threadIdToInteger(_this->threadId) == 0U) {
result = u_entityReadClaim(u_entity(_this), (v_entity*)(&ke));
if(result == U_RESULT_OK) {
assert(ke);
name = v_entityName(ke);
if (name == NULL) {
name = "NoName";
}
os_threadAttrInit(&attr);
os_threadCreate(&_this->threadId,
name,
&attr,dispatch,
(void *)_this);
result = u_entityRelease(u_entity(_this));
if (result != U_RESULT_OK) {
OS_REPORT(OS_ERROR, "u_dispatcherInsertListener", 0,
"Release observer failed.");
}
} else {
OS_REPORT(OS_WARNING, "u_dispatcherInsertListener", 0,
"Failed to claim Dispatcher.");
}
}
u_entityEnable(u_entity(_this));
os_mutexUnlock(&_this->mutex);
} else {
OS_REPORT(OS_ERROR,"u_dispatcherInsertListener",0,
"Illegal parameter.");
result = U_RESULT_ILL_PARAM;
}
return result;
}
开发者ID:S73417H,项目名称:opensplice,代码行数:50,代码来源:u_dispatcher.c
示例7: u__waitsetDeinitW
static u_result
u__waitsetDeinitW(
void *_vthis)
{
u_waitset _this;
u_waitsetEntry entry;
u_result result = U_RESULT_OK;
_this = u_waitset(_vthis);
os_mutexLock(&_this->mutex);
_this->alive = FALSE;
while (_this->waitBusy) {
waitset_notify(_this, NULL);
os_condWait(&_this->waitCv, &_this->mutex);
}
entry = c_iterTakeFirst(_this->entries);
while (entry != NULL) {
u_domain domain = u_observableDomain(u_observable(entry));
result = u_domainRemoveWaitset(domain, _this);
if (result != U_RESULT_OK) {
OS_REPORT(OS_ERROR,
"u__waitsetDeinitW", result,
"Operation u_domainRemoveWaitset failed: "
"Waitset = 0x%"PA_PRIxADDR", result = %s",
(os_address)_this, u_resultImage(result));
assert(FALSE);
}
result = u_objectFree_s(entry);
if (result == U_RESULT_ALREADY_DELETED) {
result = U_RESULT_OK;
} else if (result != U_RESULT_OK) {
OS_REPORT(OS_ERROR,
"u__waitsetDeinitW", result,
"Operation u_waitsetEntryFree failed: "
"Waitset = 0x%"PA_PRIxADDR", result = %s",
(os_address)_this, u_resultImage(result));
result = U_RESULT_OK;
(void)result;
assert(FALSE);
}
entry = c_iterTakeFirst(_this->entries);
}
c_iterFree(_this->entries);
_this->entries = NULL;
os_mutexUnlock(&_this->mutex);
u__objectDeinitW(_this);
return result;
}
开发者ID:osrf,项目名称:opensplice,代码行数:50,代码来源:u_waitset.c
示例8: v_serviceChangeState
c_bool
v_serviceChangeState(
v_service service,
v_serviceStateKind newState)
{
c_bool result;
assert(service != NULL);
assert(C_TYPECHECK(service, v_service));
assert(service->state != NULL);
assert(C_TYPECHECK(service->state, v_serviceState));
result = v_serviceStateChangeState(service->state, newState);
if(result)
{
switch(newState)
{
case STATE_OPERATIONAL:
OS_REPORT(OS_INFO, "v_serviceChangeState", 0,
"++++++++++++++++++++++++++++++++++++++++++++++++" OS_REPORT_NL
"++ The service '%s' is now operational. " OS_REPORT_NL
"++++++++++++++++++++++++++++++++++++++++++++++++",
v_serviceGetName(service));
break;
case STATE_TERMINATED:
OS_REPORT(OS_INFO, "v_serviceChangeState", 0,
"================================================" OS_REPORT_NL
"== The service '%s' has now terminated. "OS_REPORT_NL
"================================================",
v_serviceGetName(service));
break;
case STATE_DIED:
OS_REPORT(OS_INFO, "v_serviceChangeState", 0,
"================================================" OS_REPORT_NL
"== The service '%s' has died. "OS_REPORT_NL
"================================================",
v_serviceGetName(service));
break;
case STATE_NONE:
case STATE_INITIALISING:
case STATE_TERMINATING:
case STATE_INCOMPATIBLE_CONFIGURATION:
default:
/* ignore */
break;
}
}
return result;
}
开发者ID:osrf,项目名称:opensplice,代码行数:49,代码来源:v_service.c
示例9: u_waitsetDetachFromDomain
u_result
u_waitsetDetachFromDomain(
_Inout_ u_waitset _this,
_Inout_ u_domain domain)
{
u_result result;
os_result osr;
u_waitsetEntry entry;
assert(_this != NULL);
assert(domain != NULL);
osr = os_mutexLock_s(&_this->mutex);
if (osr == os_resultSuccess) {
entry = c_iterResolve(_this->entries, compare_domain, domain);
if (entry != NULL) {
_this->notifyDetached = OS_TRUE;
result = u_objectClose(entry);
if (result == U_RESULT_ALREADY_DELETED) {
result = U_RESULT_OK;
}
if (result == U_RESULT_OK) {
/* The entry is already freed but the address value can still
* be used to update the administration because it only removes
* the address value from the list.
*/
c_iterTake(_this->entries, entry);
} else {
result = U_RESULT_INTERNAL_ERROR;
OS_REPORT(OS_ERROR,
"u_waitsetDetachFromDomain", result,
"Operation u_waitsetEntryFree failed: "
"Waitset = 0x%"PA_PRIxADDR", result = %s",
(os_address)_this, u_resultImage(result));
assert(FALSE);
}
} else {
result = U_RESULT_PRECONDITION_NOT_MET;
}
(void)u_domainRemoveWaitset(domain, _this);
os_mutexUnlock(&_this->mutex);
} else {
result = U_RESULT_INTERNAL_ERROR;
OS_REPORT(OS_WARNING, "u_waitsetDetachFromDomain", result,
"Could not claim waitset.");
}
return result;
}
开发者ID:osrf,项目名称:opensplice,代码行数:49,代码来源:u_waitset.c
示例10: os_posix_sharedMemoryCreate
/** \brief Create a named shared memory area based upon
* POSIX shared memory object
*
* \b os_posix_sharedMemoryCreate gets a database file name for \b name
* by calling \b os_posix_getShmObjName.
*
* When the file already exists, an error is returned.
* Otherwise the file is created with \b shm_open and it's size is set according
* the required database size by calling \b ftruncate.
*
* User credentials are taken into account by setting the correct ownership
* by calling \b chown.
*/
os_result
os_posix_sharedMemoryCreate (
const char *name,
os_sharedAttr *sharedAttr,
os_address size)
{
char *shmname;
int shmfd;
os_result rv = os_resultSuccess;
assert (name != NULL);
assert (sharedAttr != NULL);
/* roundup to page boundaries */
shmname = os_posix_getShmObjName (name, sharedAttr->map_address, size, name);
if (shmname != NULL) {
shmfd = shm_open (shmname, O_CREAT | O_RDWR | O_EXCL, OS_PERMISSION);
if (shmfd == -1) {
OS_REPORT (OS_WARNING, "os_posix_sharedMemoryCreate", 1, "shm_open failed with error %d (%s)", os_getErrno(), name);
rv = os_resultFail;
} else {
#ifdef INTEGRITY
if ( size % getpagesize() != 0 ) {
size += getpagesize() - ( size % getpagesize() );
}
#endif
if (ftruncate (shmfd, size) == -1) {
OS_REPORT (OS_ERROR, "os_posix_sharedMemoryCreate", 1,
"ftruncate failed with error %d (%s)", os_getErrno(), name);
close (shmfd);
rv = os_resultFail;
} else {
if (sharedAttr->userCred.uid != 0 && sharedAttr->userCred.gid != 0) {
if (getuid() == 0 || geteuid() == 0) {
if (chown (shmname, sharedAttr->userCred.uid, sharedAttr->userCred.gid) == -1) {
OS_REPORT (OS_WARNING, "os_posix_sharedMemoryCreate", 1,
"chown failed with error %d (%s)", os_getErrno(), name);
}
} else {
OS_REPORT (OS_WARNING, "os_posix_sharedMemoryCreate", 2,
"Can not change ownership because of privilege problems (%s)", name);
}
}
}
}
close (shmfd);
os_free (shmname);
}
return rv;
}
开发者ID:osrf,项目名称:opensplice,代码行数:62,代码来源:os_sharedmem_file.c
示例11: gapi_domainParticipant_lookup_topicdescription
DDS::TopicDescription_ptr
DDS::DomainParticipant_impl::unprotected_lookup_topicdescription (
const char * name
)
{
gapi_topic handle;
DDS::ccpp_UserData_ptr myUD;
DDS::TopicDescription_ptr result = NULL;
handle = gapi_domainParticipant_lookup_topicdescription(_gapi_self, name);
if (handle)
{
myUD = dynamic_cast<DDS::ccpp_UserData_ptr>((DDS::Object *)gapi_object_get_user_data(handle));
if (myUD)
{
result = dynamic_cast<DDS::TopicDescription_impl_ptr>(myUD->ccpp_object);
if (result)
{
DDS::TopicDescription::_duplicate(result);
}
else
{
OS_REPORT(OS_ERROR, "CCPP", 0, "Invalid Topic Description");
}
}
else
{
// If handle is found in GAPI, but has no UserData, then it has to be a builtin Topic.
// That's how we know that a Topic_impl wrapper needs to be instantiated in this case.
result = new DDS::Topic_impl(handle);
if (result)
{
DDS::ccpp_UserData_ptr myUD;
myUD = new DDS::ccpp_UserData(result, NULL);
if (myUD)
{
gapi_object_set_user_data(handle, (DDS::Object *)myUD,
ccpp_CallBack_DeleteUserData,NULL);
}
else
{
OS_REPORT(OS_ERROR, "CCPP", 0, "Unable to allocate memory");
}
}
}
}
return result;
}
开发者ID:S73417H,项目名称:opensplice,代码行数:49,代码来源:ccpp_DomainParticipant_impl.cpp
示例12: d_groupInfoNew
d_groupInfo
d_groupInfoNew (
const d_storeMMFKernel kernel,
const d_topicInfo topic,
const d_group dgroup)
{
d_groupInfo group;
c_base base;
c_char* partition;
c_type instanceType, groupInfoType;
c_char *keyExpr;
if(kernel && topic && dgroup){
base = c_getBase(kernel);
groupInfoType = c_resolve(base,"durabilityModule2::d_groupInfo");
group = d_groupInfo(c_new(groupInfoType));
c_free(groupInfoType);
if (group) {
group->kernel = kernel; /* Unmanaged pointer */
group->topic = c_keep(topic);
partition = d_groupGetPartition(dgroup);
group->partition = c_stringNew(base, partition);
os_free(partition);
group->quality = d_groupGetQuality(dgroup);
group->completeness = d_groupGetCompleteness(dgroup);
instanceType = d_topicInfoGetInstanceType(topic);
keyExpr = d_topicInfoGetInstanceKeyExpr(topic);
group->instances = c_tableNew(instanceType, keyExpr);
c_free(keyExpr);
c_free(instanceType);
} else {
OS_REPORT(OS_ERROR,
"d_groupInfoNew",0,
"Failed to allocate d_groupInfo.");
assert(FALSE);
group = NULL;
}
} else {
OS_REPORT(OS_ERROR,
"d_groupInfoNew",0,
"Illegal constructor parameter.");
group = NULL;
}
return group;
}
开发者ID:diorahman,项目名称:opensplice,代码行数:49,代码来源:d_groupInfo.c
示例13: u_topicNewFromTopicInfo
u_topic
u_topicNewFromTopicInfo(
u_participant p,
const struct v_topicInfo *info,
c_bool announce)
{
u_topic _this = NULL;
v_topicAdapter kt;
v_participant kp;
u_result result;
assert (p);
assert (info);
result = u_observableWriteClaim(u_observable(p),(v_public*)(&kp), C_MM_RESERVATION_LOW);
if (result == U_RESULT_OK) {
assert(kp);
kt = v_topicAdapterNewFromTopicInfo(kp,info,announce);
if (kt != NULL) {
_this = u_objectAlloc(sizeof(*_this), U_TOPIC, u__topicDeinitW, u__topicFreeW);
if (_this != NULL) {
result = u_topicInit(_this,info->name,kt,p);
if (result != U_RESULT_OK) {
OS_REPORT(OS_ERROR, "u_topicNew", result,
"Initialisation failed. "
"For Topic: <%s>", info->name);
u_objectFree (u_object (_this));
_this = NULL;
}
} else {
OS_REPORT(OS_ERROR, "u_topicNew", U_RESULT_OUT_OF_MEMORY,
"Create user proxy failed. "
"For Topic: <%s>", info->name);
}
c_free(kt);
} else {
OS_REPORT(OS_WARNING, "u_topicNewFromTopicInfo", U_RESULT_OUT_OF_MEMORY,
"Create kernel entity failed. "
"For Topic: <%s>", info->name);
}
u_observableRelease(u_observable(p),C_MM_RESERVATION_LOW);
} else {
OS_REPORT(OS_WARNING, "u_topicNewFromTopicInfo", U_RESULT_INTERNAL_ERROR,
"Claim Kernel failed. "
"For Topic: <%s>", info->name);
}
return _this;
}
开发者ID:osrf,项目名称:opensplice,代码行数:48,代码来源:u_topic.c
示例14: __chromatic_imap_dds_chromatic_imap_command__copyIn
c_bool
__chromatic_imap_dds_chromatic_imap_command__copyIn(
c_base base,
struct ::chromatic_imap_dds::chromatic_imap_command *from,
struct _chromatic_imap_dds_chromatic_imap_command *to)
{
c_bool result = OS_C_TRUE;
(void) base;
to->session_idx = (c_long)from->session_idx;
to->locale_idx = (c_long)from->locale_idx;
#ifdef OSPL_BOUNDS_CHECK
if(from->moniker){
to->moniker = c_stringNew(base, from->moniker);
} else {
OS_REPORT (OS_ERROR, "copyIn", 0,"Member 'chromatic_imap_dds::chromatic_imap_command.moniker' of type 'c_string' is NULL.");
result = OS_C_FALSE;
}
#else
to->moniker = c_stringNew(base, from->moniker);
#endif
#ifdef OSPL_BOUNDS_CHECK
if(from->command){
if(((unsigned int)strlen(from->command)) <= 32){
to->command = c_stringNew(base, from->command);
} else {
OS_REPORT (OS_ERROR, "copyIn", 0,"Member 'chromatic_imap_dds::chromatic_imap_command.command' of type 'C_STRING<32>' is out of range.");
result = OS_C_FALSE;
}
} else {
OS_REPORT (OS_ERROR, "copyIn", 0,"Member 'chromatic_imap_dds::chromatic_imap_command.command' of type 'C_STRING<32>' is NULL.");
result = OS_C_FALSE;
}
#else
to->command = c_stringNew(base, from->command);
#endif
#ifdef OSPL_BOUNDS_CHECK
if(from->payload){
to->payload = c_stringNew(base, from->payload);
} else {
OS_REPORT (OS_ERROR, "copyIn", 0,"Member 'chromatic_imap_dds::chromatic_imap_command.payload' of type 'c_string' is NULL.");
result = OS_C_FALSE;
}
#else
to->payload = c_stringNew(base, from->payload);
#endif
return result;
}
开发者ID:chromatic-universe,项目名称:cci-llvm-clang-cpp,代码行数:48,代码来源:chromatic_imap_ddsSplDcps.cpp
示例15: u_serviceDeinit
u_result
u_serviceDeinit(
u_service service)
{
u_result r;
watchSplicedAdmin admin;
if (service != NULL) {
u_dispatcherRemoveListener(u_dispatcher(service),
u_serviceSpliceListener);
admin = watchSplicedAdmin(service->privateData);
if (admin) {
admin->callback = NULL;
admin->usrData = NULL;
if (admin->serviceManager != NULL) {
u_serviceManagerFree(admin->serviceManager);
}
os_free(admin);
}
service->privateData = NULL;
r = u_participantDeinit(u_participant(service));
} else {
OS_REPORT(OS_ERROR,"u_serviceDeinit",0,
"Illegal parameter.");
r = U_RESULT_ILL_PARAM;
}
return r;
}
开发者ID:S73417H,项目名称:opensplice,代码行数:28,代码来源:u_service.c
示例16: v_publicDispose
void
v_publicDispose(
v_public o)
{
assert(C_TYPECHECK(o,v_public));
if (o == NULL) {
return;
}
switch(v_objectKind(o)) {
case K_PARTICIPANT: v_participantDeinit(v_participant(o)); break;
case K_PUBLISHER: v_publisherDeinit(v_publisher(o)); break;
case K_SUBSCRIBER: v_subscriberDeinit(v_subscriber(o)); break;
case K_WRITER: v_writerDeinit(v_writer(o)); break;
case K_DATAREADER: v_dataReaderDeinit(v_dataReader(o)); break;
case K_DELIVERYSERVICE:v_deliveryServiceDeinit(v_deliveryService(o)); break;
case K_NETWORKREADER: v_networkReaderDeinit(v_networkReader(o)); break;
case K_READER: v_readerDeinit(v_reader(o)); break;
case K_GROUPQUEUE: v_groupQueueDeinit(v_groupQueue(o)); break;
case K_TOPIC: v_topicDeinit(v_topic(o)); break;
case K_ENTITY: break;
case K_DOMAIN: v_partitionDeinit(v_partition(o)); break;
case K_GROUP: v_groupDeinit(v_group(o)); break;
case K_SERVICEMANAGER: /* Is never freed! */ break;
case K_SPLICED: v_splicedDeinit(v_spliced(o)); break;
case K_NETWORKING:
case K_DURABILITY:
case K_CMSOAP:
case K_SERVICE: v_serviceDeinit(v_service(o)); break;
case K_SERVICESTATE: /* Is never freed! */ break;
case K_CONFIGURATION: break;
case K_QUERY:
OS_REPORT(OS_ERROR, "v_publicDispose failure",
0, "deinit of abstract class K_QUERY");
break;
case K_DATAREADERQUERY:
v_dataReaderQueryDeinit(v_dataReaderQuery(o));
break;
case K_DATAVIEWQUERY:
v_dataViewQueryDeinit(v_dataViewQuery(o));
break;
case K_DATAVIEW: v_dataViewDeinit(v_dataView(o)); break;
case K_WAITSET: v_waitsetDeinit(v_waitset(o)); break;
case K_WRITERINSTANCE:
v_writerInstanceDeinit(v_writerInstance(o));
break;
case K_DATAREADERINSTANCE:
v_dataReaderInstanceDeinit(v_dataReaderInstance(o));
break;
case K_DATAVIEWINSTANCE:
v_dataViewInstanceDeinit(v_dataViewInstance(o));
break;
default:
OS_REPORT_1(OS_ERROR,"v_publicDispose failed",0,
"illegal entity kind (%d) specified",v_objectKind(o));
assert(FALSE);
break;
}
c_free(o);
}
开发者ID:xrl,项目名称:opensplice_dds,代码行数:60,代码来源:v_public.c
示例17: issueLowMemoryWarning
static void
issueLowMemoryWarning(
c_voidp arg)
{
#ifdef DDS_1958_CANNOT_CALL_REGISTERED_FUNC_PTR_FROM_DIFF_PROCESS
os_uint32 warningCount;
v_handleServer server;
server = v_handleServer(arg);
/* dds1958: ES: Check if the warning count is 0 at the moment. If so it
* means that no warning has been issued. If the value is not 0 however
* then we do not need to continue and do not need to do any increment
* and safe out on that code in situations where we get the low memory
* warning a lot. The idea is that just doing this check (although not
* a definate yes or no to doing the warning) is in the cases where
* a warning has already been issued much cheaper then doing the
* increment and then checking. Only in the situation where the warning
* is issued for the first time, is this check useless. But that is only
* 1 time vs many times.
*/
if(server->lowMemWarningCount == 0)
{
/* increment the warning count
*/
warningCount = pa_increment(&server->lowMemWarningCount);
if(warningCount == 1)
{
OS_REPORT(OS_WARNING,
"issueLowMemoryWarning",0,
"Shared memory is running very low!");
}
}
#endif
}
开发者ID:xrl,项目名称:opensplice_dds,代码行数:35,代码来源:v_handle.c
示例18: DDS_QosProviderReadLock
static DDS_ReturnCode_t
DDS_QosProviderReadLock (
gapi_handle handle,
_QosProvider *object)
{
_QosProvider qosProvider;
gapi_returnCode_t gapiResult;
DDS_ReturnCode_t result = DDS_RETCODE_OK;
assert (handle != NULL);
assert (object != NULL);
qosProvider = (_QosProvider)
gapi_objectReadClaim (handle, OBJECT_KIND_QOSPROVIDER, &gapiResult);
result = gapiReturnCodeToReturnCode (gapiResult);
if (result != DDS_RETCODE_OK) {
OS_REPORT (OS_ERROR, "DDS_QosProviderReadLock", 0,
"Could not read lock QosProvider");
} else {
*object = qosProvider;
}
return result;
}
开发者ID:S73417H,项目名称:opensplice,代码行数:25,代码来源:sac_qosProvider.c
示例19: d_groupInfoSampleNew
d_sample
d_groupInfoSampleNew (
d_groupInfo _this,
d_instance instance,
v_message msg)
{
d_sample sample;
v_message mmfMessage;
sample = d_sample(c_new(_this->topic->sampleType));
if (sample) {
c_cloneIn(_this->topic->messageType, msg, (c_voidp*)&(mmfMessage));
d_sampleTemplate(sample)->message = mmfMessage;
sample->instance = instance;
sample->older = NULL;
sample->newer = NULL;
} else {
OS_REPORT(OS_ERROR,
"d_groupInfoSampleNew",0,
"Failed to allocate sample.");
assert(FALSE);
}
return sample;
}
开发者ID:diorahman,项目名称:opensplice,代码行数:25,代码来源:d_groupInfo.c
示例20: OS_REPORT
DDS::Subscriber_impl::~Subscriber_impl()
{
if (os_mutexDestroy(&s_mutex) != os_resultSuccess)
{
OS_REPORT(OS_ERROR, "CCPP", 0, "Unable to destroy mutex");
}
}
开发者ID:AmitShah,项目名称:opensplice,代码行数:7,代码来源:ccpp_Subscriber_impl.cpp
注:本文中的OS_REPORT函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论