printlocktable() function