use smalloc() instead of malloc()
to enable error checking ...
add line break to end of error message
add error code for threading issues
change locking funcs
ditch struct and use an enumerated array of locks
wrap lock/unlock functions for error checking and simplify access of lock
ignore first parameter
duh