From: Mathieu Desnoyers Date: Wed, 8 May 2013 13:53:45 +0000 (-0400) Subject: Fix: membarrier fallback symbol conflict X-Git-Tag: v0.8.0~81 X-Git-Url: http://git.lttng.org/?a=commitdiff_plain;h=553b7eb9da3a223368abdf3f6a5ead35acf8a20b;hp=553b7eb9da3a223368abdf3f6a5ead35acf8a20b;p=urcu.git Fix: membarrier fallback symbol conflict * Lai Jiangshan (laijs@cn.fujitsu.com) wrote: > Hi, Mathieu, > > There is a big compatible problem in URCU which should be fix in next round. > > LB: liburcu built on the system which has sys_membarrier(). > LU: liburcu built on the system which does NOT have sys_membarrier(). > > LBM: liburcu-mb .... > LUM: liburcu-mb ... > > AB: application(-lliburcu) built on the system which has sys_membarrier(). > AU: application(-lliburcu) built on the system which does NOT have > sys_membarrier(). > > ABM application(-lliburcu-mb) ... > AUM application(-lliburcu-mb) ... > > AB/AU + LB/LU: 4 combinations > ABM/AUM + LBM/LUM: 4 combinations > > I remember some of the 8 combinations can't works due to symbols are > miss match. only LU+AB and LB+AU ? > > could you check it? > > How to fix it: In LU and AU, keep all the symbol name/ABI as LA and > AB, but only the behaviors falls back to URCU_MB. Define membarrier() as -ENOSYS when SYS_membarrier is not found in the system headers. Check dynamically for membarrier availability to ensure ABI compatibility between applications and librairies. Reported-by: Lai Jiangshan Signed-off-by: Mathieu Desnoyers ---