def __init__(self, type_obj, addr):
    global thread_counter
    global sys_mutex_counter
    global futex_counter
    global stack_counter
    self.addr = addr
    self.type_obj = type_obj
    self.type_name = None
    if (self.type_obj.name == 'k_thread'):
        self.data = thread_counter
        thread_counter = (thread_counter + 1)
    elif (self.type_obj.name == 'sys_mutex'):
        self.data = ('&kernel_mutexes[%d]' % sys_mutex_counter)
        sys_mutex_counter += 1
    elif (self.type_obj.name == 'k_futex'):
        self.data = ('&futex_data[%d]' % futex_counter)
        futex_counter += 1
    elif (self.type_obj.name == STACK_TYPE):
        stack_counter += 1
    else:
        self.data = 0
def __init__(self, type_obj, addr):
    global thread_counter
    global sys_mutex_counter
    global futex_counter
    global stack_counter
    self.addr = addr
    self.type_obj = type_obj
    self.type_name = None
    if (self.type_obj.name == 'k_thread'):
        self.data = thread_counter
        thread_counter = (thread_counter + 1)
    elif (self.type_obj.name == 'sys_mutex'):
        self.data = ('&kernel_mutexes[%d]' % sys_mutex_counter)
        sys_mutex_counter += 1
    elif (self.type_obj.name == 'k_futex'):
        self.data = ('&futex_data[%d]' % futex_counter)
        futex_counter += 1
    elif (self.type_obj.name == STACK_TYPE):
        stack_counter += 1
    else:
        self.data = 0