--- xenomai/nucleus/registry.c.old 2008-07-15 00:36:10.000000000 +0200 +++ xenomai/nucleus/registry.c 2008-07-15 15:28:23.000000000 +0200 @@ -733,8 +733,10 @@ int xnregistry_bind(const char *key, xnt if (timeout != XN_INFINITE) { xnticks_t now = xntbase_get_time(tbase); - if (stime + timeout >= now) - break; + if (stime + timeout <= now) { + err = -ETIMEDOUT; + goto unlock_and_exit; + } timeout -= (now - stime); stime = now;