Protection Structures in Multithreaded Systems