最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

linux系統(tǒng)中pthread_t定義,鍵盤消失和lcd休眠解決方法

2023-03-18 20:59 作者:amyliya2018  | 我要投稿

第一:linux系統(tǒng)中pthread_t定義

在linux中可以使用pthread_t來查看對應(yīng)變量的定義

#include <pthread.h>

#include <unistd.h>

pthread_t;

? ?/* Thread identifiers. ?The structure of the attribute type is not

? exposed on purpose. ?*/

? ?typedef unsigned long int pthread_t;

總結(jié):可以看到pthread_t 就是unsigned long int ,在本系統(tǒng)中占用8個字節(jié)

,即為uint64,打印線程ID需要用%lu格式。

第二: linux右上角鍵盤消失

如果用的是ibus:

1. 先把原先的ibus進(jìn)程kill掉

killall ?ibus-daemon

2. 啟動一個新的ibus進(jìn)程

ibus-daemon ? ?-d

然后就可以看見鍵盤圖標(biāo)又出現(xiàn)在右上角了

如果使用的是fcitx的小企鵝輸入法:

1. killall fcitx

2. fcitx -d

就看到右上角的輸入法圖標(biāo)了


第三:linux內(nèi)核下lcd屏幕自動休眠方法

臨時解決方法一:echo 0 > /sys/class/graphics/fb0/blank

長期解決辦法二:

#include <sys/types.h>

#include <sys/stat.h>

#include <fcntl.h>

#include <unistd.h>

int main(int argc, char *argv[])

{

int fd;

fd = open("/dev/tty0",O_RDWR);

write(fd, “\033[9;0]”, 8);

close(fd);

return 0;

}


1.程序存為display_time.c

2 交叉編譯 arm-linux-gcc -o display_time display_time.c

3.display_time復(fù)制到根目錄下

4 運行 ./display_time

如果要開機(jī)自動啟動,復(fù)制到根目錄后,在/etc/init.d/rcS里加上一句 /display_time 。


? ?點贊+關(guān)注,不迷路,謝謝大家。

linux系統(tǒng)中pthread_t定義,鍵盤消失和lcd休眠解決方法的評論 (共 條)

分享到微博請遵守國家法律
科技| 湖州市| 白沙| 施甸县| 浪卡子县| 武胜县| 长垣县| 呈贡县| 临夏市| 西乌| 铜梁县| 宁远县| 祁阳县| 阿合奇县| 玉林市| 博罗县| 岗巴县| 绥棱县| 扶余县| 荣昌县| 云阳县| 五峰| 南开区| 包头市| 桐柏县| 重庆市| 新龙县| 成武县| 德令哈市| 海门市| 台南县| 丹寨县| 安阳市| 怀柔区| 株洲市| 普陀区| 黑水县| 南澳县| 云浮市| 屯昌县| 徐闻县|