語法 #須引入這個header #include <poll.h> #poll用法 int poll(struct pollfd *fds, nfds_t nfds, int timeout); #define _GNU_SOURCE /* See feature_test_macros(7) */ #include <signal.h> #include <poll.h> int ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *tmo_p, const sigset_t *sigmask);
Showing posts with label C. Show all posts
Showing posts with label C. Show all posts
Monday, 10 April 2017
Linux poll 機制
Monday, 22 February 2016
C Data Type Size
- Introduction
之前大一時,C的教科書裏面一開始就有許多C的資料型態的介紹,
哪一個佔多少byte,可呈現的數值範圍各是多少,
這東西老師沒有特別講解,也沒有說很重要,
所以一直都以為根本不用去記它,
記它幹嘛? 隨便都可以查的到的東西@@
結果,沒去背它果然吃很多虧,
先不說實用面,就是宣告錯型態會浪費很多記憶體空間,
降低很多效能等等,
至少,很多公司面試都很喜歡考阿!!!
Subscribe to:
Posts (Atom)