Community
Participate
Working Groups
The Sync_wait() function has a timeout parameter. But there is no constant, such as Sync_WAIT_FOREVER, which makes the function wait until the object has been signaled. Right now, I need to use the constant from the created object. For example, SyncSemThread_WAIT_FOREVER, but this defeats the purpose of using a generic front-end such as Sync.
Change needs to be made in a binary compatible way. Need to check dependency in osal and avala trees.
SyncSemThread inherits ISync, which defines ISync_WAIT_FOREVER. Therefore, SyncSemThread_WAIT_FOREVER is equivalent to ISync_WAIT_FOREVER, and each usage of SyncSemThread_WAIT_FOREVER can be replaced with ISync_WAIT_FOREVER. Sync does not inherit from ISync, so we could add Sync_WAIT_FOREVER without a conflict in Sync's namespace, but that doesn't seem to be needed.
In xdc-v43, Sync.xdc now contains: /*! Used to wait forever */ const UInt WAIT_FOREVER = ISync.WAIT_FOREVER; /*! Used to specify no waiting */ const UInt NO_WAIT = ISync.NO_WAIT; The result of this addition is the following constant in Sync.h: #define xdc_runtime_knl_Sync_WAIT_FOREVER (~(0)) Since, it's just a #define, a package using that constant in its target code will be binary compatible with earlier version of that same package. If there is a reference to Sync.WAIT_FOREVER in a package's config code, the build will fail against XDCtools 3.20.
Verified by inspection in xdc-v43
Shipped in XDCtools 3.20.02