本文整理汇总了C++中PAUSE函数的典型用法代码示例。如果您正苦于以下问题:C++ PAUSE函数的具体用法?C++ PAUSE怎么用?C++ PAUSE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PAUSE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: Call
void Call(){
printf("Call thread id %u \n", (unsigned int)pthread_self());
Global ++;
INTERLEV_ACCESS(0,"cs1.Call","0");
cs2: Create();
Global ++;
INTERLEV_ACCESS(0,"cs1.Call","0,1,2");
PAUSE("Create 0,1,2");
cs3: Join();
Global ++;
INTERLEV_ACCESS(0,"cs1.Call","0");
PAUSE("Join 0,1,2");
cs6: Create();
Global ++;
INTERLEV_ACCESS(0,"cs1.Call","0,3,4");
PAUSE("Create 0,3,4");
cs7: Join();
Global ++;
INTERLEV_ACCESS(0,"cs1.Call","0");
PAUSE("Join 0,3,4");
}
开发者ID:unsw-corg,项目名称:PTABen,代码行数:33,代码来源:succ_cxt_thdindex_2.c
示例2: Send
static int dump_rom_2 (CalcHandle* handle, CalcDumpSize size, const char *filename)
{
int i, err = 0;
static const uint16_t keys[] = {
0x40, 0x09, 0x09, /* Quit, Clear, Clear, */
0xFE63, 0x97, 0xDA, /* Send(, 9, prgm */
0xAB, 0xA8, 0xA6, 0x9D, /* R, O, M, D */
0xAE, 0xA6, 0xA9, 0x05 /* U, M, P, Enter */
};
// Launch program by remote control
for(i = 0; i < (int)(sizeof(keys) / sizeof(keys[0])); i++)
{
TRYF(send_key(handle, keys[i]));
PAUSE(100);
}
do
{
handle->updat->refresh();
if (handle->updat->cancel)
return ERR_ABORT;
//send RDY request ???
PAUSE(1000);
err = rd_is_ready(handle);
}
while (err == ERROR_READ_TIMEOUT);
// Get dump
TRYF(rd_dump(handle, filename));
return 0;
}
开发者ID:tobiasBora,项目名称:emacs_ti,代码行数:34,代码来源:calc_83.c
示例3: Asm
static int dump_rom_2 (CalcHandle* handle, CalcDumpSize size, const char *filename)
{
#if 0
int i;
static const uint16_t keys[] = {
0x40, 0x09, 0x09, 0xFC9C, /* Quit, Clear, Clear, Asm( */
0xDA, 0xAB, 0xA8, 0xA6, /* prgm, R, O, M */
0x9D, 0xAE, 0xA6, 0xA9, /* D, U, M, P */
0x86 }; /* ) */
// Launch program by remote control
PAUSE(200);
for(i = 0; i < sizeof(keys) / sizeof(uint16_t); i++)
{
TRYF(send_key(handle, keys[i]));
PAUSE(100);
}
// This fixes a 100% reproducible timeout: send_key normally requests a data ACK,
// but when the program is running, no data ACK is sent. Therefore, hit the Enter
// key without requesting a data ACK, only the initial delay ACK.
TRYF(cmd_s_execute(handle, "", "", EID_KEY, NULL, 0x05));
TRYF(cmd_r_delay_ack(handle));
PAUSE(400);
#endif
#if 1
TRYF(cmd_s_execute(handle, NULL, "ROMDUMP", EID_PRGM, NULL, 0));
TRYF(cmd_r_data_ack(handle));
PAUSE(400);
#endif
// Get dump
TRYF(rd_dump(handle, filename));
return 0;
}
开发者ID:tobiasBora,项目名称:emacs_ti,代码行数:35,代码来源:calc_84p.c
示例4: PAUSE
static int execute (CalcHandle* handle, VarEntry *ve, const char* args)
{
unsigned int i;
// Go back to homescreen
PAUSE(200);
TRYF(send_key(handle, (KEY92P_CTRL + KEY92P_Q)));
TRYF(send_key(handle, KEY92P_CLEAR));
TRYF(send_key(handle, KEY92P_CLEAR));
// Launch program by remote control
for(i = 0; i < strlen(ve->folder); i++)
TRYF(send_key(handle, (ve->folder)[i]));
if(strcmp(ve->folder, ""))
TRYF(send_key(handle, '\\'));
for(i = 0; i < strlen(ve->name); i++)
TRYF(send_key(handle, (ve->name)[i]));
TRYF(send_key(handle, KEY92P_LP));
if(args)
{
for(i = 0; i < strlen(args); i++)
TRYF(send_key(handle, args[i]));
}
TRYF(send_key(handle, KEY92P_RP));
TRYF(send_key(handle, KEY92P_ENTER));
PAUSE(200);
return 0;
}
开发者ID:tobiasBora,项目名称:emacs_ti,代码行数:33,代码来源:calc_92.c
示例5: printf
void *foo1(void *x) {
int *tid = x;
printf("Call thread id %u \n", (unsigned int)pthread_self());
Global ++;
INTERLEV_ACCESS(1,"cs1.foo1","0,1,3,4");
INTERLEV_ACCESS(3,"cs2.foo1","0,3,1,2");
PAUSE("foo1.before cs3");
cs3: pthread_create(&tt[*tid], NULL, foo2, NULL);
PAUSE("foo1 after cs3");
Global ++;
INTERLEV_ACCESS(1,"cs1.foo1","0,1,2,3,4");
INTERLEV_ACCESS(3,"cs2.foo1","0,3,4,1,2");
pthread_join(tt[*tid], NULL);
PAUSE("foo1 after join 3");
Global ++;
INTERLEV_ACCESS(1,"cs1.foo1","0,1,3,4");
INTERLEV_ACCESS(3,"cs2.foo1","0,3,1,2");
return x;
}
开发者ID:unsw-corg,项目名称:PTABen,代码行数:28,代码来源:imprecise_cxt_thdindex_9.c
示例6: PAUSE
static int execute (CalcHandle* handle, VarEntry *ve, const char* args)
{
unsigned int i;
// Go back to homescreen
PAUSE(200);
TRYF(send_key(handle, KEY83_Quit));
TRYF(send_key(handle, KEY83_Clear));
TRYF(send_key(handle, KEY83_Clear));
// Launch program by remote control
if(ve->type == TI83_ASM)
{
TRYF(send_key(handle, KEY83_SendMBL));
TRYF(send_key(handle, KEY83_9));
}
TRYF(send_key(handle, KEY83_Exec));
for(i = 0; i < strlen(ve->name); i++)
{
const CalcKey *ck = ticalcs_keys_83((ve->name)[i]);
TRYF(send_key(handle, ck->normal.value));
}
TRYF(send_key(handle, KEY83_Enter));
PAUSE(200);
return 0;
}
开发者ID:debrouxl,项目名称:tilp-libticalcs,代码行数:29,代码来源:calc_83.c
示例7: Send
static int dump_rom_2 (CalcHandle* handle, CalcDumpSize size, const char *filename)
{
int ret = 0;
unsigned int i;
if (handle->model == CALC_TI83)
{
static const uint16_t keys[] = {
0x40, 0x09, 0x09, /* Quit, Clear, Clear, */
0xFE63, 0x97, 0xDA, /* Send(, 9, prgm */
0xAB, 0xA8, 0xA6, 0x9D, /* R, O, M, D */
0xAE, 0xA6, 0xA9, 0x05 /* U, M, P, Enter */
};
// Launch program by remote control
for (i = 0; !ret && i < sizeof(keys) / sizeof(keys[0]); i++)
{
ret = send_key(handle, (uint32_t)(keys[i]));
PAUSE(100);
}
}
else if (handle->model == CALC_TI86)
{
static const uint16_t keys[] = {
0x76, 0x08, 0x08, /* Quit, Clear, Clear, */
0x28, 0x3A, 0x34, 0x11, /* A, S, M, (, */
0x39, 0x36, 0x34, 0x2B, /* R, O, M, D, */
0x56, 0x4E, 0x51, 0x12, /* u, m, p, ), */
0x06 /* Enter */
};
uint16_t dummy;
// Launch program by remote control
for (i = 0; !ret && i < (sizeof(keys) / sizeof(keys[0])) - 1; i++)
{
ret = send_key(handle, (uint32_t)(keys[i]));
}
if (!ret)
{
ret = SEND_KEY(handle, keys[i]);
if (!ret)
{
ret = RECV_ACK(handle, &dummy);
}
PAUSE(200);
}
}
if (!ret)
{
// Get dump
ret = rd_dump(handle, filename);
// TI-86: normally there would be another ACK after the program exits, but the ROM dumper disables that behaviour.
}
return ret;
}
开发者ID:TC01,项目名称:tilibs,代码行数:59,代码来源:calc_8x.c
示例8: Asm
static int dump_rom_2 (CalcHandle* handle, CalcDumpSize size, const char *filename)
{
static const uint16_t keys_83p[] = {
0x40, 0x09, 0x09, 0xFC9C, /* Quit, Clear, Clear, Asm( */
0xDA, 0xAB, 0xA8, 0xA6, /* prgm, R, O, M */
0x9D, 0xAE, 0xA6, 0xA9, /* D, U, M, P */
0x86, 0x05 }; /* ), Enter */
static const uint16_t keys_73[] = {
0x40, 0x09, 0x09, 0xDA, /* Quit, Clear, Clear, prgm */
0xAB, 0xA8, 0xA6, 0x9D, /* R, O, M, D, */
0xAE, 0xA6, 0xA9, 0x05 }; /* U, M, P, Enter */
int ret = 0;
const uint16_t *keys;
unsigned int i, nkeys;
if (handle->model == CALC_TI73)
{
keys = keys_73;
nkeys = sizeof(keys_73) / sizeof(keys_73[0]);
}
else
{
keys = keys_83p;
nkeys = sizeof(keys_83p) / sizeof(keys_83p[0]);
}
// Launch program by remote control
PAUSE(200);
for (i = 0; !ret && i < nkeys - 1; i++)
{
ret = send_key(handle, (uint32_t)(keys[i]));
PAUSE(100);
}
if (!ret)
{
// This fixes a 100% reproducible timeout: send_key normally requests an ACK,
// but when the program is running, no ACK is sent. Therefore, hit the Enter key
// without requesting an ACK.
ret = SEND_KEY(handle, keys[i]);
if (!ret)
{
ret = RECV_ACK(handle, NULL); // when the key is received
if (!ret)
{
PAUSE(1000);
// Get dump
// (Normally there would be another ACK after the program exits,
// but the ROM dumper disables that behavior)
ret = rd_dump(handle, filename);
}
}
}
return ret;
}
开发者ID:debrouxl,项目名称:tilibs,代码行数:59,代码来源:calc_73.c
示例9: wrapWaitSynchronizationN
u32 wrapWaitSynchronizationN(u32 nanoseconds1,u32 handles_ptr,u32 handles_count,u32 wait_all,u32 nanoseconds2,u32 out) // TODO: timeouts
{
bool all_unlocked = true;
for (u32 i = 0; i < handles_count; i++) {
u32 handle = mem_Read32(handles_ptr + i * 4);
handleinfo* hi = handle_Get(handle);
if (hi == NULL) {
arm11_SetR(1, i);
ERROR("handle %08x not found.\n", handle);
PAUSE();
#ifdef EXIT_ON_ERROR
exit(1);
#endif
return -1;
}
if (hi->type >= NUM_HANDLE_TYPES) {
// This should never happen.
ERROR("handle %08x has non-defined type.\n", handle);
PAUSE();
exit(1);
}
// Lookup actual callback in table.
if (handle_types[hi->type].fnWaitSynchronization != NULL) {
bool locked = false;
handle_types[hi->type].fnWaitSynchronization(hi, &locked);
if (!locked && !wait_all) {
arm11_SetR(1, i);
return 0;
} else
all_unlocked = false;
} else {
ERROR("WaitSynchronization undefined for handle-type \"%s\".\n",
handle_types[hi->type].name);
PAUSE();
arm11_SetR(1, i); //we just say this one is open
return 0;
}
}
if(wait_all && all_unlocked) {
arm11_SetR(1, handles_count);
return 0;
}
// Put thread in WAITING state if not all handles were unlocked.
u32* wait_list = malloc(handles_count*4);
mem_Read((u8 *) wait_list, handles_ptr, handles_count * 4);
threads_SetCurrentThreadWaitList(wait_list, wait_all, handles_count);
return 0;
}
开发者ID:20150,项目名称:3dmoo,代码行数:59,代码来源:handles.c
示例10: Check_Object
bool
gosFX::CardCloud__Specification::IsDataValid(bool fix_data)
{
Check_Object(this);
float max_offset, min_offset;
float max_scale, min_scale;
m_USize.ExpensiveComputeRange(&min_scale, &max_scale);
float lower = min_scale;
if(lower > 0.0f)
lower = 0.0f;
float upper = max_scale;
//
//------------------------------------
// Calculate the worst case UV offsets
//------------------------------------
//
m_VOffset.ExpensiveComputeRange(&min_offset, &max_offset);
lower += min_offset;
upper += max_offset;
if(upper > 99.0f || lower < -99.0f)
{
if(fix_data)
{
m_VOffset.SetCurve(0.0f);
PAUSE(("Warning: Curve \"VOffset\" in Effect \"%s\" Is Out of Range and has been Reset", (PSTR)m_name));
}
else
return false;
}
m_VSize.ExpensiveComputeRange(&min_scale, &max_scale);
lower = min_scale;
if(lower > 0.0f)
lower = 0.0f;
upper = max_scale;
//
//------------------------------------
// Calculate the worst case UV offsets
//------------------------------------
//
max_offset, min_offset;
m_UOffset.ExpensiveComputeRange(&min_offset, &max_offset);
lower += min_offset;
upper += max_offset;
if(upper > 99.0f || lower < -99.0f)
{
if(fix_data)
{
m_UOffset.SetCurve(0.0f);
PAUSE(("Warning: Curve \"UOffset\" in Effect \"%s\" Is Out of Range and has been Reset", (PSTR)m_name));
}
else
return false;
}
return SpinningCloud__Specification::IsDataValid(fix_data);
}
开发者ID:BobrDobr69,项目名称:mechcommander2,代码行数:55,代码来源:cardcloud.cpp
示例11: PAUSE
static int execute (CalcHandle* handle, VarEntry *ve, const char* args)
{
int ret;
if (handle->model == CALC_TI73 && ve->type == TI73_ASM)
{
return ERR_VOID_FUNCTION;
}
// Go back to homescreen
PAUSE(200);
ret = send_key(handle, KEY83P_Quit);
if (!ret)
{
ret = send_key(handle, KEY83P_Clear);
if (!ret)
{
ret = send_key(handle, KEY83P_Clear);
}
}
if (!ret)
{
// Launch program by remote control
if (ve->type == TI83p_ASM)
{
ret = send_key(handle, KEY83P_Asm);
}
if (!ret)
{
ret = send_key(handle, KEY83P_Exec);
if (!ret)
{
unsigned int i;
for (i = 0; !ret && i < strlen(ve->name); i++)
{
const CalcKey *ck = ticalcs_keys_83p((ve->name)[i]);
ret = send_key(handle, (uint32_t)(ck->normal.value));
}
if (!ret)
{
ret = send_key(handle, KEY83P_Enter);
PAUSE(200);
}
}
}
}
return ret;
}
开发者ID:debrouxl,项目名称:tilibs,代码行数:52,代码来源:calc_73.c
示例12: PAUSE
static int execute (CalcHandle* handle, VarEntry *ve, const char* args)
{
int ret;
// Go back to homescreen
PAUSE(200);
ret = send_key(handle, KEY83_Quit);
if (!ret)
{
ret = send_key(handle, KEY83_Clear);
if (!ret)
{
ret = send_key(handle, KEY83_Clear);
}
}
if (!ret)
{
// Launch program by remote control
if (ve->type == TI83_ASM)
{
ret = send_key(handle, KEY83_SendMBL);
if (!ret)
{
ret = send_key(handle, KEY83_9);
}
}
if (!ret)
{
ret = send_key(handle, KEY83_Exec);
if (!ret)
{
unsigned int i;
for (i = 0; !ret && i < strlen(ve->name); i++)
{
const CalcKey *ck = ticalcs_keys_83((ve->name)[i]);
ret = send_key(handle, (uint32_t)(ck->normal.value));
}
if (!ret)
{
ret = send_key(handle, KEY83_Enter);
PAUSE(200);
}
}
}
}
return ret;
}
开发者ID:TC01,项目名称:tilibs,代码行数:51,代码来源:calc_8x.c
示例13: dusb_cmd_r_delay_ack
// 0xBB00: delay acknowledgement
TIEXPORT3 int TICALL dusb_cmd_r_delay_ack(CalcHandle *handle)
{
DUSBVirtualPacket* pkt;
int retval = 0;
VALIDATE_HANDLE(handle);
pkt = dusb_vtl_pkt_new_ex(handle, 0, 0, NULL);
retval = dusb_recv_data(handle, pkt);
if (!retval)
{
if (pkt->type == DUSB_VPKT_ERROR)
{
retval = ERR_CALC_ERROR2 + err_code_pkt(pkt);
}
else if (pkt->type != DUSB_VPKT_DELAY_ACK)
{
ticalcs_info("cmd_r_data_ack: expected type 0x%4X, received type 0x%4X", DUSB_VPKT_DELAY_ACK, pkt->type);
retval = ERR_INVALID_PACKET;
}
}
PAUSE(100);
dusb_vtl_pkt_del(handle, pkt);
return retval;
}
开发者ID:TC01,项目名称:tilibs,代码行数:31,代码来源:dusb_cmd.c
示例14: sprintf
static int dump_rom_2 (CalcHandle* handle, CalcDumpSize size, const char *filename)
{
int err;
// Wait for user's action (execing program)
sprintf(handle->updat->text, _("Waiting for execing of program..."));
handle->updat->label();
do
{
handle->updat->refresh();
if (handle->updat->cancel)
return ERR_ABORT;
//send RDY request ???
PAUSE(1000);
err = rd_is_ready(handle);
}
while (err == ERROR_READ_TIMEOUT);
// Get dump
TRYF(rd_dump(handle, filename));
return 0;
}
开发者ID:Jonimoose,项目名称:tilp-libticalcs,代码行数:25,代码来源:calc_82.c
示例15: PAUSE
//¶¯Ì¬ÏÔʾͼ±ê
void VirtualWifiNotifyIcon::dynamic_show_icon()
{
HICON* iconarray=new HICON[m_notifyiconinfo->DynamicNums];
for (int i=0;i<m_notifyiconinfo->DynamicNums;++i)
{
iconarray[i]=LoadIcon(m_notifyiconinfo->DynamicShow[i]);
}
//CloseBallon();
for (;;) //ËÀÑ»·
{
for (int i=0;i<m_notifyiconinfo->DynamicNums;)
{
PAUSE(INT_DYNAMIC_SHOW_TIME);
if (!m_isdynamic_show)
{
goto end;
}
if (!m_isshow)
{
SetIcon(iconarray[i]);
++i;
}
}
}
end:
delete[] iconarray;
SetIcon(LoadIcon(m_notifyiconinfo->NoStartPath));
}
开发者ID:lihaibo1989,项目名称:virtualWifi,代码行数:31,代码来源:VirtualWifiNotifyIcon.cpp
示例16: smp_send_broadcast_ici_interrupts_disabled
void
smp_send_broadcast_ici_interrupts_disabled(int32 currentCPU, int32 message,
addr_t data, addr_t data2, addr_t data3, void *dataPointer, uint32 flags)
{
if (!sICIEnabled)
return;
TRACE(("smp_send_broadcast_ici_interrupts_disabled: cpu %ld mess 0x%lx, "
"data 0x%lx, data2 0x%lx, data3 0x%lx, ptr %p, flags 0x%lx\n",
currentCPU, message, data, data2, data3, dataPointer, flags));
struct smp_msg *msg;
find_free_message_interrupts_disabled(currentCPU, &msg);
msg->message = message;
msg->data = data;
msg->data2 = data2;
msg->data3 = data3;
msg->data_ptr = dataPointer;
msg->ref_count = sNumCPUs - 1;
msg->flags = flags;
msg->proc_bitmap = SET_BIT(0, currentCPU);
msg->done = false;
TRACE(("smp_send_broadcast_ici_interrupts_disabled %ld: inserting msg %p "
"into broadcast mbox\n", currentCPU, msg));
// stick it in the appropriate cpu's mailbox
acquire_spinlock_nocheck(&sBroadcastMessageSpinlock);
msg->next = sBroadcastMessages;
sBroadcastMessages = msg;
release_spinlock(&sBroadcastMessageSpinlock);
arch_smp_send_broadcast_ici();
TRACE(("smp_send_broadcast_ici_interrupts_disabled %ld: sent interrupt\n",
currentCPU));
if ((flags & SMP_MSG_FLAG_SYNC) != 0) {
// wait for the other cpus to finish processing it
// the interrupt handler will ref count it to <0
// if the message is sync after it has removed it from the mailbox
TRACE(("smp_send_broadcast_ici_interrupts_disabled %ld: waiting for "
"ack\n", currentCPU));
while (msg->done == false) {
process_all_pending_ici(currentCPU);
PAUSE();
}
TRACE(("smp_send_broadcast_ici_interrupts_disabled %ld: returning "
"message to free list\n", currentCPU));
// for SYNC messages, it's our responsibility to put it
// back into the free list
return_free_message(msg);
}
TRACE(("smp_send_broadcast_ici_interrupts_disabled: done\n"));
}
开发者ID:Barrett17,项目名称:haiku-contacts-kit-old,代码行数:60,代码来源:smp.cpp
示例17: TRYF
// same code as calc_89.c
static int dump_rom_2 (CalcHandle* handle, CalcDumpSize size, const char *filename)
{
// Launch program by remote control
TRYF(send_key(handle, 'm'));
TRYF(send_key(handle, 'a'));
TRYF(send_key(handle, 'i'));
TRYF(send_key(handle, 'n'));
TRYF(send_key(handle, '\\'));
TRYF(send_key(handle, 'r'));
TRYF(send_key(handle, 'o'));
TRYF(send_key(handle, 'm'));
TRYF(send_key(handle, 'd'));
TRYF(send_key(handle, 'u'));
TRYF(send_key(handle, 'm'));
TRYF(send_key(handle, 'p'));
TRYF(send_key(handle, KEY92P_LP));
TRYF(send_key(handle, KEY92P_RP));
TRYF(send_key(handle, KEY92P_ENTER));
PAUSE(200);
// Get dump
TRYF(rd_dump(handle, filename));
return 0;
}
开发者ID:tobiasBora,项目名称:emacs_ti,代码行数:26,代码来源:calc_92.c
示例18: find_free_message
/*! Finds a free message and gets it.
NOTE: has side effect of disabling interrupts
return value is the former interrupt state
*/
static cpu_status
find_free_message(struct smp_msg** msg)
{
cpu_status state;
TRACE(("find_free_message: entry\n"));
retry:
while (sFreeMessageCount <= 0) {
state = disable_interrupts();
process_all_pending_ici(smp_get_current_cpu());
restore_interrupts(state);
PAUSE();
}
state = disable_interrupts();
acquire_spinlock(&sFreeMessageSpinlock);
if (sFreeMessageCount <= 0) {
// someone grabbed one while we were getting the lock,
// go back to waiting for it
release_spinlock(&sFreeMessageSpinlock);
restore_interrupts(state);
goto retry;
}
*msg = sFreeMessages;
sFreeMessages = (*msg)->next;
sFreeMessageCount--;
release_spinlock(&sFreeMessageSpinlock);
TRACE(("find_free_message: returning msg %p\n", *msg));
return state;
}
开发者ID:Barrett17,项目名称:haiku-contacts-kit-old,代码行数:39,代码来源:smp.cpp
示例19: main
int main(void)
{
void *context = zmq_ctx_new();
void *sink = zmq_socket(context, ZMQ_ROUTER);
zmq_bind(sink, "inproc://example");
// First allow 0MQ to set the identity
void *anonymous = zmq_socket(context, ZMQ_REQ);
zmq_connect(anonymous, "inproc://example");
s_send(anonymous, "ROUTER uses a generated UUID");
s_dump(sink);
// Then set the identity ourselves
void *identified = zmq_socket(context, ZMQ_REQ);
zmq_setsockopt(identified, ZMQ_IDENTITY, "PEER2", 5);
zmq_connect(identified, "inproc://example");
s_send(identified, "ROUTER socket uses REQ's socket identity");
s_dump(sink);
zmq_close(sink);
zmq_close(anonymous);
zmq_close(identified);
zmq_ctx_destroy(context);
PAUSE();
return 0;
}
开发者ID:a524631266,项目名称:Ongoing-Study,代码行数:27,代码来源:identity.c
示例20: services_SyncRequest
u32 services_SyncRequest(handleinfo* h, bool *locked)
{
u32 i;
// Lookup which requested service in table.
for(i=0; i<ARRAY_SIZE(services); i++) {
if(services[i].subtype == h->subtype)
return services[i].fnSyncRequest();
}
if (h->subtype == SERVICE_DIRECT) {
if (h->misc[0] & HANDLE_SERV_STAT_ACKING) {
mem_Write(h->misc_ptr[0], arm11_ServiceBufferAddress() + 0x80, 0x200);
h->misc[0] &= ~(HANDLE_SERV_STAT_ACKING | HANDLE_SERV_STAT_SYNCING);
*locked = false;
return 0;
} else {
if (!(h->misc[0] & HANDLE_SERV_STAT_SYNCING)) mem_Read(h->misc_ptr[0], arm11_ServiceBufferAddress() + 0x80, 0x200);
h->misc[0] |= HANDLE_SERV_STAT_SYNCING;
*locked = true;
return 0;
}
}
ERROR("invalid handle.\n");
arm11_Dump();
PAUSE();
return 0;
}
开发者ID:stergios7,项目名称:3dmoo,代码行数:29,代码来源:srv.c
注:本文中的PAUSE函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论