def mp_init(l, c):
    """ Initialization function for multi-threaded operations.

    :param l: lock
    :param c: value for common counter
    """
    global lock
    global counter
    lock = l
    counter = c
