Patent ID: 7689992
Filing Date: 2010-03-30
Classification: G06F

Abstract:
1. A method for controlling a thread performing at least one atomic operation in a data processing system, wherein the thread extends across at least two protocol layers for processing at least one event in each protocol layer, said method comprising the steps of: initializing, by one of said at least two protocol layers, a lock with an associated at least one locking function defined in a first layer of said at least two protocol layers, wherein said at least one locking function of said lock is visible by an interface to said at least two protocol layers without making the implementation of the lock visible; responsive to said thread called from a user, acquiring said lock, by said thread, by calling said at least one locking function from within said first layer; preprocessing said at least one event by said thread within said first layer; calling, by said thread, a second layer of said at least two protocol layers; determining, by said thread from within said second layer, whether a status for said lock is already acquired by said thread by calling said at least one locking function; responsive to said status indicating said lock is already acquired by said thread, recursively acquiring said lock by said thread by incrementing a counter associated with said lock, processing said at least one event by said thread within said second layer including a temporary return of said thread to said first protocol layer, recursively releasing said lock by said thread by decrementing said counter, and returning to said first layer; postprocessing said at least one event by said thread within said first layer; and releasing said lock, by said thread, by calling a release function of said locking functions from within said first layer and returning to said user.