gpt4 book ai didi

ios - osx 上的 sem_open 共享内存在哪里

转载 作者:行者123 更新时间:2023-11-29 03:30:56 27 4
gpt4 key购买 nike

我目前正在为 iOS 移植一个 C 库,并且需要将原来的 sem_init() 更改为 sem_open() 因为iOS 不支持 sem_init()

我看到一些讨论说 sem_open() 会在系统中打开一个共享内存文件,现在我想通过验证共享内存文件来检查 sem_open() 是否成功成为一个信号量。

曾尝试在/dev/shm中查找,但没有shm目录,但sem_open也不返回“SEM_FAILED”,那么共享内存文件到哪里去了?

谢谢

最佳答案

来自 OS X 上 sem_open() 的手册页:

There is no visible entry in the file system for the created object in this implementation.

关于ios - osx 上的 sem_open 共享内存在哪里,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19784554/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com