Changeset 440 for trunk/libs


Ignore:
Timestamp:
May 3, 2018, 5:51:22 PM (4 years ago)
Author:
alain
Message:

1/ Fix a bug in the Multithreaded "sort" applicationr:
The pthread_create() arguments must be declared as global variables.
2/ The exit syscall can be called by any thread of a process..

Location:
trunk/libs
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/libs/mini-libc/Makefile

    r439 r440  
    3232build/lib/libc.a: build $(OBJS)
    3333        $(AR) rc $@ $(OBJS)
    34         ranlib $@
     34        $(RANLIB) $@
    3535        cp $(SRCS:.c=.h) $(HAL)/generic/hal_user.h $(KERNEL)/syscalls/shared_syscalls.h build/include/.
    3636
  • trunk/libs/mini-libpthread/Makefile

    r439 r440  
    3434build/lib/libpthread.a: build $(OBJS)
    3535        $(AR) rc $@ $(OBJS) $(OBJS_LIBC)
    36         ranlib $@
     36        $(RANLIB) $@
    3737        cp $(SRCS:.c=.h) $(HAL)/generic/hal_user.h $(KERNEL)/syscalls/shared_syscalls.h build/include/.
    3838
  • trunk/libs/mini-libpthread/pthread.c

    r439 r440  
    22 * pthread.c - User side pthread related functions implementation.
    33 *
    4  * Author     Alain Greiner (2016,2017)
     4 * Author     Alain Greiner (2016,2017,2018)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    113113
    114114#if PTHREAD_BARRIER_DEBUG
    115 printf("\n[BARRIER] %s : sqt_node[%d][%d][%d] : arity = %d / parent = %x\n"
    116 "child0 = %x / child1 = %x / child2 = %x / child3 = %x\n",
    117 __FUNCTION__, x, y, level, node->arity, node->parent,
     115printf("\n[BARRIER] %s : sqt_node[%d][%d][%d] / arity %d / desc %x\n"
     116"parent %x / child0 %x / child1 %x / child2 %x / child3 %x\n",
     117__FUNCTION__, x, y, level, node->arity, node, node->parent,
    118118node->child[0], node->child[1], node->child[2], node->child[3] );
    119119#endif
     
    159159
    160160#if PTHREAD_BARRIER_DEBUG
    161 printf("\n[BARRIER] %s : sqt_node[%d][%d][%d] : arity = %d / parent = %x\n"
    162 "child0 = %x / child1 = %x / child2 = %x / child3 = %x\n",
    163 __FUNCTION__, x, y, level, node->arity, node->parent,
     161printf("\n[BARRIER] %s : sqt_node[%d][%d][%d] / arity %d / desc %x\n"
     162"parent %x / child0 %x / child1 %x / child2 %x / child3 %x\n",
     163__FUNCTION__, x, y, level, node->arity, node, node->parent,
    164164node->child[0], node->child[1], node->child[2], node->child[3] );
    165165#endif
     
    250250                     barrier->node[x][y][l] = node;
    251251
    252 #if PTHREAD_BARRIER_DEBUG
    253 printf("\n[BARRIER] %s : sqt_node[%d][%d][%d] : vaddr = %x\n",
    254 __FUNCTION__ , x , y , l , node );
    255 #endif
    256252                 }
    257253            }
Note: See TracChangeset for help on using the changeset viewer.