无码av一区二区三区无码,在线观看老湿视频福利,日韩经典三级片,成 人色 网 站 欧美大片在线观看

歡迎光臨散文網(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休眠解決方法的評論 (共 條)

分享到微博請遵守國家法律
革吉县| 宿迁市| 高碑店市| 琼中| 新津县| 昌平区| 长子县| 平陆县| 伊金霍洛旗| 鄂尔多斯市| 林甸县| 邢台市| 宁海县| 万荣县| 尖扎县| 沙坪坝区| 潮州市| 遂宁市| 扎赉特旗| 山丹县| 横山县| 上林县| 江都市| 玉树县| 江永县| 大庆市| 上饶县| 三都| 辰溪县| 怀仁县| 长沙县| 滦平县| 吉首市| 多伦县| 洪湖市| 灵台县| 长乐市| 井研县| 揭阳市| 白朗县| 永胜县|