Good to see this, however include/odp_schedule_if.h still has SCHEDULE_ORDERED_LOCKS_PER_QUEUE defined at 2 and you have MAX_ORDERED_LOCKS_PER_QUEUE defined at 1 below. This is confusing. Better to use this one value here throughout that should be > 1 to illustrate generality.
Good catch, the SCHEDULE_ORDERED_LOCKS_PER_QUEUE is old unused code I had missed. I'll remove it. This name should also make it clear that this is a per-queue limit, not a total limit on number of ordered locks in the system. Perhaps change this to CONFIG_MAX_ORDERED_LOCKS_PER_QUEUE? I prefer the current name as the documentation already states the per queue part and the name is already rather long. The actual number of ordered locks for any given queue is set at odp_queue_create() subject to this maximum value. The CONFIG_QUEUE_MAX_ORD_LOCKS define is used only by the implementation for example to define arrays inside structs. When calling odp_queue_create() the max lock count is scheduler dependent. The scheduler implementation has to make sure not to use larger values than CONFIG_QUEUE_MAX_ORD_LOCKS. I’ve added static asserts to both scheduler implementations to make sure of this. -Matias