Comment 13 for bug 534175

Revision history for this message
Paul H. Hargrove (phhargrove) wrote :

Alan said "Seems odd that it would end up missing those macros."

For the curious:

At about 2.6.26 the type "struct mutex" was replaced by "struct semaphore", and the various mutex-related functions and macros were implemented in terms of wrappers around the semaphore code. These wrappers still exist today in the vanilla 2.6.33 kernel.

However, it looks as if the -rt kernel is in the midst of a translation from "struct semaphore" to "struct anon_semaphore". It has implemented the semaphore functions and macros in terms of the anon_semaphore versions. It appears that the support for the mutex wrappers have been removed in that process.

Since BLCR aims to support kernels including those older than 2.6.26, we rely on the mutex wrappers rather than shifting our code to use the semaphore calls. The patch to cr_module/cr_kcompat.h simply reintroduces the 2 missing wrappers that we use.