Author: Armin Rigo <ar...@tunes.org> Branch: c7-fork Changeset: r1068:91b34e65d842 Date: 2014-03-18 14:04 +0100 http://bitbucket.org/pypy/stmgc/changeset/91b34e65d842/
Log: hg merge default diff --git a/c7/stm/core.c b/c7/stm/core.c --- a/c7/stm/core.c +++ b/c7/stm/core.c @@ -157,7 +157,7 @@ MAP_FIXED | MAP_PAGES_FLAGS, -1, 0) != readmarkers) { /* fall-back */ #if STM_TESTS - stm_fatalerror("reset_transaction_read_version: %m\n"); + stm_fatalerror("reset_transaction_read_version: %m"); #endif memset(readmarkers, 0, NB_READMARKER_PAGES * 4096UL); } diff --git a/c7/stm/fprintcolor.c b/c7/stm/fprintcolor.c --- a/c7/stm/fprintcolor.c +++ b/c7/stm/fprintcolor.c @@ -41,6 +41,7 @@ va_start(ap, format); vfprintf(stderr, format, ap); + fprintf(stderr, "\n"); va_end(ap); abort(); diff --git a/c7/stm/gcpage.c b/c7/stm/gcpage.c --- a/c7/stm/gcpage.c +++ b/c7/stm/gcpage.c @@ -60,7 +60,7 @@ return; out_of_memory: - stm_fatalerror("out of memory!\n"); /* XXX */ + stm_fatalerror("out of memory!"); /* XXX */ } static char *_allocate_small_slowpath(uint64_t size) @@ -85,7 +85,7 @@ /* Allocate the object with largemalloc.c from the lower addresses. */ char *addr = _stm_large_malloc(size); if (addr == NULL) - stm_fatalerror("not enough memory!\n"); + stm_fatalerror("not enough memory!"); if (addr + size > uninitialized_page_start) { uintptr_t npages; @@ -93,7 +93,7 @@ npages += GCPAGE_NUM_PAGES; if (uninitialized_page_stop - uninitialized_page_start < npages * 4096UL) { - stm_fatalerror("out of memory!\n"); /* XXX */ + stm_fatalerror("out of memory!"); /* XXX */ } setup_N_pages(uninitialized_page_start, npages); uninitialized_page_start += npages * 4096UL; diff --git a/c7/stm/list.c b/c7/stm/list.c --- a/c7/stm/list.c +++ b/c7/stm/list.c @@ -12,7 +12,7 @@ uintptr_t initial_allocation = 32; struct list_s *lst = malloc(LIST_SETSIZE(initial_allocation)); if (lst == NULL) - stm_fatalerror("out of memory in list_create\n"); /* XXX */ + stm_fatalerror("out of memory in list_create"); /* XXX */ lst->count = 0; lst->last_allocated = initial_allocation - 1; @@ -24,7 +24,7 @@ nalloc = LIST_OVERCNT(nalloc); lst = realloc(lst, LIST_SETSIZE(nalloc)); if (lst == NULL) - stm_fatalerror("out of memory in _list_grow\n"); /* XXX */ + stm_fatalerror("out of memory in _list_grow"); /* XXX */ lst->last_allocated = nalloc - 1; return lst; @@ -93,7 +93,7 @@ //fprintf(stderr, "growth: %ld\n", newalloc); char *newitems = malloc(newalloc); if (newitems == NULL) { - stm_fatalerror("out of memory!\n"); /* XXX */ + stm_fatalerror("out of memory!"); /* XXX */ } newtree.raw_start = newitems; newtree.raw_current = newitems; diff --git a/c7/stm/pages.c b/c7/stm/pages.c --- a/c7/stm/pages.c +++ b/c7/stm/pages.c @@ -97,7 +97,7 @@ int res = remap_file_pages(addr, size, 0, pgoff, 0); if (UNLIKELY(res < 0)) - stm_fatalerror("remap_file_pages: %m\n"); + stm_fatalerror("remap_file_pages: %m"); } static void pages_initialize_shared(uintptr_t pagenum, uintptr_t count) diff --git a/c7/stm/sync.c b/c7/stm/sync.c --- a/c7/stm/sync.c +++ b/c7/stm/sync.c @@ -40,24 +40,24 @@ static void setup_sync(void) { if (pthread_mutex_init(&sync_ctl.global_mutex, NULL) != 0) - stm_fatalerror("mutex initialization: %m\n"); + stm_fatalerror("mutex initialization: %m"); long i; for (i = 0; i < _C_TOTAL; i++) { if (pthread_cond_init(&sync_ctl.cond[i], NULL) != 0) - stm_fatalerror("cond initialization: %m\n"); + stm_fatalerror("cond initialization: %m"); } } static void teardown_sync(void) { if (pthread_mutex_destroy(&sync_ctl.global_mutex) != 0) - stm_fatalerror("mutex destroy: %m\n"); + stm_fatalerror("mutex destroy: %m"); long i; for (i = 0; i < _C_TOTAL; i++) { if (pthread_cond_destroy(&sync_ctl.cond[i]) != 0) - stm_fatalerror("cond destroy: %m\n"); + stm_fatalerror("cond destroy: %m"); } } @@ -77,14 +77,14 @@ static void set_gs_register(char *value) { if (UNLIKELY(syscall(SYS_arch_prctl, ARCH_SET_GS, (uint64_t)value) != 0)) - stm_fatalerror("syscall(arch_prctl, ARCH_SET_GS): %m\n"); + stm_fatalerror("syscall(arch_prctl, ARCH_SET_GS): %m"); } static inline void s_mutex_lock(void) { assert(!_has_mutex_here); if (UNLIKELY(pthread_mutex_lock(&sync_ctl.global_mutex) != 0)) - stm_fatalerror("pthread_mutex_lock: %m\n"); + stm_fatalerror("pthread_mutex_lock: %m"); assert((_has_mutex_here = true, 1)); } @@ -92,32 +92,32 @@ { assert(_has_mutex_here); if (UNLIKELY(pthread_mutex_unlock(&sync_ctl.global_mutex) != 0)) - stm_fatalerror("pthread_mutex_unlock: %m\n"); + stm_fatalerror("pthread_mutex_unlock: %m"); assert((_has_mutex_here = false, 1)); } static inline void cond_wait(enum cond_type_e ctype) { #ifdef STM_NO_COND_WAIT - stm_fatalerror("*** cond_wait/%d called!\n", (int)ctype); + stm_fatalerror("*** cond_wait/%d called!", (int)ctype); #endif assert(_has_mutex_here); if (UNLIKELY(pthread_cond_wait(&sync_ctl.cond[ctype], &sync_ctl.global_mutex) != 0)) - stm_fatalerror("pthread_cond_wait/%d: %m\n", (int)ctype); + stm_fatalerror("pthread_cond_wait/%d: %m", (int)ctype); } static inline void cond_signal(enum cond_type_e ctype) { if (UNLIKELY(pthread_cond_signal(&sync_ctl.cond[ctype]) != 0)) - stm_fatalerror("pthread_cond_signal/%d: %m\n", (int)ctype); + stm_fatalerror("pthread_cond_signal/%d: %m", (int)ctype); } static inline void cond_broadcast(enum cond_type_e ctype) { if (UNLIKELY(pthread_cond_broadcast(&sync_ctl.cond[ctype]) != 0)) - stm_fatalerror("pthread_cond_broadcast/%d: %m\n", (int)ctype); + stm_fatalerror("pthread_cond_broadcast/%d: %m", (int)ctype); } /************************************************************/ _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit