您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ spin函数代码示例

51自学网 2021-06-03 08:10:04
  C++
这篇教程C++ spin函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中spin函数的典型用法代码示例。如果您正苦于以下问题:C++ spin函数的具体用法?C++ spin怎么用?C++ spin使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了spin函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: main

intmain(int argc, char *argv[]){   struct pstat st;   int highpriority = 0;   int pid = getpid();   int defaultpriorityrun = 0;   spin();   check(getpinfo(&st) == 0, "getpinfo");   int i;   printf(1, "/n **** PInfo **** /n");    for(i = 0; i < NPROC; i++) {      if (st.inuse[i]) {	 if(st.hticks[i] != 0)		highpriority++;	 if(st.pid[i] == pid && st.lticks[i] > 20)		defaultpriorityrun = 1;         printf(1, "pid: %d hticks: %d lticks: %d/n", st.pid[i], st.hticks[i], st.lticks[i]);      }   }   check(highpriority == 0, "getpinfo shouldn't return any process with hticks not equal to 0, default priority should be low(1) ");   check(defaultpriorityrun == 1, "getpinfo should return a process having run with default priority");   printf(1, "Should print 1 then 2");   exit();}
开发者ID:mbansal2090,项目名称:OS_XV6_HW2,代码行数:27,


示例2: main

int main(int argc, char **argv){  if (argc < 2)    return usage();  const char *cmd = argv[1];  perish_if(libusb_init(NULL) < 0, "Couldn't init libusb");  libusb_device_handle *h = libusb_open_device_with_vid_pid(NULL,                                                             VENDOR_ID,                                                             PRODUCT_ID);  perish_if(h == NULL, "couldn't find or open device. check permissions?");  perish_if(0 != libusb_claim_interface(h, 0), "couldn't claim interface");  printf("device opened successfully./n");  signal(SIGINT, signal_handler);  if (!strcmp(cmd, "stream"))    stream(h);  else if (!strcmp(cmd, "blink"))    blink(h);  else if (!strcmp(cmd, "spin"))    spin(h);  else if (!strcmp(cmd, "listen"))  {    ros::init(argc, argv, "roscar_driver");    roscar_listen(h);  }  libusb_exit(NULL);  return 0;}
开发者ID:fuinha,项目名称:roscar,代码行数:27,


示例3: while

void SlotMachine::play(Player &player){	int menuSelect = 0;	bool continueLoop = true;	int bet = 0;	static int run = 0;	while (continueLoop)	{		if (run++ == 0)		{			buildMachine(player); // just for show to build display		}		if (processInput(bet))		{			spin(bet, player);		}		else		{			continueLoop = false;			run = 0;		}	}}
开发者ID:jessewalton,项目名称:USF-Object-Oriented-Design,代码行数:25,


示例4: test_cv_thread

static voidtest_cv_thread(unsigned long num){	int i;	struct timeval start, end, diff;	for (i = 0; i < LOOPS; i++) {		lock_acquire(testlock);		while (testval1 != num) {			gettimeofday(&start, NULL);			cv_wait(testcv, testlock);			gettimeofday(&end, NULL);			timersub(&end, &start, &diff);			/* cv_wait should wait at least 4-5 ms */			if (diff.tv_sec == 0 && diff.tv_usec < 4000) {				unintr_printf("%s took %ld us. That's too fast."					      " You must be busy looping/n",					      __FUNCTION__, diff.tv_usec);				goto out;			}		}		unintr_printf("%d: thread %3d passes/n", i, num);		testval1 = (testval1 + NTHREADS - 1) % NTHREADS;		/* spin for 5 ms */		spin(5000);		cv_broadcast(testcv, testlock);		lock_release(testlock);	}out:	__sync_fetch_and_add(&done, 1);}
开发者ID:vaibhavvijay,项目名称:ECE-344,代码行数:34,


示例5: redDevansh

void redDevansh() // Places preload (1-2) + 2 buckies (2-4) + TURN LEFT Knocks buckies (1-6){	deploy();	intake(1);	wait10Msec(10);	moveStraight(1, 0, 455); //picks up	wait10Msec(50);	moveStraight(-1, 0, 475);//comes back	intake(0);			// end part 1: prepare dump	waitForButton();	lift(BUMP);	holdArm();	intake(-1);	resetValues(1200);		// end part 2: dump	waitForButton();	liftDown();	wait10Msec(100);	moveStraight(1, 0, 700);		// end part 3: prepare hit	spin(-1, 0, 200);	intake(-1);	lift(BUMP);	holdArm();	noRamp(1, 250);	resetValues(0);		// end part 4: hit}
开发者ID:joseph-zhong,项目名称:Robotics,代码行数:29,


示例6: main

int main(void) {    /* Initialize and clear the display */    gfxInit();    gdispClear(White);    /* Create the 3D window */    {    	GWindowInit	wi;		gwinClearInit(&wi);    	wi.show = TRUE; wi.x = (gdispGetWidth()-GL3D_WINDOW_SIZE)/2; wi.y = (gdispGetHeight()-GL3D_WINDOW_SIZE)/2; wi.width = GL3D_WINDOW_SIZE; wi.height = GL3D_WINDOW_SIZE;        gh = gwinGL3DCreate(0, &wi);    }    /* Init the 3D stuff */    setup();    init();    while(TRUE) {    	// rate control    	gfxSleepMilliseconds(FRAME_DELAY);    	// move and redraw    	spin();    }   }
开发者ID:bhdminh,项目名称:uGFX,代码行数:27,


示例7: arp_layer_receive

void arp_layer_receive( struct sk_buff *comer_skb ){	assert(comer_skb->pkgsize = 14 + 28);	struct arphdr *arphdr = (void *)(comer_skb->ethhdr + 1);	comer_skb->arphdr = arphdr;	////////////Entry here !!	///////////network byte order to host order, only performed on arp header	BYTE_ENDIAN_FLIP2(arphdr->hardware);	BYTE_ENDIAN_FLIP2(arphdr->protocol);	BYTE_ENDIAN_FLIP2(arphdr->operation);	BYTE_ENDIAN_FLIP4(arphdr->myip);	BYTE_ENDIAN_FLIP4(arphdr->yourip);	//////////done	//u8 *mac = arphdr->mymac;	//oprintf("arp layer receive: operation=%u, from mac(%x %x %x %x %x %x)", arphdr->operation, mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);	if(arphdr->operation == 1){		/* it's an inquiry */		arp_respond(comer_skb);	}		else if(arphdr->operation == 2){	/* it's a REPLY */		arp_act(comer_skb);	}	else spin("unknown operation");		//oprintf(" ARP layer exit/n");}
开发者ID:weiweishuo,项目名称:papaya,代码行数:26,


示例8: main

intmain(int argc, char *argv[]){   if (argc < 3) {      printf(1, "Usage: usage ticks tickets1 [tickets2].../n/n");      printf(1, "Spawns subprocesses, each of which will run for /n"            "approximately the given number of ticks. For each ticket/n"            "ammount given, a child process will spawn and request that/n"            "number of tickets./n");      exit();   }   int total = 0;   int i;   for (i = 0; i < argc - 2; i++) {      total += atoi(argv[i+2]);   }   int ret = settickets(total);   if (ret < 0) {      printf(1, "settickets failed/n");      exit();   }   // pids of children   int pids[NPROC];   // spawn children   for (i = 0; i < argc - 2; i++) {      pids[i] = fork();      if (pids[i] == 0) {         int ret = settickets(atoi(argv[i + 2]));         if (ret < 0) {            printf(1, "settickets failed/n");            exit();         }         // spin so we get scheduled         while(1) {            spin();         }      }   }   // print usage info   int ticks = atoi(argv[1]);   int start = uptime();   while(uptime() < start + ticks) {      sleep(100);      printf(1, "time: %d/n", uptime() - start);      printinfo();   }   // kill children   for (i = 0; i < argc - 2; i++) {      kill(pids[i]);      wait();   }   exit();}
开发者ID:vener91,项目名称:cs537,代码行数:60,


示例9: assertion_failure

void assertion_failure(char *exp, char *file, char * base_file, int line){		printl("%c  assert(%s) failed: file: %s, base_file: %s,ln%d",MAG_CH_ASSERT,exp, file, base_file, line);	spin("assertion_failure()");	__asm__ __volatile__("ud2");}
开发者ID:huangyukun2012,项目名称:DIY_kernel,代码行数:7,


示例10: ASSERT

voidQueueCommands::MakeSpace(uint32 size){	ASSERT((size & 1) == 0);	size *= sizeof(uint32);	bigtime_t start = system_time();	while (fRingBuffer.space_left < size) {		// wait until more space is free		uint32 head = read32(fRingBuffer.register_base + RING_BUFFER_HEAD)			& INTEL_RING_BUFFER_HEAD_MASK;		if (head <= fRingBuffer.position)			head += fRingBuffer.size;		fRingBuffer.space_left = head - fRingBuffer.position;		if (fRingBuffer.space_left < size) {			if (system_time() > start + 1000000LL) {				TRACE(("intel_extreme: engine stalled, head %lx/n", head));				break;			}			spin(10);		}	}	fRingBuffer.space_left -= size;}
开发者ID:Karvjorm,项目名称:haiku,代码行数:29,


示例11: TestA

/*======================================================================*                               TestA *======================================================================*/void TestA(){	int fd;	int i, n;	char filename[MAX_FILENAME_LEN+1] = "blah";	const char bufw[] = "abcde";	const int rd_bytes = 3;	char bufr[rd_bytes];	assert(rd_bytes <= strlen(bufw));	/* create */	fd = open(filename, O_CREAT | O_RDWR);	assert(fd != -1);	printf("File created: %s (fd %d)/n", filename, fd);	/* write */	n = write(fd, bufw, strlen(bufw));	assert(n == strlen(bufw));	/* close */	close(fd);	/* open */	fd = open(filename, O_RDWR);	assert(fd != -1);	printf("File opened. fd: %d/n", fd);	/* read */	n = read(fd, bufr, rd_bytes);	assert(n == rd_bytes);	bufr[n] = 0;	printf("%d bytes read: %s/n", n, bufr);	/* close */	close(fd);	char * filenames[] = {"/foo", "/bar", "/baz"};	/* create files */	for (i = 0; i < sizeof(filenames) / sizeof(filenames[0]); i++) {		fd = open(filenames[i], O_CREAT | O_RDWR);		assert(fd != -1);		printf("File created: %s (fd %d)/n", filenames[i], fd);		close(fd);	}	char * rfilenames[] = {"/bar", "/foo", "/baz", "/dev_tty0"};	/* remove files */	for (i = 0; i < sizeof(rfilenames) / sizeof(rfilenames[0]); i++) {		if (unlink(rfilenames[i]) == 0)			printf("File removed: %s/n", rfilenames[i]);		else			printf("Failed to remove file: %s/n", rfilenames[i]);	}	spin("TestA");}
开发者ID:Garfield-Chen,项目名称:hf-2011,代码行数:63,


示例12: check_service_req

boolcheck_service_req(ide_device_info *device){	ide_bus_info *bus = device->bus;	int status;	// fast bailout if there is no request pending	if (device->num_running_reqs == 0)		return false;	if (bus->active_device != device) {		// don't apply any precautions in terms of IRQ		// -> the bus is in accessing state, so IRQs are ignored anyway		if (bus->controller->write_command_block_regs(bus->channel_cookie,				&device->tf, ide_mask_device_head) != B_OK)			// on error, pretend that this device asks for service			// -> the disappeared controller will be recognized soon ;)			return true;		bus->active_device = device;		// give one clock (400 ns) to take notice		spin(1);	}	status = bus->controller->get_altstatus(bus->channel_cookie);	return (status & ide_status_service) != 0;}
开发者ID:AmirAbrams,项目名称:haiku,代码行数:29,


示例13: ioremap

void * ioremap(unsigned phys_addr, int size, unsigned flags){	if(phys_addr >> 30) {		oprintf(" %x ", phys_addr);		spin("too big IO physical address");	}	return (void *)(phys_addr + PAGE_OFFSET);}
开发者ID:weiweishuo,项目名称:papaya,代码行数:7,


示例14: rem_init

void rem_init(){    PMC_PCER = US0_PID;    US0_CR = RXDIS | TXDIS | RSTRX | RSTTX | RSTSTA;    USART0(PTCR) = RXTDIS | TXTDIS;    nextbyte = &ubuf[0];    nextbuf = &ubuf[0];    // Both buffers are already attached now    USART0(RPR) = (u_long) &ubuf[0];    USART0(RCR) = (u_long) UBUFLEN;    USART0(RNPR) = (u_long) &ubuf[UBUFLEN];    USART0(RNCR) = (u_long) UBUFLEN;    USART0(PTCR) = RXTEN;    US0_BRGR = BAUD_115200;    US0_RTOR = 18;           // bit times of delay before timeout    US0_MR = PAR_NONE | CHMODE_NORMAL | USCLKS_MCK | CHRL_8 | NBSTOP_1 | STTTO;    spin(1000);    US0_CR = RXEN | TXEN;    // junk = (u_char)US0_RHR;  // Junk leftover from break    // junk = (u_char)US0_RHR;}
开发者ID:iitalics,项目名称:cforth,代码行数:25,


示例15: task_hd

/** * Main loop of HD driver. * *****************************************************************************/PUBLIC void task_hd(){    MESSAGE msg;    init_hd();    while (1) {        send_recv(RECEIVE, ANY, &msg);        int src = msg.source;        switch (msg.type) {        case DEV_OPEN:            hd_open(msg.DEVICE);            break;        case DEV_CLOSE:            hd_close(msg.DEVICE);            break;        case DEV_READ:        case DEV_WRITE:            hd_rdwt(&msg);            break;        case DEV_IOCTL:            hd_ioctl(&msg);            break;        default:            dump_msg("HD driver::unknown msg", &msg);            spin("FS::main_loop (invalid msg.type)");            break;        }        send_recv(SEND, src, &msg);    }}
开发者ID:wwssllabcd,项目名称:myOS,代码行数:39,


示例16: quality

void MolecularOrbitals::on_addToQueueButton_clicked(bool) {   int quality(m_configurator.quality->value());   double isovalue(m_configurator.isovalue->value());   Data::Spin spin(m_configurator.alphaRadio->isChecked() ? Data::Alpha : Data::Beta);   QColor positive(Preferences::PositiveSurfaceColor());   QColor negative(Preferences::NegativeSurfaceColor());   bool simplifyMesh(m_configurator.simplifyMeshCheckBox->isChecked());   int index(m_configurator.surfaceType->currentIndex());   QVariant qvar(m_configurator.surfaceType->itemData(index));   bool isSigned(true);   int op(m_configurator.opacity->value());   double opacity = op == 100 ? 0.999 : double(op)/100.0;   Data::SurfaceInfo info(Data::SurfaceType::Custom, quality, isovalue,      positive, negative, isSigned, simplifyMesh, opacity);   switch (qvar.toUInt()) {      case Orbital: {         if (spin == Data::Alpha) {            info.type().setKind(Data::SurfaceType::AlphaOrbital);         }else {            info.type().setKind(Data::SurfaceType::BetaOrbital);         }         int orb1(m_configurator.orbitalRangeMin->currentIndex()+1);         int orb2(m_configurator.orbitalRangeMax->currentIndex()+1);         for (int i = std::min(orb1,orb2); i <= std::max(orb1, orb2); ++i) {             info.type().setIndex(i);             queueSurface(info);         }      } break;      case Density: {         info.setIsSigned(false);         info.type().setKind(Data::SurfaceType::TotalDensity);         queueSurface(info);      } break;      case SpinDiffDensity: {            info.type().setKind(Data::SurfaceType::SpinDensity);         queueSurface(info);      } break;      case SpinOnlyDensity: {         info.setIsSigned(false);         if (spin == Data::Alpha) {            info.type().setKind(Data::SurfaceType::AlphaDensity);         }else {            info.type().setKind(Data::SurfaceType::BetaDensity);         }         queueSurface(info);      } break;   }}
开发者ID:jlane-waikato,项目名称:IQmol,代码行数:60,


示例17: graph

void ExcitedStates::moSelectionChanged(bool tf){   QCPGraph* graph(qobject_cast<QCPGraph*>(sender()));   if (!tf || !graph) {      m_configurator.orbitalLabel->setText("");      return;   }      bool ok(true);;   unsigned orb(graph->name().toUInt(&ok));   if (!ok) return;   Data::OrbitalSymmetries const& orbitals(m_excitedStates.stateData().orbitalSymmetries());   unsigned nOrbs(orbitals.nOrbitals());   Data::Spin spin(Data::Alpha);   if (orb >= nOrbs) {      orb -= nOrbs;       spin = Data::Beta;   }   double energy(orbitals.energy(spin, orb));   QString symmetry(orbitals.symmetry(Data::Alpha, orb));   QString label(Data::SpinLabel(spin));   label += " " + QString::number(orb+1);   label += " orbital energy: ";   label += QString::number(energy, 'f', 3);   label += " Eh";   if (!symmetry.isEmpty()) label += "  Irrep " + symmetry;   m_configurator.orbitalLabel->setText(label);}
开发者ID:nutjunkie,项目名称:IQmol,代码行数:35,


示例18: main

int main(int argc, char* argv[]){    signal (SIGINT, sigintHandler);    printf("/033[?25l");  // Hide cursor    spin();    return 0;}
开发者ID:hammerhorn,项目名称:hammerhorn-jive,代码行数:7,


示例19: redUdit

void redUdit(){	deploy();	intake(true);	wait10Msec(10);	moveStraight(1, 0, 475);	wait10Msec(50);	moveStraight(-1, 0, 475);	//stopIntake();	lift(BUMP);	holdArm();	waitForButton();	intake(false);	wait10Msec(100);	waitForButton();	resetValues(0);	liftDown();	// end Devansh	waitForButton();	intake(true);	moveStraight(1, 0, (HALF_TILE));	wait10Msec(50);	pickUpBall(1);	spin(-1, 0, 200);	crossBump();	lift(BARRIER);	holdArm();	wait10Msec(30);	moveStraight(1, 0, 550);	intake(false);	// end udit	resetValues(1000);}
开发者ID:joseph-zhong,项目名称:Robotics,代码行数:33,


示例20: redDevansh

void redDevansh() // Places preload (1-2) + 2 buckies (2-4) + TURN LEFT Knocks buckies (1-6) + Places two Balls (2){	deploy();	intake(true);	wait10Msec(10);	moveStraight(1, 0, 475);	wait10Msec(50);	moveStraight(-1, 0, 475);	//stopIntake();	lift(BUMP);	holdArm();	waitForButton();	intake(false);	wait10Msec(100);	waitForButton();	resetValues(0);	liftDown();	// end Devansh	waitForButton();	intake(true);	moveStraight(1, 0, (HALF_TILE));	wait10Msec(50);	pickUpBall(1);	spin(-1, 0, 200);	crossBump();	lift(BARRIER);	holdArm();	wait10Msec(30);	moveStraight(1, 0, 550);	intake(false);	// end udit	resetValues(1000);}
开发者ID:joseph-zhong,项目名称:Robotics,代码行数:33,


示例21: worldSpace

void TransformManipulator::perform(const Ray * r){	if(isDetached()) return;	const Vector3F worldP = worldSpace().getTranslation();	Matrix44F ps;	parentSpace(ps);	Plane pl(ps.transformAsNormal(hitPlaneNormal()), worldP);	Vector3F hit, d;    float t;	if(pl.rayIntersect(*r, hit, t, 1)) {		d = hit - worldP;		if(d.length() > 10.f) return;				if(m_mode == ToolContext::RotateTransform) {			d = d.normal() * 8.f;			hit = worldP + d;		}				d = hit - m_currentPoint;				if(m_mode == ToolContext::MoveTransform)			move(d);		else			spin(d);					m_currentPoint = hit;	}}
开发者ID:spinos,项目名称:aphid,代码行数:28,


示例22: recast

void BCS_wf::restoreUpdate(Sample_point * sample, int e,                           Wavefunction_storage * wfstore){    BCS_wf_storage * store;    recast(wfstore, store);    jast.restoreUpdate(sample,e,store->jast_store);    detVal=store->detVal;    inverse=store->inverse;    //    // unpaired electrons go into extra one-body orbitals, this    // functionality will be resurrected later    //    //int nmo=moVal.GetDim(1);    //int nd=moVal.GetDim(2);    //for(int m=0; m< nmo; m++) {    //  for(int d=0; d< nd; d++) {    //    moVal(e,m,d)=store->moVal(m,d);    //  }    //}    if(spin(e)==0) {        int nj=derivatives.GetDim(1);        assert(nj==nelectrons(0));        int nd=derivatives.GetDim(2);        for(int j=0; j< nj; j++) {            for(int d=0; d< nd; d++) {                derivatives(e,j,d)=store->derivatives(j,d);            }        }        int ep=e+nelectrons(0);        for(int j=0; j< nj; j++) {            for(int d=0; d< nd; d++) {                derivatives(ep,j,d)=store->derivatives(j+nelectrons(0),d);            }        }    }    else {        int ni=derivatives.GetDim(0);        assert(ni==2*nelectrons(0));        int nd=derivatives.GetDim(2);        int rede=e-nelectrons(0);        for(int i=0; i< ni; i++) {            for(int d=0; d< nd; d++) {                derivatives(i,rede,d)=store->derivatives(i,d);            }        }    }    electronIsStaleLap=0;    electronIsStaleVal=0;    updateEverythingLap=0;    updateEverythingVal=0;    //calcLap(sample);}
开发者ID:nliko,项目名称:mainline,代码行数:59,


示例23: TestB

/** * The second routine for test. *  * @test just for test *****************************************************************************/void TestB(){	while(1){}	assert(0);		/* never arrive here */	spin("TestB()");}
开发者ID:ELWIN-MAO,项目名称:OrangeS,代码行数:13,


示例24: hex_encode

void Session_Manager_SQL::remove_entry(const std::vector<byte>& session_id)   {   auto stmt = m_db->new_statement("delete from tls_sessions where session_id = ?1");   stmt->bind(1, hex_encode(session_id));   stmt->spin();   }
开发者ID:AlexNk,项目名称:botan,代码行数:8,


示例25: TestC

/*======================================================================*                               TestB *======================================================================*/void TestC(){	spin("TestC");	/* assert(0); */	while(1){		printf("C");		milli_delay(200);	}}
开发者ID:Garfield-Chen,项目名称:hf-2011,代码行数:12,


示例26: home

	/// Go to origin, reset orientation	Nav& home(){ 		quat().identity();		view(0, 0, 0);		turn(0, 0, 0); 		spin(0, 0, 0);		vec().set(0);		updateDirectionVectors();		return *this;	}
开发者ID:AlloSphere-Research-Group,项目名称:alive,代码行数:10,


示例27: CALLED

voidFDIReceiver::DisablePLL(){	CALLED();	uint32 targetRegister = fRegisterBase + PCH_FDI_RX_CONTROL;	write32(targetRegister, read32(targetRegister) & ~FDI_RX_PLL_ENABLED);	read32(targetRegister);	spin(100);}
开发者ID:Paradoxianer,项目名称:haiku,代码行数:9,


示例28: task_fs

void task_fs(){#ifdef DEBUG_FS    printl("in task_fs/n");#endif    init_fs();    MESSAGE message;    memset(&message,0,sizeof(message));    while(TRUE){        send_receive(RECEIVE,ANY,&message);                int source_pid=message.source_pid;        int fd;	        switch(message.type){        case INFO_FS_CREATE:            message.res_bool=do_create(&message);            break;        case INFO_FS_UNLINK:            message.res_bool=do_unlink(&message);            break;        case INFO_FS_LS:            message.res_int=do_ls(&message);            break;        case INFO_FS_OPEN:            fd=do_open(&message);            message.fd=fd;            break;        case INFO_FS_READ:            do_read(&message);            break;        case INFO_FS_WRITE:            do_write(&message);            break;        case INFO_FS_SEEK:            do_seek(&message);            break;        case INFO_FS_CLOSE:            message.res_int=do_close(&message);            break;        default:            printl("/n/n/nunknown message type:%d/n",message.type);            assert(FALSE,"unknown message type!");        }        if(message.type!=INFO_SUSPEND_PROCESS){            send_receive(SEND,source_pid,&message);        }else{            printl("inof_suspend_process/n");        }    }#ifndef _FS_H_#define _FS_H_    #endif /* _FS_H_ */    while(1)        ;    spin("never here");}
开发者ID:565407548,项目名称:micro_os,代码行数:57,



注:本文中的spin函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ spin_is_locked函数代码示例
C++ spiffs_get_cache函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。