Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update.
2003-06-11  Ulrich Drepper  <drepper@redhat.com>

	* allocatestack.c (queue_stack): Always inline.
	* ptreadhP.h (__do_cancel): Likewise.
  • Loading branch information
Ulrich Drepper committed Jun 11, 2003
1 parent c98d505 commit dd9423a
Show file tree
Hide file tree
Showing 41 changed files with 189 additions and 117 deletions.
4 changes: 2 additions & 2 deletions argp/argp-help.c
@@ -1,5 +1,5 @@
/* Hierarchial argument parsing help output
Copyright (C) 1995-2000, 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 1995-2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
Expand Down Expand Up @@ -521,7 +521,7 @@ hol_free (struct hol *hol)
free (hol);
}

static inline int
static int
hol_entry_short_iterate (const struct hol_entry *entry,
int (*func)(const struct argp_option *opt,
const struct argp_option *real,
Expand Down
5 changes: 2 additions & 3 deletions elf/dl-load.c
Expand Up @@ -361,7 +361,7 @@ static struct r_search_path_struct rtld_search_dirs;

static size_t max_dirnamelen;

static inline struct r_search_path_elem **
static struct r_search_path_elem **
fillin_rpath (char *rpath, struct r_search_path_elem **result, const char *sep,
int check_trusted, const char *what, const char *where)
{
Expand Down Expand Up @@ -1935,8 +1935,7 @@ _dl_rtld_di_serinfo (struct link_map *loader, Dl_serinfo *si, bool counting)

unsigned int idx = 0;
char *allocptr = (char *) &si->dls_serpath[si->dls_cnt];
inline void add_path (const struct r_search_path_struct *sps,
unsigned int flags)
void add_path (const struct r_search_path_struct *sps, unsigned int flags)
# define add_path(sps, flags) add_path(sps, 0) /* XXX */
{
if (sps->dirs != (void *) -1)
Expand Down
3 changes: 2 additions & 1 deletion elf/dl-version.c
@@ -1,5 +1,5 @@
/* Handle symbol and library versioning.
Copyright (C) 1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc.
Copyright (C) 1997-2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
Expand Down Expand Up @@ -53,6 +53,7 @@


static inline struct link_map *
__attribute ((always_inline))
find_needed (const char *name, struct link_map *map)
{
struct link_map *tmap;
Expand Down
4 changes: 2 additions & 2 deletions elf/do-lookup.h
@@ -1,5 +1,5 @@
/* Look up a symbol in the loaded objects.
Copyright (C) 1995,96,97,98,99,2000,2001,2002 Free Software Foundation, Inc.
Copyright (C) 1995-2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
Expand Down Expand Up @@ -28,7 +28,7 @@
/* Inner part of the lookup functions. We return a value > 0 if we
found the symbol, the value 0 if nothing is found and < 0 if
something bad happened. */
static inline int
static int
FCT (const char *undef_name, unsigned long int hash, const ElfW(Sym) *ref,
struct sym_val *result, struct r_scope_elem *scope, size_t i, ARG,
struct link_map *skip, int type_class)
Expand Down
6 changes: 3 additions & 3 deletions iconv/Makefile
@@ -1,4 +1,4 @@
# Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
# Copyright (C) 1997,1998,2000,2001,2002,2003 Free Software Foundation, Inc.
# This file is part of the GNU C Library.

# The GNU C Library is free software; you can redistribute it and/or
Expand Down Expand Up @@ -35,11 +35,11 @@ CFLAGS-gconv_cache.c = -DSTATIC_GCONV
CFLAGS-gconv_simple.c = -DSTATIC_GCONV
endif

vpath %.c ../locale/programs
vpath %.c ../locale/programs ../intl

iconv_prog-modules = iconv_charmap charmap charmap-dir linereader \
dummy-repertoire simple-hash xstrdup xmalloc
iconvconfig-modules = strtab xmalloc
iconvconfig-modules = strtab xmalloc hash-string
extra-objs = $(iconv_prog-modules:=.o) $(iconvconfig-modules:=.o)
CFLAGS-iconv_prog.c = -I../locale/programs
CFLAGS-iconv_charmap.c = -I../locale/programs
Expand Down
2 changes: 1 addition & 1 deletion iconv/gconv_cache.c
Expand Up @@ -159,7 +159,7 @@ find_module_idx (const char *str, size_t *idxp)
hashtab = (struct hash_entry *) ((char *) gconv_cache
+ header->hash_offset);

hval = hash_string (str);
hval = __hash_string (str);
idx = hval % header->hash_size;
hval2 = 1 + hval % (header->hash_size - 2);

Expand Down
11 changes: 3 additions & 8 deletions iconv/gconv_charset.h
@@ -1,5 +1,5 @@
/* Charset name normalization.
Copyright (C) 2001,02 Free Software Foundation, Inc.
Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2001.
Expand All @@ -22,7 +22,7 @@
#include <locale.h>


static inline void
static void
strip (char *wp, const char *s)
{
int slash_count = 0;
Expand All @@ -48,16 +48,11 @@ strip (char *wp, const char *s)
}


static inline char * __attribute__ ((unused))
static inline char * __attribute__ ((unused, always_inline))
upstr (char *dst, const char *str)
{
char *cp = dst;
while ((*cp++ = __toupper_l (*str++, &_nl_C_locobj)) != '\0')
/* nothing */;
return dst;
}


/* If NAME is an codeset alias expand it. */
extern int __gconv_compare_alias (const char *name1, const char *name2)
internal_function;
6 changes: 3 additions & 3 deletions iconv/gconv_conf.c
@@ -1,5 +1,5 @@
/* Handle configuration data.
Copyright (C) 1997,98,99,2000,2001,2002 Free Software Foundation, Inc.
Copyright (C) 1997,98,99,2000,2001,2002,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
Expand Down Expand Up @@ -125,7 +125,7 @@ detect_conflict (const char *alias)


/* Add new alias. */
static inline void
static void
add_alias (char *rp, void *modules)
{
/* We now expect two more string. The strings are normalized
Expand Down Expand Up @@ -178,7 +178,7 @@ add_alias (char *rp, void *modules)


/* Insert a data structure for a new module in the search tree. */
static inline void
static void
internal_function
insert_module (struct gconv_module *newp, int tobefreed)
{
Expand Down
3 changes: 1 addition & 2 deletions iconv/gconv_db.c
@@ -1,5 +1,5 @@
/* Provide access to the collection of available transformation modules.
Copyright (C) 1997,98,99,2000,2001,2002 Free Software Foundation, Inc.
Copyright (C) 1997,98,99,2000,2001,2002,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
Expand Down Expand Up @@ -27,7 +27,6 @@

#include <dlfcn.h>
#include <gconv_int.h>
#include <gconv_charset.h>


/* Simple data structure for alias mapping. We have two names, `from'
Expand Down
7 changes: 6 additions & 1 deletion iconv/gconv_int.h
@@ -1,4 +1,4 @@
/* Copyright (C) 1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc.
/* Copyright (C) 1997-2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
Expand Down Expand Up @@ -262,6 +262,11 @@ extern int __gconv_transliterate (struct __gconv_step *step,
size_t *irreversible) attribute_hidden;


/* If NAME is an codeset alias expand it. */
extern int __gconv_compare_alias (const char *name1, const char *name2)
internal_function;


/* Builtin transformations. */
#ifdef _LIBC
# define __BUILTIN_TRANSFORM(Name) \
Expand Down
12 changes: 12 additions & 0 deletions iconv/gconv_simple.c
Expand Up @@ -72,6 +72,7 @@ __gconv_btwoc_ascii (struct __gconv_step *step, unsigned char c)


static inline int
__attribute ((always_inline))
internal_ucs4_loop (struct __gconv_step *step,
struct __gconv_step_data *step_data,
const unsigned char **inptrp, const unsigned char *inend,
Expand Down Expand Up @@ -113,6 +114,7 @@ internal_ucs4_loop (struct __gconv_step *step,

#ifndef _STRING_ARCH_unaligned
static inline int
__attribute ((always_inline))
internal_ucs4_loop_unaligned (struct __gconv_step *step,
struct __gconv_step_data *step_data,
const unsigned char **inptrp,
Expand Down Expand Up @@ -161,6 +163,7 @@ internal_ucs4_loop_unaligned (struct __gconv_step *step,


static inline int
__attribute ((always_inline))
internal_ucs4_loop_single (struct __gconv_step *step,
struct __gconv_step_data *step_data,
const unsigned char **inptrp,
Expand Down Expand Up @@ -219,6 +222,7 @@ internal_ucs4_loop_single (struct __gconv_step *step,


static inline int
__attribute ((always_inline))
ucs4_internal_loop (struct __gconv_step *step,
struct __gconv_step_data *step_data,
const unsigned char **inptrp, const unsigned char *inend,
Expand Down Expand Up @@ -283,6 +287,7 @@ ucs4_internal_loop (struct __gconv_step *step,

#ifndef _STRING_ARCH_unaligned
static inline int
__attribute ((always_inline))
ucs4_internal_loop_unaligned (struct __gconv_step *step,
struct __gconv_step_data *step_data,
const unsigned char **inptrp,
Expand Down Expand Up @@ -352,6 +357,7 @@ ucs4_internal_loop_unaligned (struct __gconv_step *step,


static inline int
__attribute ((always_inline))
ucs4_internal_loop_single (struct __gconv_step *step,
struct __gconv_step_data *step_data,
const unsigned char **inptrp,
Expand Down Expand Up @@ -426,6 +432,7 @@ ucs4_internal_loop_single (struct __gconv_step *step,


static inline int
__attribute ((always_inline))
internal_ucs4le_loop (struct __gconv_step *step,
struct __gconv_step_data *step_data,
const unsigned char **inptrp, const unsigned char *inend,
Expand Down Expand Up @@ -467,6 +474,7 @@ internal_ucs4le_loop (struct __gconv_step *step,

#ifndef _STRING_ARCH_unaligned
static inline int
__attribute ((always_inline))
internal_ucs4le_loop_unaligned (struct __gconv_step *step,
struct __gconv_step_data *step_data,
const unsigned char **inptrp,
Expand Down Expand Up @@ -518,6 +526,7 @@ internal_ucs4le_loop_unaligned (struct __gconv_step *step,


static inline int
__attribute ((always_inline))
internal_ucs4le_loop_single (struct __gconv_step *step,
struct __gconv_step_data *step_data,
const unsigned char **inptrp,
Expand Down Expand Up @@ -573,6 +582,7 @@ internal_ucs4le_loop_single (struct __gconv_step *step,


static inline int
__attribute ((always_inline))
ucs4le_internal_loop (struct __gconv_step *step,
struct __gconv_step_data *step_data,
const unsigned char **inptrp, const unsigned char *inend,
Expand Down Expand Up @@ -638,6 +648,7 @@ ucs4le_internal_loop (struct __gconv_step *step,

#ifndef _STRING_ARCH_unaligned
static inline int
__attribute ((always_inline))
ucs4le_internal_loop_unaligned (struct __gconv_step *step,
struct __gconv_step_data *step_data,
const unsigned char **inptrp,
Expand Down Expand Up @@ -711,6 +722,7 @@ ucs4le_internal_loop_unaligned (struct __gconv_step *step,


static inline int
__attribute ((always_inline))
ucs4le_internal_loop_single (struct __gconv_step *step,
struct __gconv_step_data *step_data,
const unsigned char **inptrp,
Expand Down
2 changes: 1 addition & 1 deletion iconv/iconvconfig.c
Expand Up @@ -784,7 +784,7 @@ new_name (const char *str, struct Strent *strent)
newp->name = str;
newp->strent = strent;
newp->module_idx = -1;
newp->hashval = hash_string (str);
newp->hashval = __hash_string (str);

++nnames;

Expand Down
2 changes: 2 additions & 0 deletions iconv/loop.c
Expand Up @@ -257,6 +257,7 @@

/* The function returns the status, as defined in gconv.h. */
static inline int
__attribute ((always_inline))
FCTNAME (LOOPFCT) (struct __gconv_step *step,
struct __gconv_step_data *step_data,
const unsigned char **inptrp, const unsigned char *inend,
Expand Down Expand Up @@ -342,6 +343,7 @@ FCTNAME (LOOPFCT) (struct __gconv_step *step,
# define SINGLE(fct) SINGLE2 (fct)
# define SINGLE2(fct) fct##_single
static inline int
__attribute ((always_inline))
SINGLE(LOOPFCT) (struct __gconv_step *step,
struct __gconv_step_data *step_data,
const unsigned char **inptrp, const unsigned char *inend,
Expand Down
4 changes: 3 additions & 1 deletion iconvdata/cns11643.h
@@ -1,5 +1,5 @@
/* Access functions for CNS 11643 handling.
Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 1998,1999,2000,2001,2002,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
Expand Down Expand Up @@ -40,6 +40,7 @@ extern const uint32_t __cns11643l15_to_ucs4_tab[];


static inline uint32_t
__attribute ((always_inline))
cns11643_to_ucs4 (const char **s, size_t avail, unsigned char offset)
{
unsigned char ch = *(*s);
Expand Down Expand Up @@ -140,6 +141,7 @@ extern const char __cns11643_from_ucs4p2c_tab[][3];


static inline size_t
__attribute ((always_inline))
ucs4_to_cns11643 (uint32_t wch, char *s, size_t avail)
{
unsigned int ch = (unsigned int) wch;
Expand Down
4 changes: 3 additions & 1 deletion iconvdata/cns11643l1.h
@@ -1,5 +1,5 @@
/* Access functions for CNS 11643, plane 1 handling.
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1998, 1999, 2000, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
Expand All @@ -26,6 +26,7 @@ extern const uint16_t __cns11643l1_to_ucs4_tab[];


static inline uint32_t
__attribute ((always_inline))
cns11643l1_to_ucs4 (const unsigned char **s, size_t avail,
unsigned char offset)
{
Expand Down Expand Up @@ -71,6 +72,7 @@ extern const char __cns11643l1_from_ucs4_tab14[][2];


static inline size_t
__attribute ((always_inline))
ucs4_to_cns11643l1 (uint32_t wch, unsigned char *s, size_t avail)
{
unsigned int ch = (unsigned int) wch;
Expand Down
3 changes: 2 additions & 1 deletion iconvdata/euc-kr.c
@@ -1,5 +1,5 @@
/* Mapping tables for EUC-KR handling.
Copyright (C) 1998, 1999, 2000-2002 Free Software Foundation, Inc.
Copyright (C) 1998, 1999, 2000-2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jungshik Shin <jshin@pantheon.yale.edu>
and Ulrich Drepper <drepper@cygnus.com>, 1998.
Expand All @@ -25,6 +25,7 @@


static inline void
__attribute ((always_inline))
euckr_from_ucs4 (uint32_t ch, unsigned char *cp)
{
if (ch > 0x9f)
Expand Down
4 changes: 3 additions & 1 deletion iconvdata/gb2312.h
@@ -1,5 +1,5 @@
/* Access functions for GB2312 conversion.
Copyright (C) 1998, 1999 Free Software Foundation, Inc.
Copyright (C) 1998, 1999, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
Expand Down Expand Up @@ -30,6 +30,7 @@ extern const uint16_t __gb2312_to_ucs[];


static inline uint32_t
__attribute ((always_inline))
gb2312_to_ucs4 (const unsigned char **s, size_t avail, unsigned char offset)
{
unsigned char ch = *(*s);
Expand Down Expand Up @@ -67,6 +68,7 @@ extern const char __gb2312_from_ucs4_tab8[][2];
extern const char __gb2312_from_ucs4_tab9[][2];

static inline size_t
__attribute ((always_inline))
ucs4_to_gb2312 (uint32_t wch, unsigned char *s, size_t avail)
{
unsigned int ch = (unsigned int) wch;
Expand Down

0 comments on commit dd9423a

Please sign in to comment.