LINUXÄÚºËÖÐminºÍmaxºêµÄѧϰ
add linux kernel min, max define:
include/linux/kernel.h
/*
* min()/max() macros that also do
* strict type-checking.. See the
* "unnecessary" pointer comparison.
*/
#define min(x,y) \
(__extension__\
({ \
typeof(x) _x = (x); \
typeof(y) _y = (y); \
(void) (&_x == &_y); \
_x < _y ? _x : _y; }) \
)
#define max(x,y) \
(__extension__\
({ \
typeof(x) _x = (x); \
typeof(y) _y = (y); \
(void) (&_x == &_y); \
_x > _y ? _x : _y; }) \
)
ÈçÉÏÊÇinclude/linux/kernel.hÖйØÓÚminºÍmaxÁ½¸öºÜ³£ÓõĺêµÄ¶¨Ò壬ÔÚÆäÖÐÎÒÃÇ¿ÉÒÔ¿´µ½ÒÔϼ¸¸ö¹Ø¼üµã£º
1. ΪºÎ²»Óøü¼òµ¥µÄ(x>y)?x:y ÕâÑùµÄ·½Ê½À´¶¨Ò壬¶øÒªÖØи³ÖµÒ»´Î¡£
2. ΪºÎÒªÓÃ({ })ÕâÑùµÄ½á¹¹°üΧ´úÂë¿é
3. ÄǸö__extension__ÊÇʲô¶«¶«£¿ £¨Óеİ汾ûÓÐÕâ¸ö__extension__)
4. (void)(&_x == &_y)ÓÐʲôÓ㬲»ÊÇÍÑÁË¿ã×Ó·Åƨô
½â´ð£º
1. Èç¹ûÓû§Ê¹ÓÃÁËmin(x++,y++)»áÓÐÔõÑùµÄ½á¹û£¿
ËùÒÔ×îºÃµÄ°ì·¨ÊDZÜÃâÔÚºêµÄʵÌåÀïÈòÎÊý³öÏÖÒ»´ÎÒÔÉÏ¡£ÀϵÄlinuxÓõÄÊÇ x>?y£¬Õâ¸ö>?²Ù×÷·ûÊÇ·µ»ØxºÍyÖнϴóµÄÒ»¸ö£¬²»¹ýGCCµÄÎĵµÀïÒѾ¾ö¶¨Å×ÆúÕâÖÖÀϵÄÓ÷¨ÁË¡£
2. GCCµÄÀ©Õ¹ÀïÏñ{ }ÕâÖֽṹҲÊÇ¿ÉÒÔÓÐÖµµÄ£¬ÆäÖµ¾ÍÊÇÆäÖÐ×îºóÒ»¸öÓï¾äµÄÖµ£¨°üÀ¨×óÖµ£©£¬ÕâÀïÍâÃæÔÙ¼Ó¸öÀ¨ºÅÊÇΪÁ˱£ÏÕ£¬±ÈÈ磺
printf("²Â²Â»áÏÔʾʲô£¿\n´ð°¸ÊÇ:%d\n",({
&
Ïà¹ØÎĵµ£º
Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖÐÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀÐÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......
For all those who are beginners in any linux(ubuntu) find hard to find the package files of their distro and end up in finding an source package(which is either in tar.gz or .gz).. so now people think how to install these source files…..
lets now see how would you be installing source files ......
LinuxµÄÓû§ºÍÓû§×é¹ÜÀí
LinuxϵͳÊÇÒ»¸ö¶àÓû§¶àÈÎÎñµÄ·Öʱ²Ù×÷ϵͳ£¬ÈκÎÒ»¸öҪʹÓÃϵͳ×ÊÔ´µÄÓû§£¬¶¼±ØÐëÊ×ÏÈÏòϵͳ¹ÜÀíÔ±ÉêÇëÒ»¸öÕ˺ţ¬È»ºóÒÔÕâ¸öÕ˺ŵÄÉí·Ý½øÈëϵͳ¡£Óû§µÄÕ˺ ......
ÓÐʱÓöµ½ÈçÏÂÎÊÌ⣬Íø¿¨ÉÏÓиö²æ£¬ÈκÎÃüÁÎÞ·¨ÐÞ¸´¡£
·¢ÏÖÍø¿¨ºì²æ֮ǰÊÔ¹ýÏÂÃæÃüÁ¿Ï¶¨¶¼²»Ðеġ£
sudo ifconfig eth0 down
sudo ifconfig eth0 up
sudo /etc/init.d/dhcp3-server restart
sudo /etc/init.d/networking restart
ÎÊÌâ½â¾öºÜ¼òµ¥£¬°ÑÈçϵĸ´Ñ¡¿ò¹´Éϼ´¿É£¬ÐéÄâ»ú¿ª» ......
1. useradd ̞
useraddÃüÁÔðÌí¼ÓÓû§µ½Linuxϵͳ£¨Ö»ÓйÜÀíÔ±¿ÉÒÔʹÓÃÕâ¸öÃüÁ¡£
Àý£º
useradd tom
2.userdel ̞
userdelÃüÁîɾ³ýÒ»¸öÓû§ÕË»§£¨Ö»ÓйÜÀíÔ±¿ÉÒÔʹÓÃÕâ¸öÃüÁ¡£
Àý£º
userdel tom
3.passwd ̞
µ±´´½¨Ò»¸öÓû§Ö®ºóÐèҪΪÓû§ÉèÖÃÃÜÂ룬passwd ¿ÉÒÔÍê³É´Ë¹¦ÄÜ¡£µ±passwdºóÃæûÓвΠ......