A software program for use on an embedded computing device includes an operating
system layer, an application framework, and a programming environment. the programming
environment includes a contention locking scheme for setting light object locks,
which are handled in user space, and heavy object locks, which are handled at the
system level. The contention locking scheme is configured to set a light object
lock on an initially unlocked object when a first thread attempts to lock the object,
and to maintain a light lock on the object when a nested intra-thread lock is attempted
by the first thread.