<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_readlock(pid, path):
 """Obtain a readlock on a file. Parameters path : str Name of the file on which to obtain a readlock """

    timestamp = int(time.time() * 1e6)
    lockdir_name = "%s.readlock.%i.%i" % (path, pid, timestamp)
    os.mkdir(lockdir_name)

    # Register function to release the readlock at the end of the script
    atexit.register(release_readlock, lockdir_name=lockdir_name)