本文整理汇总了C++中sendSignal函数的典型用法代码示例。如果您正苦于以下问题:C++ sendSignal函数的具体用法?C++ sendSignal怎么用?C++ sendSignal使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sendSignal函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: jam
void
Dbtup::buildIndexReply(Signal* signal, const BuildIndexRec* buildPtrP)
{
const BuildIndxImplReq* buildReq = &buildPtrP->m_request;
AlterIndxImplReq* req = (AlterIndxImplReq*)signal->getDataPtrSend();
req->indexId = buildReq->indexId;
req->senderRef = 0; //
if (buildPtrP->m_errorCode == BuildIndxImplRef::NoError)
{
jam();
req->requestType = AlterIndxImplReq::AlterIndexOnline;
}
else
{
jam();
req->requestType = AlterIndxImplReq::AlterIndexOffline;
}
EXECUTE_DIRECT(DBTUX, GSN_ALTER_INDX_IMPL_REQ, signal,
AlterIndxImplReq::SignalLength);
if (buildPtrP->m_errorCode == BuildIndxImplRef::NoError) {
jam();
BuildIndxImplConf* conf =
(BuildIndxImplConf*)signal->getDataPtrSend();
conf->senderRef = reference();
conf->senderData = buildReq->senderData;
sendSignal(buildReq->senderRef, GSN_BUILD_INDX_IMPL_CONF,
signal, BuildIndxImplConf::SignalLength, JBB);
} else {
jam();
BuildIndxImplRef* ref =
(BuildIndxImplRef*)signal->getDataPtrSend();
ref->senderRef = reference();
ref->senderData = buildReq->senderData;
ref->errorCode = buildPtrP->m_errorCode;
sendSignal(buildReq->senderRef, GSN_BUILD_INDX_IMPL_REF,
signal, BuildIndxImplRef::SignalLength, JBB);
}
}
开发者ID:carrotli,项目名称:ansql,代码行数:42,代码来源:DbtupIndex.cpp
示例2: jamEntry
void
Dbtup::execDROP_TRIG_REQ(Signal* signal)
{
jamEntry();
BlockReference senderRef = signal->getSendersBlockRef();
const DropTrigReq reqCopy = *(const DropTrigReq*)signal->getDataPtr();
const DropTrigReq* const req = &reqCopy;
// Find table
TablerecPtr tabPtr;
tabPtr.i = req->getTableId();
ptrCheckGuard(tabPtr, cnoOfTablerec, tablerec);
// Drop trigger
Uint32 r = dropTrigger(tabPtr.p, req, refToBlock(senderRef));
if (r == 0){
// Send conf
DropTrigConf* const conf = (DropTrigConf*)signal->getDataPtrSend();
conf->setUserRef(senderRef);
conf->setConnectionPtr(req->getConnectionPtr());
conf->setRequestType(req->getRequestType());
conf->setTableId(req->getTableId());
conf->setIndexId(req->getIndexId());
conf->setTriggerId(req->getTriggerId());
sendSignal(senderRef, GSN_DROP_TRIG_CONF,
signal, DropTrigConf::SignalLength, JBB);
} else {
// Send ref
DropTrigRef* const ref = (DropTrigRef*)signal->getDataPtrSend();
ref->setUserRef(senderRef);
ref->setConnectionPtr(req->getConnectionPtr());
ref->setRequestType(req->getRequestType());
ref->setTableId(req->getTableId());
ref->setIndexId(req->getIndexId());
ref->setTriggerId(req->getTriggerId());
ref->setErrorCode((DropTrigRef::ErrorCode)r);
ref->setErrorLine(__LINE__);
ref->setErrorNode(refToNode(reference()));
sendSignal(senderRef, GSN_DROP_TRIG_REF,
signal, DropTrigRef::SignalLength, JBB);
}
}//Dbtup::DROP_TRIG_REQ()
开发者ID:Abner-Sun,项目名称:mysql5.1-vx-pre1,代码行数:42,代码来源:DbtupTrigger.cpp
示例3: getDirList
void SensorFileSysWalker::sendNewDirectoryInfo() {
logger.logInfo( "sendNewDirectoryInfo: execute..." );
// send current directory list
StringList files;
getDirList( curDir , files );
for( int k = 0; k < files.count(); k++ ) {
String file = files.get( k );
sendSignal( SIGNAL_DIR_LISTITEM , file );
}
}
开发者ID:AbhishekGhosh,项目名称:Artificial-Human,代码行数:11,代码来源:filesyswalker.cpp
示例4: sigtstp_handler
/*
* sigtstp_handler - The kernel sends a SIGTSTP to the shell whenever
* the user types ctrl-z at the keyboard. Catch it and suspend the
* foreground job by sending it a SIGTSTP.
*/
void sigtstp_handler(int sig)
{
pid_t pid;
pid = fgpid(job_list);
if(pid != 0){
sendSignal(sig, -pid);
}else{
printf("SIGINT misses\n");
}
return;
}
开发者ID:amaliujia,项目名称:Computer-System,代码行数:16,代码来源:tsh.c
示例5: sigint_handler
/*
* sigint_handler - The kernel sends a SIGINT to the shell whenver the
* user types ctrl-c at the keyboard. Catch it and send it along
* to the foreground job.
*/
void sigint_handler(int sig)
{
pid_t pid;
pid = fgpid(job_list);
if(pid != 0){
sendSignal(sig, -pid);
}else{
printf("heihei");
}
return;
}
开发者ID:amaliujia,项目名称:Computer-System,代码行数:16,代码来源:tsh.c
示例6: closeSession
bool TESession::closeSession()
{
autoClose = true;
wantedClose = true;
if (!sh->isRunning() || !sendSignal(SIGHUP))
{
// Forced close.
TQTimer::singleShot(1, this, TQT_SLOT(done()));
}
return true;
}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:11,代码来源:session.cpp
示例7: sendSignal
void
Restore::open_file(Signal* signal, FilePtr file_ptr)
{
signal->theData[0] = NDB_LE_StartReadLCP;
signal->theData[1] = file_ptr.p->m_table_id;
signal->theData[2] = file_ptr.p->m_fragment_id;
sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 3, JBB);
FsOpenReq * req = (FsOpenReq *)signal->getDataPtrSend();
req->userReference = reference();
req->fileFlags = FsOpenReq::OM_READONLY | FsOpenReq::OM_GZ;
req->userPointer = file_ptr.i;
FsOpenReq::setVersion(req->fileNumber, 5);
FsOpenReq::setSuffix(req->fileNumber, FsOpenReq::S_DATA);
FsOpenReq::v5_setLcpNo(req->fileNumber, file_ptr.p->m_lcp_no);
FsOpenReq::v5_setTableId(req->fileNumber, file_ptr.p->m_table_id);
FsOpenReq::v5_setFragmentId(req->fileNumber, file_ptr.p->m_fragment_id);
sendSignal(NDBFS_REF, GSN_FSOPENREQ, signal, FsOpenReq::SignalLength, JBA);
}
开发者ID:ForcerKing,项目名称:ShaoqunXu-mysql5.7,代码行数:20,代码来源:restore.cpp
示例8: eDebug
void eFilePushThread::stop()
{
/* if we aren't running, don't bother stopping. */
if (m_stop == 1)
return;
m_stop = 1;
eDebug("eFilePushThread stopping thread");
m_run_cond.signal(); /* Break out of pause if needed */
sendSignal(SIGUSR1);
kill(); /* Kill means join actually */
}
开发者ID:Adga52,项目名称:enigma2,代码行数:11,代码来源:filepush.cpp
示例9: jamEntry
void Dbinfo::execINCL_NODEREQ(Signal* signal)
{
jamEntry();
const Uint32 senderRef = signal->theData[0];
const Uint32 inclNode = signal->theData[1];
signal->theData[0] = inclNode;
signal->theData[1] = reference();
sendSignal(senderRef, GSN_INCL_NODECONF, signal, 2, JBB);
}
开发者ID:bobzhen,项目名称:MySQL-Research,代码行数:11,代码来源:Dbinfo.cpp
示例10: signal
void Program::signal(int sig)
{
#ifndef YUNI_OS_MSVC
auto envptr = pEnv;
if (!!envptr)
envptr->sendSignal(true, sig);
#else
// Signals are not supported on Windows. Silently ignoring it.
(void) sig;
#endif
}
开发者ID:libyuni,项目名称:libyuni,代码行数:11,代码来源:program.cpp
示例11: main
/*!
* Main function.
*
* Creates a RedshiftEnabler object and connects it to the readyCheck dbus signal, so that if a new redshift plasmoid
* is created (this sends the readyCheck signal) this is enabled by this program. Moreover this program sends the
* readyForStart signal once launched to enable already existent redshift plasmoids during the login phase.
*/
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
RedshiftEnabler *enabler = new RedshiftEnabler();
//Responds to the readyCheck signal with a readyForStart signal
QDBusConnection dbus = QDBusConnection::sessionBus();
dbus.connect("", "/", "org.kde.redshift", "readyCheck",
enabler, SLOT(sendSignal()));
//Sends the signal once started to enable already possibly running instances of redshift data engine
enabler->sendSignal();
return app.exec();
}
开发者ID:StefanBruens,项目名称:redshift-plasmoid,代码行数:19,代码来源:redshiftautostart.cpp
示例12: sendSignal
void
PgmanProxy::send_data_file_ord(Signal* signal, Uint32 i, Uint32 ret,
Uint32 cmd, Uint32 file_no, Uint32 fd)
{
DataFileOrd* ord = (DataFileOrd*)signal->getDataPtrSend();
ord->ret = ret;
ord->cmd = cmd;
ord->file_no = file_no;
ord->fd = fd;
sendSignal(workerRef(i), GSN_DATA_FILE_ORD,
signal, DataFileOrd::SignalLength, JBB);
}
开发者ID:hobbytp,项目名称:percona-xtrabackup,代码行数:12,代码来源:PgmanProxy.cpp
示例13: reference
void
DbgdmProxy::sendTC_SCHVERREQ(Signal* signal, Uint32 ssId, SectionHandle*)
{
Ss_TC_SCHVERREQ& ss = ssFind<Ss_TC_SCHVERREQ>(ssId);
TcSchVerReq* req = (TcSchVerReq*)signal->getDataPtrSend();
*req = ss.m_req;
req->senderRef = reference();
req->senderData = ssId;
sendSignal(workerRef(ss.m_worker), GSN_TC_SCHVERREQ,
signal, TcSchVerReq::SignalLength, JBB);
}
开发者ID:ForcerKing,项目名称:ShaoqunXu-mysql5.7,代码行数:12,代码来源:DbgdmProxy.cpp
示例14: eDebug
void eFilePushThread::stop()
{
/* if we aren't running, don't bother stopping. */
if (!sync())
return;
m_stop = 1;
eDebug("eFilePushThread stopping thread");
sendSignal(SIGUSR1);
kill(0);
}
开发者ID:Ophiuchus1312,项目名称:enigma2-master,代码行数:12,代码来源:filepush.cpp
示例15: eDebug
void eFilePushThread::stop()
{
/* if we aren't running, don't bother stopping. */
if (!sync())
return;
m_stop = 1;
eDebug("stopping thread."); /* just do it ONCE. it won't help to do this more than once. */
sendSignal(SIGUSR1);
kill(0);
}
开发者ID:FFTEAM,项目名称:enigma2-5,代码行数:12,代码来源:filepush.cpp
示例16: sendSignal
void Trix::checkParallelism(Signal* signal, SubscriptionRecord* subRec)
{
if ((subRec->pendingSubSyncContinueConf) &&
(subRec->expectedConf < subRec->parallelism)) {
SubSyncContinueConf * subSyncContinueConf =
(SubSyncContinueConf *) signal->getDataPtrSend();
subSyncContinueConf->subscriptionId = subRec->subscriptionId;
subSyncContinueConf->subscriptionKey = subRec->subscriptionKey;
sendSignal(SUMA_REF, GSN_SUB_SYNC_CONTINUE_CONF, signal,
SubSyncContinueConf::SignalLength , JBB);
subRec->pendingSubSyncContinueConf = false;
}
}
开发者ID:0x00xw,项目名称:mysql-2,代码行数:13,代码来源:Trix.cpp
示例17: set_trans_state
void Dbtup::storedProcBufferSeizeErrorLab(Signal* signal,
Operationrec* regOperPtr,
Uint32 storedProcPtr,
Uint32 errorCode)
{
regOperPtr->m_any_value = 0;
set_trans_state(regOperPtr, TRANS_ERROR_WAIT_STORED_PROCREQ);
signal->theData[0] = regOperPtr->userpointer;
signal->theData[1] = errorCode;
signal->theData[2] = storedProcPtr;
BlockReference lqhRef = calcInstanceBlockRef(DBLQH);
sendSignal(lqhRef, GSN_STORED_PROCREF, signal, 3, JBB);
}//Dbtup::storedSeizeAttrinbufrecErrorLab()
开发者ID:Baoxiyi-Github,项目名称:Mysql,代码行数:13,代码来源:DbtupStoredProcDef.cpp
示例18: jamEntry
void Cmvmi::execDISCONNECT_REP(Signal *signal)
{
const DisconnectRep * const rep = (DisconnectRep *)&signal->theData[0];
const Uint32 hostId = rep->nodeId;
const Uint32 errNo = rep->err;
jamEntry();
setNodeInfo(hostId).m_connected = false;
setNodeInfo(hostId).m_connectCount++;
const NodeInfo::NodeType type = getNodeInfo(hostId).getType();
ndbrequire(type != NodeInfo::INVALID);
sendSignal(QMGR_REF, GSN_DISCONNECT_REP, signal,
DisconnectRep::SignalLength, JBA);
cancelSubscription(hostId);
signal->theData[0] = NDB_LE_Disconnected;
signal->theData[1] = hostId;
sendSignal(CMVMI_REF, GSN_EVENT_REP, signal, 2, JBB);
}
开发者ID:Abner-Sun,项目名称:mysql5.1-vx-pre1,代码行数:22,代码来源:Cmvmi.cpp
注:本文中的sendSignal函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论