国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

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

分享到微博請遵守國家法律
黄山市| 海宁市| 腾冲县| 曲阳县| 五家渠市| 五大连池市| 广安市| 包头市| 彩票| 乐至县| 稻城县| 马尔康县| 金秀| 惠州市| 牡丹江市| 容城县| 鹿邑县| 镶黄旗| 托克逊县| 安阳县| 喀什市| 子洲县| 冀州市| 汉中市| 南部县| 曲周县| 大港区| 安仁县| 高雄市| 阜宁县| 手机| 龙井市| 沙洋县| 玉田县| 巍山| 崇礼县| 庆安县| 抚顺市| 西林县| 遵义市| 大洼县|