亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫(kù)
最近訪問板塊 發(fā)新帖
查看: 6071 | 回復(fù): 2
打印 上一主題 下一主題

[C] help pthread_tryjoin_np函數(shù) [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2009-04-10 12:05 |只看該作者 |倒序?yàn)g覽
我在ubuntu上調(diào)試程序,內(nèi)核比較新,線程庫(kù)中有pthread_tryjoin_np函數(shù)。但是實(shí)際環(huán)境是FC2:
內(nèi)核是2.6.17, gcc (GCC) 3.3.3

線程庫(kù)是:
/lib/tls/libpthread.so.0
NPTL 0.61 by Ulrich Drepper
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Forced unwind support include

編譯程序:
gcc -Wall -g -std=c99 -D_GNU_SOURCE -pthread -c *.c

程序如下:

@:~$ cat 1.c
#define _GNU_SOURCE
#include <features.h>
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>

void fun()
{
    printf("aaaaa\n");
    sleep(10);
}
int
main()
{
// int pthread_create(pthread_t * thread, pthread_attr_t * attr, void * (*start_routine)(void *), void * arg);

//extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW;

    pthread_t pid;
    printf("create\n");
    pthread_create(&pid, NULL, (void *)fun, NULL);

    int i;
    i=pthread_tryjoin_np(pid, NULL);
    printf("i = %d \n", i);

    exit(0);
}




有解決方案嗎?

能不能升級(jí)一下線程庫(kù),只升級(jí)線程庫(kù),別升級(jí)glibc,那樣動(dòng)作太大。謝謝各位,在線等。。。

[ 本帖最后由 79hy 于 2009-6-10 10:34 編輯 ]

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2009-04-10 12:08 |只看該作者
pthread_tryjoin_np

論壇徽章:
0
3 [報(bào)告]
發(fā)表于 2009-04-10 19:21 |只看該作者

回復(fù) #1 79hy 的帖子

我的系統(tǒng)上是好的,你仔細(xì)查一下你的線程庫(kù),是不是版本太低導(dǎo)致的,那是一個(gè)鏈接錯(cuò),編譯過了,說明你已經(jīng)把那個(gè)函數(shù)的聲明打開了
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國(guó)互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP