ChinaUnix.net
相关文章推荐:

semaphore mutex适用场合

想了一下,没有办法呢

by 太平绅士 - C/C++ - 2015-03-19 23:15:09 阅读(7808) 回复(16)

相关讨论

1)p1-p4四个process, A1,A2,B1,B2,C1,D1六个线程: P1 P2 P3 P4 -------------------------------- A1 B1 C1 D1 A2 B2 要求按顺序执行A1,D1,B1,A2,B2,C1. 我这样设计mutex对不对: s1,s2,s3,s4=0; down(s1) down(s2) down(s3) A1 B1 C1 D1 up(s3) up(s4) ...

by jerryzzh - C/C++ - 2003-03-24 12:45:20 阅读(847) 回复(1)

Can anyone teach me how to view the current share memory (e.g.: semaphore) usage on Solaris 9??

by olaysk2 - Solaris - 2006-07-04 19:15:41 阅读(942) 回复(1)

semaphore是什么?那位了解? 请详细的讲解一下他的作用与使用方法。谢谢 [ 本帖最后由 cnhtml 于 2006-6-12 17:47 编辑 ]

by cnhtml - 系统管理 - 2006-06-12 17:45:54 阅读(954) 回复(3)

:x 为什么我创建一个semaphore,却出现很多semaphore?情况如下: s 262533 0x01004005 --ra------- agent agent s 262534 0x01004002 --ra------- agent agent s 262535 0xffffffff --ra------- agent agent s 393608 0xffffffff --ra------- agent agent s 393609 0xffffffff --ra------- agent agent s 393610 0xffffffff --ra------- agent agent s 262539 0xfffffff...

by romanempire - C/C++ - 2003-05-15 11:40:14 阅读(1230) 回复(1)

couldn't grab the accept mutex Summary: couldn't grab the accept mutex Product: Apache httpd-2.0 Version: 2.2.26 Platform: HP OS/Version: HP-UX Status: NEW Severity: Blocker Priority: Other Component: All AssignedTo: [email]bugs@httpd.apache.org[/email] ReportedBy: [EMAIL PROTECTED] Serve...

by wllhc - 服务器应用 - 2008-03-21 10:31:02 阅读(3224) 回复(1)

unable to open mutex

by wuzd - 服务器应用 - 2007-01-10 15:59:14 阅读(1225) 回复(2)

学习中,看到用户线程对共享内存的获得和释放,其中讲到mutex和锁: 例:线索在修改缓冲区以前,首先获得这个缓冲区的mutex,然后把这个缓冲区的锁访问类型设为独占方式。 问题:mutex(门叉)本身就是实现互斥访问,应该说得到mutex以后,别人已经不可能再访问这个缓冲区了,为什么还要加锁。 在书中还有许多地方讲到这种例子。究竟mutex和锁是什么关系?请老大们指教!!!

by unixcrazy - Informix - 2003-10-02 18:08:32 阅读(1118) 回复(0)

把 mutexattr 设为空,不明白是加的什么锁?

by liuchanghu - C/C++ - 2004-06-14 11:47:43 阅读(1449) 回复(0)

我在google和论坛都找了,没有找到答案,所以在这里问一下。 这样的: 我的程序在slackware上可以正常编译运行,然而考回来后,在我的ubuntu6.10下就编译通不过了。 错误是 "union pthread_mutexattr_t has no member named __mutexkind" 我查看了/usr/include/bits/pthreadtypes.h, 发现pthread_mutexattr_t的定义如下: [code]typedef union { char __size[__SIZEOF_PTHREAD_mutexATTR_T]; long int __align; } pthrea...

by guojkd - C/C++ - 2007-02-03 19:48:44 阅读(2030) 回复(4)

我开始来劲了.呵呵,先搞两头,再取中间 /*- * 跳过BSD版权申明 */ #include __FBSDID("$FreeBSD: src/sys/kern/kern_mutex.c,v 1.147.2.3 2004/10/16 02:14:59 ups Exp $"); #include "opt_adaptive_mutexes.h" #include "opt_ddb.h" #include "opt_mprof.h" #include "opt_mutex_wake_all.h" #include "opt_sched.h" /*以上是编译时产生的头文件,根据配置文件而产生*/ #include #include #include #include #include #inc...

by xie_minix - BSD文档中心 - 2005-10-17 14:00:01 阅读(1393) 回复(0)