ChinaUnix.net
相关文章推荐:

pthread_cleanup_push

void clean ( void * p ) { printf ( "clean()\n" ); } void * thread ( void * p ) { pthread_cleanup_push( clean, NULL); printf ( "thread sleep\n" ); sleep (10); pthread_cleanup_pop(0); } int main () { pthread_t id; pthread_mutexattr_t attr; pthread_create ( &id, NULL, thread, NULL ); printf ( "main sleep\n"); s...

by 星之孩子 - Linux论坛 - 2004-11-30 12:00:15 阅读(1640) 回复(0)

相关讨论

我学习写了一段线程程序: +1 /* testpthread.c */ +2 #include +3 #include <pthread.h> +4 #include +6 pthread_mutex_t mutex; ... ... ... +32 pthread_cleanup_push(pthread_mutex_unlock, (void *)&mutex); ... ... ... 在AIX下编译报错: "testpthread.c", line 32.26: 1506-280 (W) Function argument assignment between types "void(*)(void*)" and "in...

by anfield_xu - C/C++ - 2006-07-17 10:08:39 阅读(4401) 回复(5)

#include #include <pthread.h> void cleanup(void *arg) { printf("%s\n", (char*)arg); } void *threadfunc(void *arg) { char *s = "thread1"; pthread_cleanup_push(cleanup, (void*)s); if(arg) return ((void*)0); pthread_cleanup_pop(0); return ((void*)1); } int main() { pthread_t thread1; pthread_create(&thread1, NU...

by cgspwei - C/C++ - 2007-11-21 13:43:24 阅读(4544) 回复(3)

想问一下,cleanup的时间和甚么有关,硬盘的增长和cleanup时间的长短有甚么直接的联系,是不是和cleanup的设置相关。望解答,谢谢。

by tamashii - AS400 - 2007-09-03 11:06:22 阅读(2032) 回复(1)

1.shutdown the SF6800 steps 1)telnet the OS hosts (domain a),execute: #init 5 2)connect the serial console witch SC0 3)Type 1 into the domain System Controller 'USF6800': Type 0 for Platform Shell Type 1 for domain A console Type 2 for domain B console Type 3 for domain C console Type 4 for domain D console Input: 1 -- Type 1 for domain A console ...

by Gavin_Peng - Solaris文档中心 - 2007-10-29 21:20:09 阅读(846) 回复(0)

C++ introduced the concept of a constructor, a special method automatically called when an objects is created. Java also adopted the constructor, an in additon has a garbage collector that automatically releases memory resources when they're no longer being used. Guaranteed initialization with the constructor In Java, the class designer can guarantee initialization of ...

by Kingway886 - Java文档中心 - 2006-07-17 09:14:08 阅读(957) 回复(0)

服务端报错: opevz openvpn 服务器,客户端连上后,不能上网,不走服务端,该如何设置 ? nat 路由策略 ? [ 本帖最后由 liang3391 于 2009-4-11 13:41 编辑 ]

by liang3391 - 服务器应用 - 2009-04-09 17:35:15 阅读(1974) 回复(1)

[color="#800080"]sms push格式 [color="#000000"]sms push格式 00 ’SMSC Len。用手机上设置短信中心号码 51 ’submit type 00 ’SMS_TP_Message_Reference type 0B ’对方电话的长度 A1 ’Number type 13166416588F8 ’电话号码:13661456888 00 ’SMS_TP_PID F5 ’SMS DCS A744 ’SMS available date 0B05040B8423F00003030101 ’Wap push Header 1 [color="#ff0000"]2906...

by lc0060305 - Java文档中心 - 2008-01-10 08:56:08 阅读(2644) 回复(0)