腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
2
回答
sem_
init
与
sema
_
init
的区别
linux
、
embedded
、
operating-system
、
semaphore
、
rtos
sema
_
init
和sem_
init
有什么区别?各个接口是否有特定的使用场景和其他依赖关系?
浏览 2
提问于2010-07-05
得票数 2
回答已采纳
1
回答
在编译时静态初始化信号量?
linux-kernel
在内核编译过程中,我一直得到一个“错误:预期的声明说明符或'&‘令牌’”,这使得我的
sema
_
init
()调用听起来像是一个函数原型,而它实际上只是一个静态的内联函数调用。#include <
linux
/sched.h>#include <
linux
/slab.h> #include <
linux
/kthread.h>#includ
浏览 0
提问于2021-02-24
得票数 0
回答已采纳
1
回答
Python的线程在IO操作上阻塞
python
、
multithreading
、
python-2.7
、
io
我在
Linux
系统(内核3.5.0-27)上使用python2.7。main.py __
init
__.pymain.pytmp.pyimport urllib def __
init
__(self, pool_
sema
, i): threading.Thread.__
init
浏览 1
提问于2013-04-18
得票数 0
回答已采纳
2
回答
C: MAC中的信号量意外sem_close错误
c
、
ipc
、
semaphore
下面的代码是打开和关闭的包装器:{ { exit(1); printf("
init
semaphore %s\n",
sema
_name);
浏览 3
提问于2013-02-13
得票数 0
回答已采纳
2
回答
无法在Solaris下使用信号量编译代码?
c
、
solaris
、
linker-errors
、
semaphore
、
build-error
我写了一些代码,它们在
linux
下编译得很好,但在Solaris上,我遇到了一些编译错误。我使用gcc test_compile.c -o tes -pthreads进行编译。#include <semaphore.h> sem_t semaphore; return 0pthreads symbol
浏览 3
提问于2011-11-07
得票数 1
回答已采纳
2
回答
C信号量和共享内存操作计数器
c
、
shared-memory
、
semaphore
*/if(sem_
init
(&
semA
, 0, 1)==-1) exit(2);/*semafor
semA
*/for(int i=0= 0) sleep(1);}如果我正确理解,sem_
init
(&
semA
, 0, 1);应该初始化信号量,以便在s
浏览 0
提问于2013-04-23
得票数 0
回答已采纳
2
回答
UITextDocumentProxy adjustTextPositionByCharacterOffset问题
ios
、
swift
、
ios8
、
keyboard
我正在使用Swift为iOS 8开发一个自定义键盘。我试图编写一个函数,在光标的两边插入文本。func nestedTag(tag: NSString) { proxy.insertText(tag) proxy.insertText(" ") proxy.adjustTextPositionByCh
浏览 4
提问于2015-02-11
得票数 3
回答已采纳
2
回答
shell脚本中的互斥和信号量
scripting
、
semaphore
pro1.shtouch /tmp/proc1.signature.mutexsleep 100 pro2.shtouch /tmp/proc2.signature.mutexsleep 100 pro3.shtouch /tmp/proc3.signature.mutex #
浏览 0
提问于2017-10-30
得票数 0
回答已采纳
1
回答
理解p线程的信号量(包括代码)
locking
、
pthreads
、
mutex
、
semaphore
据我所知,mutex_t是一个锁系统,而cond_t是一个条件系统,其中信号通过
sema
_P和
sema
_V传递(如果值为0,则发生争用条件,并且线程被cond_wait锁定,直到另一个线程增加值并被cond_signaltypedef struct pthread_mutex_t lock; int value; void pthread_
sema
_
init
(
sema
*s,
浏览 0
提问于2016-04-14
得票数 0
回答已采纳
1
回答
Malloc类型定义结构问题
c
、
struct
、
malloc
testSem; ta_libinit(); ta_sem_
init
(&testSem, 5); ta_sem_wait(&testSem);void ta_sem_
init
(tasem_t *
sema
//initialize with the given v
浏览 0
提问于2013-04-08
得票数 0
回答已采纳
1
回答
iphone:访问默认日历并在按钮上单击事件提醒
xcode
implementation ViewController EKEventStore *eventStore=[[EKEventStore alloc]
init
EKEvent *event =[EKEvent eventWithEventStore:eventStore]; NSDate *endDate =[[NSDate alloc]
init
]; event.t
浏览 4
提问于2013-03-13
得票数 1
1
回答
使用Mach信号量替换进程间匿名信号量
c
、
macos
、
darwin
、
mach
、
xnu
虽然多个POSIX操作系统提供匿名信号量(通过sem_
init
和相关函数),但macOS不支持它们。我发现马赫信号量在macOS上是可用的,但在semaphore_create中,我发现它并不等同于sem_
init
的pshared参数,而且我很难找到文档,表明Mach/XNU信号量实际上可以用于同步进程();为了等待它: semaphore_wait(
sema
->
浏览 7
提问于2020-12-06
得票数 4
1
回答
返回事件标识符表单完成块
ios
、
iphone
、
ios6
我需要将报警标识符存到数据库中 { NSDateComponents *dateComps = [[NSDateComponents alloc]
init
浏览 0
提问于2013-10-30
得票数 1
1
回答
从iOS 6.1.3版本的地址簿数据库中获取联系人时崩溃?
ios
、
ios6
、
contacts
、
abaddressbook
我已经开发了从地址簿数据库获取联系人的应用程序。为此,实现的代码对于iOS版本6.0来说是很好的代码,但是它在iOS 6.1.3上崩溃了。ABAddressBookRef addressBook; // iOS 6 addressBook = ABAddressBookCreateWithOptions(NULL,&error); ABAddre
浏览 0
提问于2013-04-02
得票数 2
1
回答
C中的进程同步不会在第一次执行
c
、
process
、
fork
、
semaphore
、
synchronization
#include <sys/mman.h> { /* place semaphore in shared memory */ /* create/initializesemaphore */ if ( sem_
init
(<
浏览 0
提问于2015-12-12
得票数 1
回答已采纳
1
回答
Linux
semaphore_
init
:函数'semaphore_
init
‘的错误隐式声明
c
、
linux-kernel
、
linux-device-driver
我最近将Ubuntu从10.04更新到12.04,这将
linux
从2.6.35-30-server更改为3.0.0-29服务器。在更新之后,当我正在编译我的驱动程序代码时,我现在得到了一个错误。错误:函数'semaphore_
init
‘的隐式声明-Werror=内嵌-函数声明。 我该怎么解决这个问题?
浏览 2
提问于2013-01-02
得票数 1
回答已采纳
1
回答
可重启系统调用的实现
linux
、
linux-kernel
、
linux-device-driver
如果我有一段这样的驱动程序代码:if(down_interruptible(&semB)) { //wait}up(&semB); 我读到,如果驱动程序代码返回-ERESTARTSYS,VFS层可能会在用户不知道的情况下处理重新启动系统调用。down_interruptible(&
semA
); //
浏览 1
提问于2013-12-08
得票数 1
2
回答
Python多处理:并行管道实现
python
、
performance
、
subprocess
、
pipeline
、
python-multiprocessing
Condition or list of Condition objects, which will be''' self.input_queues = input_queues self.
sema
_to_acquire=
sema
_to_acquire
浏览 0
提问于2017-02-26
得票数 0
1
回答
如何在@synchronized块中等待完成处理程序?
ios
、
objective-c
、
multithreading
、
semaphore
、
ios-multithreading
NSNumber *lock = 0; // critical section code begins // execute completion handler }]; // wa
浏览 2
提问于2017-09-27
得票数 1
3
回答
使用信号量进行线程同步
c
、
multithreading
、
synchronization
*t1)); t3=(pthread_t *)malloc(sizeof(*t3)); i=sem_
init
浏览 3
提问于2017-03-22
得票数 0
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
Linux 下的 init 0,1,2,3,4,5,6知识介绍
浅析Linux初始化init系统第二部分-Upstart
iOS 底层-alloc与init
CKA课程(5)——Init 容器与Pause 容器
Python中__init__的通俗解释是什么?
热门
标签
更多标签
云服务器
即时通信 IM
ICP备案
对象存储
实时音视频
活动推荐
运营活动
广告
关闭
领券