多多色-多人伦交性欧美在线观看-多人伦精品一区二区三区视频-多色视频-免费黄色视屏网站-免费黄色在线

國內最全IT社區平臺 聯系我們 | 收藏本站
阿里云優惠2
您當前位置:首頁 > 服務器 > Nginx之main初探ngx_init_cycle()(上)

Nginx之main初探ngx_init_cycle()(上)

來源:程序員人生   發布時間:2015-04-01 08:23:39 閱讀次數:3240次

Nginx之main初探ngx_init_cycle()(上)

由于ngx_init_cycle()函數非常龐大,這里只給出前400+行的函數調用關系,后400+將在后面的文章中給出。

-->ngx_init_cycle(&init_cycle) -->ngx_timezone_update() -->time() -->localtime()注1: -->ngx_timeofday() -->ngx_time_update() -->ngx_gettimeofday() -- gettimeofday() -->ngx_gmtime() -->ngx_localtime() -->ngx_memory_barrier() -->ngx_increase_pipe_generation() -->ngx_create_pool() -->ngx_memalign() -- ngx_alloc(size, log) -->ngx_pcalloc() -->ngx_palloc() -->ngx_align_ptr()注2: -->ngx_palloc_block() -->ngx_memalign() -->ngx_align_ptr() -->ngx_palloc_large() -->ngx_alloc() -->malloc() -->ngx_palloc() -->ngx_memzero() -->memset() -->ngx_list_init() -->ngx_palloc() -->ngx_queue_init() -->ngx_strlen() -- strlen() -->ngx_pnalloc() -->ngx_palloc_block() -->ngx_palloc_large() -->ngx_strlow() -->ngx_tolower() -- ((c >= 'A' && c <= 'Z') ? (c | 0x20) : c) -->ngx_array_create() -->ngx_palloc() -->ngx_array_init() -->ngx_palloc() -->ngx_conf_param() -->ngx_memzero() -->ngx_conf_parse() -->ngx_conf_parse() -->ngx_open_file() -- open() -->ngx_fd_info() -- fstat() -->ngx_alloc() -->ngx_conf_read_token() -->ngx_file_size() -->ngx_memmove() -- memmove() -->ngx_read_file() -- read() -->ngx_write_console() -- ngx_write_fd() --> write() -->ngx_array_push() -->ngx_conf_handler() -->ngx_show_dso_directives() -->ngx_get_conf() -->ngx_is_dynamic_module() -->ngx_get_conf() -->ngx_test_lockfile() -->ngx_open_file() -->ngx_close_file() -->ngx_delete_file() -->ngx_create_paths() -->ngx_create_dir() -- mkdir() -->ngx_file_info() -->ngx_log_open_default() -->ngx_conf_open_file()

下面是陌生函數的用法和小知識點:

注1:time()與localtime()函數不是Nginx自己實現的,是庫函數。其用法以下

/** * filename: test_localtime.c * description: used to see the usage of function localtime() * date: 2015-03-06 * author: HowardKing * version: 1.0 */ #include <stdio.h> #include <stdlib.h> #include <time.h> int main(void) { time_t timer; // time_t is long int struct tm *tblock; time(NULL); tblock = localtime(&timer); printf("Local time is: %s", asctime(tblock)); return 0; }


程序輸出結果:
<span style="white-space:pre"> </span>Local time is: Fri Jul 31 05:00:00 4461676



注2:C語言中long類型是與機器字長相對應的,而int型來講1般都是4字節。

/** * filename: test_unsigned_long.c * description: find out the size of type long * date: 20150306 * author: HowardKing * version: v1.0 */ #include <stdio.h> #include <stdlib.h> int main(void) { int ii = 100; unsigned long ll = 100; printf("%d ", sizeof(ii)); printf("%d ", sizeof(ll)); return 0; }


程序輸出結果:
4 8


生活不易,碼農辛苦
如果您覺得本網站對您的學習有所幫助,可以手機掃描二維碼進行捐贈
程序員人生
------分隔線----------------------------
分享到:
------分隔線----------------------------
關閉
程序員人生
主站蜘蛛池模板: 男女男精品视频 | 色丁香色婷婷 | 日本96在线精品视频免费观看 | 精品日韩欧美国产一区二区 | 成人欧美一区二区三区视频不卡 | 成人性a激情免费视频 | 婷婷在线视频国产综合 | 美女被h | 亚洲一级毛片免费在线观看 | 伊人色院成人蜜桃视频 | 亚洲逼 | 亚洲国产精品久久久久久 | 啄木乌欧美一区二区三区 | 欧日韩一区二区三区 | 最新国产在线播放 | 性欧美18~19sex高清播放 | 老司机福利在线免费观看 | 免费欧洲毛片a级视频 | 欧美美女free | 欧美亚洲国产视频 | 亚洲一级毛片 | 日本怡春院欧美一区二区三区 | 国产亚洲欧美在线观看的 | 天堂在线www网亚洲 天堂在线xw | 国产视频大全 | 国产精品成人一区二区不卡 | 成 人国产在线观看高清不卡 | 亚洲特黄大黄一级毛片 | 91精品综合久久久久3d动漫 | 日本久久精品免视看国产成人 | 欧美性bbw| 在线播放精品视频 | 日本在线免费 | 自拍偷拍亚洲图片 | 精品国产一区二区三区国产馆 | 欧美福利视频一区在线 | 日本免费一区二区视频 | 欧美aa级| 国产成人精品亚洲一区 | 亚洲人人爱 | 看全色黄大色大片免费久久久 |