liblock: initial commit

This kinda works, still needs a lot of work in the makefile department.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
liblock: move global variables to their own object file

Prevent collisions and make everything prettier.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
liblock: Move internal headers out of include/

Leave just the public header in include/

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
liblock: add simple tests

A rather simple method to make sure everything works right, add
AA, ABBA, and lock unbalance tests.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
liblock: call lockdep_set_thread in testing code

This makes lockdep output prettier.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
liblock: make lockdep_set_thread an exported function

This will let us split the public and private headers further.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
liblock: completely split public and private headers

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
liblock: remove unneeded extern from tests

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>