Linux²Ù×÷ϵͳϵĶàÏ̱߳à³ÌÏêϸ½âÎö£¨2£©
2¡¢Ï̵߳ÄÖÕÖ¹
Èç¹û½ø³ÌÖÐÈκÎÒ»¸öÏß³ÌÖе÷ÓÃexit£¬_Exit,»òÕßÊÇ_exit£¬ÄÇôÕû¸ö½ø³Ì¾Í»áÖÕÖ¹£¬
Óë´ËÀàËÆ£¬Èç¹ûÐźŵÄĬÈϵ͝×÷ÊÇÖÕÖ¹½ø³Ì£¬ÄÇô£¬°Ñ¸ÃÐźŷ¢Ë͵½Ï̻߳áÖÕÖ¹½ø³Ì¡£
Ï̵߳ÄÕý³£Í˳öµÄ·½Ê½£º
(1) Ïß³ÌÖ»ÊÇ´ÓÆô¶¯Àý³ÌÖзµ»Ø£¬·µ»ØÖµÊÇÏß³ÌÖеÄÍ˳öÂë
(2) Ï߳̿ÉÒÔ±»ÁíÒ»¸ö½ø³Ì½øÐÐÖÕÖ¹
(3) Ïß³Ì×Ô¼ºµ÷ÓÃpthread_exitº¯Êý
Á½¸öÖØÒªµÄº¯ÊýÔÐÍ£º
#include <pthread.h>
void pthread_exit(void *rval_ptr);
/*rval_ptr Ïß³ÌÍ˳ö·µ»ØµÄÖ¸Õë*/
int pthread_join(pthread_t thread,void **rval_ptr);
/*³É¹¦½áÊø½ø³ÌΪ0,·ñÔòΪ´íÎó±àÂë*/
Àý³Ì6
³ÌÐòÄ¿µÄ£ºÏß³ÌÕý³£Í˳ö£¬½ÓÊÜÏß³ÌÍ˳öµÄ·µ»ØÂë
³ÌÐòÃû³Æ£ºpthread_exit.c
/********************************************************************************************
** Name:pthread_exit.c
** Used to study the multithread programming in Linux OS
** A example showing a thread to exit and with a return code.
** Author:zeickey
** Date:2006/9/16
** Copyright (c) 2006,All Rights Reserved!
*********************************************************************************************/
#include <stdio.h>
#include <pthread.h>
#include <unistd.h>
void *create(void *arg)
{
printf("new thread is created ... \n");
return (void *)8;
}
int main(int argc,char *argv[])
{
pthread_t tid;
int error;
void *temp;
error = pthread_create(&tid, NULL, create, NULL);
if( error )
{
printf("thread is not created ... \n");
&n
Ïà¹ØÎĵµ£º
/home
×÷ΪÎļþ·þÎñÆ÷µÈ¶àÓû§ÏµÍ³Ê¹ÓÃʱ£¬½¨ÒéÉèÖÃÓÚµ¥¶À·ÖÇøÖС£ÕâÑùµ±·¢²¼µÄϵͳÐèÒªÉý¼¶Ê±£¬»òÕßÖØ×°ÏµÍ³Ê±ÏÔµÃÓÈÆä±ãÀû¡£
/var
´ËĿ¼Öдæ·ÅlogµÈʱ³£¸üеÄÎļþ£¬ÏñsyslogÕâÑùµÄÎļþÈÝÁ¿ºÜ´ó£¬Óг¬³öÎļþϵͳÈÝÁ¿µÄ¿ÉÄÜ¡£½¨ÒéÉèÖÃÓÚµ¥¶ÀµÄ·ÖÇøÖС£
/usr
½öÔÚÌí¼ÓгÌÐòʱ»á¸Ä±äÆäÖеÄÄÚÈÝ£¬½¨ÒéÉèÖÃΪֻ¶Á ......
LinuxϵĿâ--ÖØÒªµÄ´úÂ븴ÓûúÖÆ¡¾×ª¡¿
2008-03-26 17:57
±¾ÎÄÖ÷Òª½â¾öÒÔϼ¸¸öÎÊÌâ
1 ΪʲôҪʹÓÿ⣿
2 ¿âµÄ·ÖÀà
3 ´´½¨×Ô¼ºµÄ¿â
»òÐí´ó¼Ò¶Ô×Ô¼º³õѧ
linuxʱµÄÇéÐÎÈÔ¼ÇÒäÓÈаɡ£Èç¹ûûÓÐÒ»¸öÄܽϺõĽâ¾öÒÀÀµ¹ØÏµµÄ°ü¹ÜÀíÆ÷£¬ÔÚlinuxϰ²×°Èí¼þ½«ÊÇÒ»¼þ¼°ÆäÍ´¿àµÄ¹¤×÷¡£Äã×°a°üʱ£¬¿ÉÄÜ»áÌáʾ
ÄãÒªÏÈ×°b°ü£¬ ......
ǶÈëʽLinuxϲÊÉ«LCDÇý¶¯µÄÉè¼ÆÓëʵÏÖ
ÕªÒª£º±¾ÎĽéÉÜÁËÈçºÎÔÚǶÈëÔÚ¿ª·¢²ÊÉ«LCDÏÔʾÇý¶¯µÄ·½·¨£¬²¢¶ÔLinuxÖеÄÏÔʾÇý¶¯³ÌÐò½á¹¹ºÍ¿ò¼Ü×÷Ò»½éÉÜ¡£
³¤ÆÚÒÔÀ´£¬ÔÚ³£¼ûµÄÕÆÉϵçÄÔ£¨PDA£©µÈСÐÍÊÖ³ÖʽÉ豸ÉÏ£¬ÓÉÓÚÓ²¼þÌõ¼þµÈµÄÏÞÖÆ£¬ÎÒÃÇ¿´µ½µÄÏÔʾÆ÷¼þͨ³£Êǵ¥É«LCD£¬Óû§½çÃæÒ²·Ç³£¼òµ¥£¬¼¸ºõ¿´²»µ½ PC ......
Linux USBÇý¶¯¿ò¼Ü·ÖÎö£¨Ò»£©
³õ´Î½Ó´¥ÓëOSÏà¹ØµÄÉ豸Çý¶¯±àд£¬¸Ð¾õ»¹Í¦ÓÐÒâ˼µÄ£¬ÎªÁ˲»ÖÁÓÚÍüµô¿´¹ýµÄ¶«Î÷£¬±Ê¼Ç¸ú×ܽᵱȻ²»¿Éȱ£¬¸üºÎ¿öÎÒ¾ö¶¨ÎªÇ¶ÈëʽÂôÃüÁË¡£ºÃ£¬ÑÔ¹éÕý´«£¬ÎÒ˵һ˵Õâ¶Îʱ¼äµÄÊÕ»ñ£¬¸ú´ó¼Ò·ÖÏíÒ»ÏÂLinuxµÄÇý¶¯¿ª·¢¡£µ«Õâ´ÎÖ»ÏÈÕë¶ÔLinuxµÄUSB×Óϵͳ×÷·ÖÎö£¬ÒòΪÖÜÎåÑÐÌÖÀϰå´ß» ......