原创 梓益C語言學習筆記之指針

梓益C語言學習筆記之指針一、32位平臺下,地址是32位,所以指針變量佔32位,共4個字節二、內存單元的地址即爲指針,存放指針的變量稱爲指針變量,故:“指針”是指地址,是常量,“指針變量”是取值爲地址的變量。char*型指針一次取一個字節,i

原创 梓益C語言學習筆記之指針

梓益C語言學習筆記之指針一、32位平臺下,地址是32位,所以指針變量佔32位,共4個字節二、內存單元的地址即爲指針,存放指針的變量稱爲指針變量,故:“指針”是指地址,是常量,“指針變量”是取值爲地址的變量。char*型指針一次取一個字節,i

原创 C語言實現的哈希表

C語言實現的哈希表哈希表可以簡單理解爲多個鏈表的集合,將每個新的成員根據其哈希值進行分類,這樣可以加快鏈表的查找速度參考:https://www.cnblogs.com/s-b-b/p/6208565.html #include <stdi

原创 C語言多線程

#include <stdio.h>#include <pthread.h> #define NUM 10 void thread(void * arg){int i;for (i=0;i<1;i++) {printf ("in threa

原创 Linux開發環境搭建

Linux開發環境搭建LINUX:1.設置更新源sudo gedit /etc/apt/sources.listsudo apt-get update2.sambasudo apt-get install samba smbfs smbcl

原创 Linux開發環境搭建

Linux開發環境搭建LINUX:1.設置更新源sudo gedit /etc/apt/sources.listsudo apt-get update2.sambasudo apt-get install samba smbfs smbcl

原创 C語言多線程

#include <stdio.h>#include <pthread.h> #define NUM 10 void thread(void * arg){int i;for (i=0;i<1;i++) {printf ("in threa

原创 C語言目錄操作

#include <stdio.h>#include <stdlib.h>#include <sys/types.h>#include <dirent.h> int main(void){DIR dir = NULL;struct dire

原创 C語言多線程目錄操作

#include <stdio.h>#include <pthread.h>#include <stdlib.h>#include <sys/types.h>#include <dirent.h> #define NUM 2 void th

原创 C語言計算程序中某一個函數或算法的執行時間

計算程序中某一個函數或算法的執行時間 #include <stdio.h> #include <time.h> #include <stdlib.h> int main() { long i = 10000000L; cl

原创 C語言雙向循環鏈表api(源自gluster源碼)

C語言雙向循環鏈表api(源自gluster源碼)基本的操作如增加、刪除和遍歷等 #include <stdio.h> #include <stdlib.h> #include <string.h> /*定義表頭*/ struct li

原创 u-boot的啓動、編譯過程和命令添加

u-boot的啓動、編譯過程和命令添加MCU:s5pv210開發板:unsp210u-boot:1.3.4一、簡介U-Boot是一種支持多架構,多操作系統的Bootloader(啓動引導程序)u-boot目前最新版本是:http://ftp

原创 LINUX系統編程之線程

LINUX系統編程之線程情景:在雙核虛擬機中有兩個線程函數執行以下功能:線程一:printf("hello\n");線程二:printf("world\n");程序運行時在單核狀態下和雙核狀態下兩個線程的執行順序不一樣,請問它們是根據怎樣的

原创 Linux開發環境搭建

Linux開發環境搭建LINUX:1.設置更新源sudo gedit /etc/apt/sources.listsudo apt-get update2.sambasudo apt-get install samba smbfs smbcl

原创 LINUX系統編程之IPC

LINUX系統編程之IPC(Inter Processes Communication)一、信號1.信號的產生軟件中斷,異步通信,ctrl+c,kill函數,kill命令,硬件異常(段錯誤),軟件異常2.進程收到信號後可以用如下方法處理:執