Revision 72cf2d4f linux-user/elfload.c

b/linux-user/elfload.c
1844 1844

  
1845 1845
/* Here is the structure in which status of each thread is captured. */
1846 1846
struct elf_thread_status {
1847
    TAILQ_ENTRY(elf_thread_status)  ets_link;
1847
    QTAILQ_ENTRY(elf_thread_status)  ets_link;
1848 1848
    struct target_elf_prstatus prstatus;   /* NT_PRSTATUS */
1849 1849
#if 0
1850 1850
    elf_fpregset_t fpu;             /* NT_PRFPREG */
......
1860 1860
    struct target_elf_prstatus *prstatus;  /* NT_PRSTATUS */
1861 1861
    struct target_elf_prpsinfo *psinfo;    /* NT_PRPSINFO */
1862 1862

  
1863
    TAILQ_HEAD(thread_list_head, elf_thread_status) thread_list;
1863
    QTAILQ_HEAD(thread_list_head, elf_thread_status) thread_list;
1864 1864
#if 0
1865 1865
    /*
1866 1866
     * Current version of ELF coredump doesn't support
......
1878 1878
    abi_ulong   vma_start;  /* start vaddr of memory region */
1879 1879
    abi_ulong   vma_end;    /* end vaddr of memory region */
1880 1880
    abi_ulong   vma_flags;  /* protection etc. flags for the region */
1881
    TAILQ_ENTRY(vm_area_struct) vma_link;
1881
    QTAILQ_ENTRY(vm_area_struct) vma_link;
1882 1882
};
1883 1883

  
1884 1884
struct mm_struct {
1885
    TAILQ_HEAD(, vm_area_struct) mm_mmap;
1885
    QTAILQ_HEAD(, vm_area_struct) mm_mmap;
1886 1886
    int mm_count;           /* number of mappings */
1887 1887
};
1888 1888

  
......
1962 1962
        return (NULL);
1963 1963

  
1964 1964
    mm->mm_count = 0;
1965
    TAILQ_INIT(&mm->mm_mmap);
1965
    QTAILQ_INIT(&mm->mm_mmap);
1966 1966

  
1967 1967
    return (mm);
1968 1968
}
......
1972 1972
    struct vm_area_struct *vma;
1973 1973

  
1974 1974
    while ((vma = vma_first(mm)) != NULL) {
1975
        TAILQ_REMOVE(&mm->mm_mmap, vma, vma_link);
1975
        QTAILQ_REMOVE(&mm->mm_mmap, vma, vma_link);
1976 1976
        qemu_free(vma);
1977 1977
    }
1978 1978
    qemu_free(mm);
......
1990 1990
    vma->vma_end = end;
1991 1991
    vma->vma_flags = flags;
1992 1992

  
1993
    TAILQ_INSERT_TAIL(&mm->mm_mmap, vma, vma_link);
1993
    QTAILQ_INSERT_TAIL(&mm->mm_mmap, vma, vma_link);
1994 1994
    mm->mm_count++;
1995 1995

  
1996 1996
    return (0);
......
1998 1998

  
1999 1999
static struct vm_area_struct *vma_first(const struct mm_struct *mm)
2000 2000
{
2001
    return (TAILQ_FIRST(&mm->mm_mmap));
2001
    return (QTAILQ_FIRST(&mm->mm_mmap));
2002 2002
}
2003 2003

  
2004 2004
static struct vm_area_struct *vma_next(struct vm_area_struct *vma)
2005 2005
{
2006
    return (TAILQ_NEXT(vma, vma_link));
2006
    return (QTAILQ_NEXT(vma, vma_link));
2007 2007
}
2008 2008

  
2009 2009
static int vma_get_mapping_count(const struct mm_struct *mm)
......
2328 2328
    fill_note(&ets->notes[0], "CORE", NT_PRSTATUS, sizeof (ets->prstatus),
2329 2329
        &ets->prstatus);
2330 2330

  
2331
    TAILQ_INSERT_TAIL(&info->thread_list, ets, ets_link);
2331
    QTAILQ_INSERT_TAIL(&info->thread_list, ets, ets_link);
2332 2332

  
2333 2333
    info->notes_size += note_size(&ets->notes[0]);
2334 2334
}
......
2343 2343

  
2344 2344
    (void) memset(info, 0, sizeof (*info));
2345 2345

  
2346
    TAILQ_INIT(&info->thread_list);
2346
    QTAILQ_INIT(&info->thread_list);
2347 2347

  
2348 2348
    info->notes = qemu_mallocz(NUMNOTES * sizeof (struct memelfnote));
2349 2349
    if (info->notes == NULL)
......
2389 2389
{
2390 2390
    struct elf_thread_status *ets;
2391 2391

  
2392
    while (!TAILQ_EMPTY(&info->thread_list)) {
2393
        ets = TAILQ_FIRST(&info->thread_list);
2394
        TAILQ_REMOVE(&info->thread_list, ets, ets_link);
2392
    while (!QTAILQ_EMPTY(&info->thread_list)) {
2393
        ets = QTAILQ_FIRST(&info->thread_list);
2394
        QTAILQ_REMOVE(&info->thread_list, ets, ets_link);
2395 2395
        qemu_free(ets);
2396 2396
    }
2397 2397

  

Also available in: Unified diff