Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interprocess_semaphoreの利用について #969

Closed
snozawa opened this issue Apr 6, 2016 · 4 comments
Closed

interprocess_semaphoreの利用について #969

snozawa opened this issue Apr 6, 2016 · 4 comments

Comments

@snozawa
Copy link
Contributor

snozawa commented Apr 6, 2016

rtc以下の

rtc/StateHolder/StateHolder.h:  boost::interprocess::interprocess_semaphore m_waitSem, m_timeSem;
rtc/RobotHardware/robot.h:    boost::interprocess::interprocess_semaphore wait_sem;
rtc/SequencePlayer/SequencePlayer.h:  boost::interprocess::interprocess_semaphore m_waitSem;

の主に3箇所くらいでboostのinterprocess_semaphoreが使われているのですが、
boostでないsemaphore.hをお使いでなくこちらをお使いの理由はなにになりますでしょうか。
ちなみに、boost versionが1.35.0以前だとboostのinterprocess_semaphoreが使えない状況のようです。

よろしくお願いいたします。

@fkanehiro
Copy link
Owner

え~っと、正直記憶にありません。
普通のセマフォでいい気がします。

@snozawa
Copy link
Contributor Author

snozawa commented Apr 7, 2016

ありがとうございます

普通のセマフォでいい気がします。

boost versionが1.35.0以前でも(パッチなく)動作するようにしようと思っているのですが、

  • interprocess_semaphore=>semaphoreに変更する、多分大丈夫そうですが挙動はかわりそうです
  • boost versionを参照して、新しければ現状と同じ挙動、古ければsemaphoreになるようにifdefなどで対応する

のどちらがよろしいでしょうか。

@fkanehiro
Copy link
Owner

スッキリと統一する、でいいんじゃないでしょうか。

2016年4月7日 10:29 Shunichi Nozawa notifications@github.com:

ありがとうございます

普通のセマフォでいい気がします。

boost versionが1.35.0以前でも(パッチなく)動作するようにしようと思っているのですが、

  • interprocess_semaphore=>semaphoreに変更する、多分大丈夫そうですが挙動はかわりそうです
  • boost versionを参照して、新しければ現状と同じ挙動、古ければsemaphoreになるようにifdefなどで対応する

のどちらがよろしいでしょうか。


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#969 (comment)

snozawa added a commit to snozawa/hrpsys-base that referenced this issue Apr 7, 2016
…cpp,h], rtc/StateHolder/StateHolder.[cpp,h]] Use semaphore.h instead of interprocess_semaphore because we do not use interprocess_semaphore specific functionality. On old OS, interprocess_semaphore cannot be used (boost version <= 1.35.0). This commit is related with the discussion : fkanehiro#969
@snozawa
Copy link
Contributor Author

snozawa commented Apr 9, 2016

#970
でsemaphore.hを使うように統一いたさいmした。

ありがとうございました。

@snozawa snozawa closed this as completed Apr 9, 2016
iory pushed a commit to iory/hrpsys-base that referenced this issue Apr 11, 2016
…cpp,h], rtc/StateHolder/StateHolder.[cpp,h]] Use semaphore.h instead of interprocess_semaphore because we do not use interprocess_semaphore specific functionality. On old OS, interprocess_semaphore cannot be used (boost version <= 1.35.0). This commit is related with the discussion : fkanehiro#969
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants