# 1 "" # 1 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/qpxintrin.h" 1 3 /*===---- qpxintrin.h - PPC QPX intrinsics ---------------------------------=== * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #ifndef _QPXINTRIN_H_INCLUDED #define _QPXINTRIN_H_INCLUDED typedef double __vector4double __attribute__((__vector_size__(32))); #ifndef vector4double #define vector4double __vector4double #endif # 31 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/qpxintrin.h" 3 #ifndef __VECTOR4DOUBLE__ #define __VECTOR4DOUBLE__ 1 #endif # 35 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/qpxintrin.h" 3 static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_ld (long a, long *b) { return __builtin_qpx_qvlfd((double *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_lda (long a, long *b) { return __builtin_qpx_qvlfda((double *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_ld (long a, unsigned long *b) { return __builtin_qpx_qvlfd((double *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_lda (long a, unsigned long *b) { return __builtin_qpx_qvlfda((double *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_ld (long a, long long *b) { return __builtin_qpx_qvlfd((double *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_lda (long a, long long *b) { return __builtin_qpx_qvlfda((double *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_ld (long a, unsigned long long *b) { return __builtin_qpx_qvlfd((double *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_lda (long a, unsigned long long *b) { return __builtin_qpx_qvlfda((double *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_ld (long a, float *b) { return __builtin_qpx_qvlfs((float *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_lda (long a, float *b) { return __builtin_qpx_qvlfsa((float *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_ld (long a, float _Complex *b) { return __builtin_qpx_qvlfs((float *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_lda (long a, float _Complex *b) { return __builtin_qpx_qvlfsa((float *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_ld (long a, double *b) { return __builtin_qpx_qvlfd((double *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_lda (long a, double *b) { return __builtin_qpx_qvlfda((double *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_ld (long a, double _Complex *b) { return __builtin_qpx_qvlfd((double *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_lda (long a, double _Complex *b) { return __builtin_qpx_qvlfda((double *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_ld (long a, __vector4double *b) { return __builtin_qpx_qvlfd((double *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_lda (long a, __vector4double *b) { return __builtin_qpx_qvlfda((double *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_ldia (long a, int *b) { return __builtin_qpx_qvlfiwa((int *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_ldiaa (long a, int *b) { return __builtin_qpx_qvlfiwaa((int *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_ldiz (long a, unsigned *b) { return __builtin_qpx_qvlfiwz((unsigned *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_ldiza (long a, unsigned *b) { return __builtin_qpx_qvlfiwza((unsigned *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_lds (long a, float *b) { __vector4double r = (__vector4double) { (double) *((float *) &((char *) b)[a]) }; return __builtin_shufflevector(r, r, 0, 0, 0, 0); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_lds (long a, double *b) { __vector4double r = (__vector4double) { *((double *) &((char *) b)[a]) }; return __builtin_shufflevector(r, r, 0, 0, 0, 0); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_lds (long a, float _Complex *b) { return __builtin_qpx_qvlfcs((float _Complex *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_ldsa (long a, float _Complex *b) { return __builtin_qpx_qvlfcsa((float _Complex *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_lds (long a, double _Complex *b) { return __builtin_qpx_qvlfcd((double _Complex *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_ldsa (long a, double _Complex *b) { return __builtin_qpx_qvlfcda((double _Complex *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_ld2 (long a, float *b) { return __builtin_qpx_qvlfcs((float _Complex *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_ld2a (long a, float *b) { return __builtin_qpx_qvlfcsa((float _Complex *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_ld2 (long a, double *b) { return __builtin_qpx_qvlfcd((double _Complex *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_ld2a (long a, double *b) { return __builtin_qpx_qvlfcda((double _Complex *) &((char *) b)[a]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_st (__vector4double a, long b, int *c) { return __builtin_qpx_qvstfiw(a, (unsigned *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_sta (__vector4double a, long b, int *c) { return __builtin_qpx_qvstfiwa(a, (unsigned *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_st (__vector4double a, long b, unsigned *c) { return __builtin_qpx_qvstfiw(a, (unsigned *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_sta (__vector4double a, long b, unsigned *c) { return __builtin_qpx_qvstfiwa(a, (unsigned *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_st (__vector4double a, long b, long *c) { return __builtin_qpx_qvstfd(a, (double *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_sta (__vector4double a, long b, long *c) { return __builtin_qpx_qvstfda(a, (double *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_st (__vector4double a, long b, unsigned long *c) { return __builtin_qpx_qvstfd(a, (double *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_sta (__vector4double a, long b, unsigned long *c) { return __builtin_qpx_qvstfda(a, (double *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_st (__vector4double a, long b, long long *c) { return __builtin_qpx_qvstfd(a, (double *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_sta (__vector4double a, long b, long long *c) { return __builtin_qpx_qvstfda(a, (double *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_st (__vector4double a, long b, unsigned long long *c) { return __builtin_qpx_qvstfd(a, (double *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_sta (__vector4double a, long b, unsigned long long *c) { return __builtin_qpx_qvstfda(a, (double *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_st (__vector4double a, long b, float *c) { return __builtin_qpx_qvstfs(a, (float *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_sta (__vector4double a, long b, float *c) { return __builtin_qpx_qvstfsa(a, (float *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_st (__vector4double a, long b, float _Complex *c) { return __builtin_qpx_qvstfs(a, (float *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_sta (__vector4double a, long b, float _Complex *c) { return __builtin_qpx_qvstfsa(a, (float *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_st (__vector4double a, long b, double *c) { return __builtin_qpx_qvstfd(a, (double *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_sta (__vector4double a, long b, double *c) { return __builtin_qpx_qvstfda(a, (double *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_st (__vector4double a, long b, double _Complex *c) { return __builtin_qpx_qvstfd(a, (double *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_sta (__vector4double a, long b, double _Complex *c) { return __builtin_qpx_qvstfda(a, (double *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_st (__vector4double a, long b, __vector4double *c) { return __builtin_qpx_qvstfd(a, (double *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_sta (__vector4double a, long b, __vector4double *c) { return __builtin_qpx_qvstfda(a, (double *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_sts (__vector4double a, long b, float *c) { *((float *) &((char *) c)[b]) = (float) a[0]; } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_sts (__vector4double a, long b, double *c) { *((double *) &((char *) c)[b]) = a[0]; } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_sts (__vector4double a, long b, float _Complex *c) { return __builtin_qpx_qvstfcs(a, (float _Complex *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_stsa (__vector4double a, long b, float _Complex *c) { return __builtin_qpx_qvstfcsa(a, (float _Complex *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_sts (__vector4double a, long b, double _Complex *c) { return __builtin_qpx_qvstfcd(a, (double _Complex *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_stsa (__vector4double a, long b, double _Complex *c) { return __builtin_qpx_qvstfcda(a, (double _Complex *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_st2 (__vector4double a, long b, float *c) { return __builtin_qpx_qvstfcs(a, (float _Complex *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_st2a (__vector4double a, long b, float *c) { return __builtin_qpx_qvstfcsa(a, (float _Complex *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_st2 (__vector4double a, long b, double *c) { return __builtin_qpx_qvstfcd(a, (double _Complex *) &((char *) c)[b]); } static __inline__ void __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_st2a (__vector4double a, long b, double *c) { return __builtin_qpx_qvstfcda(a, (double _Complex *) &((char *) c)[b]); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_abs (__vector4double a) { return __builtin_qpx_qvfabs(a); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_neg (__vector4double a) { return __builtin_qpx_qvfneg(a); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_nabs (__vector4double a) { return __builtin_qpx_qvfnabs(a); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_re (__vector4double a) { return __builtin_qpx_qvfre(a); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_res (__vector4double a) { return __builtin_qpx_qvfres(a); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_rsqrte (__vector4double a) { return __builtin_qpx_qvfrsqrte(a); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_rsqrtes (__vector4double a) { return __builtin_qpx_qvfrsqrtes(a); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_swsqrt (__vector4double a) { return (__vector4double) { __builtin_sqrt(a[0]), __builtin_sqrt(a[1]), __builtin_sqrt(a[2]), __builtin_sqrt(a[3]) }; } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_swsqrt_nochk (__vector4double a) { return (__vector4double) { __builtin_sqrt(a[0]), __builtin_sqrt(a[1]), __builtin_sqrt(a[2]), __builtin_sqrt(a[3]) }; } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_swsqrts (__vector4double a) { return (__vector4double) { __builtin_sqrtf((float) a[0]), __builtin_sqrtf((float) a[1]), __builtin_sqrtf((float) a[2]), __builtin_sqrtf((float) a[3]) }; } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_swsqrts_nochk (__vector4double a) { return (__vector4double) { __builtin_sqrtf((float) a[0]), __builtin_sqrtf((float) a[1]), __builtin_sqrtf((float) a[2]), __builtin_sqrtf((float) a[3]) }; } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_add (__vector4double a, __vector4double b) { return __builtin_qpx_qvfadd(a, b); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_cpsgn (__vector4double a, __vector4double b) { return __builtin_qpx_qvfcpsgn(a, b); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_mul (__vector4double a, __vector4double b) { return __builtin_qpx_qvfmul(a, b); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_sub (__vector4double a, __vector4double b) { return __builtin_qpx_qvfsub(a, b); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_swdiv (__vector4double a, __vector4double b) { return (__vector4double) { a[0]/b[0], a[1]/b[1], a[2]/b[2], a[3]/b[3] }; } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_swdiv_nochk (__vector4double a, __vector4double b) { return (__vector4double) { a[0]/b[0], a[1]/b[1], a[2]/b[2], a[3]/b[3] }; } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_swdivs (__vector4double a, __vector4double b) { return (__vector4double) { (double) ((float) a[0]/ (float) b[0]), (double) ((float) a[1]/ (float) b[1]), (double) ((float) a[2]/ (float) b[2]), (double) ((float) a[3]/ (float) b[3]) }; } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_swdivs_nochk (__vector4double a, __vector4double b) { return (__vector4double) { (double) ((float) a[0]/ (float) b[0]), (double) ((float) a[1]/ (float) b[1]), (double) ((float) a[2]/ (float) b[2]), (double) ((float) a[3]/ (float) b[3]) }; } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_xmul (__vector4double a, __vector4double b) { return __builtin_qpx_qvfxmul(a, b); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_madd (__vector4double a, __vector4double b, __vector4double c) { return __builtin_qpx_qvfmadd(a, c, b); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_msub (__vector4double a, __vector4double b, __vector4double c) { return __builtin_qpx_qvfmsub(a, c, b); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_nmadd (__vector4double a, __vector4double b, __vector4double c) { return __builtin_qpx_qvfnmadd(a, c, b); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_nmsub (__vector4double a, __vector4double b, __vector4double c) { return __builtin_qpx_qvfnmsub(a, c, b); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_xmadd (__vector4double a, __vector4double b, __vector4double c) { return __builtin_qpx_qvfxmadd(a, c, b); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_xxmadd (__vector4double a, __vector4double b, __vector4double c) { return __builtin_qpx_qvfxxmadd(a, c, b); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_xxcpnmadd (__vector4double a, __vector4double b, __vector4double c) { return __builtin_qpx_qvfxxcpnmadd(a, c, b); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_xxnpmadd (__vector4double a, __vector4double b, __vector4double c) { return __builtin_qpx_qvfxxnpmadd(a, c, b); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_ceil (__vector4double a) { return __builtin_qpx_qvfrip(a); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_floor (__vector4double a) { return __builtin_qpx_qvfrim(a); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_round (__vector4double a) { return __builtin_qpx_qvfrin(a); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_rsp (__vector4double a) { return __builtin_qpx_qvfrsp(a); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_trunc (__vector4double a) { return __builtin_qpx_qvfriz(a); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_cfid (__vector4double a) { return __builtin_qpx_qvfcfid(a); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_cfidu (__vector4double a) { return __builtin_qpx_qvfcfidu(a); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_ctid (__vector4double a) { return __builtin_qpx_qvfctid(a); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_ctidu (__vector4double a) { return __builtin_qpx_qvfctidu(a); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_ctidz (__vector4double a) { return __builtin_qpx_qvfctidz(a); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_ctiduz (__vector4double a) { return __builtin_qpx_qvfctiduz(a); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_ctiw (__vector4double a) { return __builtin_qpx_qvfctiw(a); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_ctiwu (__vector4double a) { return __builtin_qpx_qvfctiwu(a); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_ctiwz (__vector4double a) { return __builtin_qpx_qvfctiwz(a); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_ctiwuz (__vector4double a) { return __builtin_qpx_qvfctiwuz(a); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_cmpgt (__vector4double a, __vector4double b) { return __builtin_qpx_qvfcmpgt(a, b); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_cmplt (__vector4double a, __vector4double b) { return __builtin_qpx_qvfcmplt(a, b); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_cmpeq (__vector4double a, __vector4double b) { return __builtin_qpx_qvfcmpeq(a, b); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_sel (__vector4double a, __vector4double b, __vector4double c) { return __builtin_qpx_qvfsel(c, a, b); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_tstnan (__vector4double a, __vector4double b) { return __builtin_qpx_qvftstnan(a, b); } static __inline__ double __attribute__((__always_inline__, __nodebug__)) vec_extract (__vector4double a, int b) { return a[b & 3]; } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_insert (double a, __vector4double b, int c) { __vector4double r = b; r[c & 3] = a; return r; } #define vec_gpci(a) __builtin_qpx_qvgpci(a) static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_lvsl (long a, float *b) { return __builtin_qpx_qvlpcls((float *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_lvsl (long a, float _Complex *b) { return __builtin_qpx_qvlpcls((float *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_lvsl (long a, double *b) { return __builtin_qpx_qvlpcld((double *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_lvsl (long a, double _Complex *b) { return __builtin_qpx_qvlpcld((double *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_lvsr (long a, float *b) { return __builtin_qpx_qvlpcrs((float *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_lvsr (long a, float _Complex *b) { return __builtin_qpx_qvlpcrs((float *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_lvsr (long a, double *b) { return __builtin_qpx_qvlpcrd((double *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__overloadable__, __always_inline__, __nodebug__)) vec_lvsr (long a, double _Complex *b) { return __builtin_qpx_qvlpcrd((double *) &((char *) b)[a]); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_perm (__vector4double a, __vector4double b, __vector4double c) { return __builtin_qpx_qvfperm(a, b, c); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_promote (double a, int b) { __vector4double r; r[b & 3] = a; return r; } #define vec_sldw(a, b, c) __builtin_shufflevector(a, b, c, (c)+1, (c)+2, (c)+3) static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_splat (__vector4double a, int b) { __vector4double r = (__vector4double) { a[b] }; return __builtin_shufflevector(r, r, 0, 0, 0, 0); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_splats (double a) { __vector4double r = (__vector4double) { a }; return __builtin_shufflevector(r, r, 0, 0, 0, 0); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_and (__vector4double a, __vector4double b) { return __builtin_qpx_qvflogical(a, b, 0x1); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_andc (__vector4double a, __vector4double b) { return __builtin_qpx_qvflogical(a, b, 0x4); } #define vec_logical(a, b, c) __builtin_qpx_qvflogical(a, b, c) static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_nand (__vector4double a, __vector4double b) { return __builtin_qpx_qvflogical(a, b, 0xE); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_nor (__vector4double a, __vector4double b) { return __builtin_qpx_qvflogical(a, b, 0x8); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_not (__vector4double a) { return vec_nor(a, a); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_or (__vector4double a, __vector4double b) { return __builtin_qpx_qvflogical(a, b, 0x7); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_orc (__vector4double a, __vector4double b) { return __builtin_qpx_qvflogical(a, b, 0xD); } static __inline__ __vector4double __attribute__((__always_inline__, __nodebug__)) vec_xor (__vector4double a, __vector4double b) { return __builtin_qpx_qvflogical(a, b, 0x6); } #if !QPXINTRIN_DONT_DEFINE_DCBT static __inline__ void __attribute__((__always_inline__, __nodebug__)) __dcbt (void *p) { __builtin_prefetch(p); } #endif # 743 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/qpxintrin.h" 3 #endif # 745 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/qpxintrin.h" 3 # 1 "" 2 # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpi/coll/red_scat.c" /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if 0 /* expanded by -frewrite-includes */ #include "mpiimpl.h" #endif /* expanded by -frewrite-includes */ # 8 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpi/coll/red_scat.c" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * * Portions of this code were written by Microsoft. Those portions are * Copyright (c) 2007 Microsoft Corporation. Microsoft grants * permission to use, reproduce, prepare derivative works, and to * redistribute to others. The code is licensed "as is." The User * bears the risk of using it. Microsoft gives no express warranties, * guarantees or conditions. To the extent permitted by law, Microsoft * excludes the implied warranties of merchantability, fitness for a * particular purpose and non-infringement. */ #ifndef MPIIMPL_H_INCLUDED #define MPIIMPL_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpichconfconst.h" #endif /* expanded by -frewrite-includes */ # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpichconfconst.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2009 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ /* This header file contains constants that might end up on the right hand side * of a #define in mpichconf.h. * * In particular, this file must provide any constants that might be used for * conditional compilation in mpidpre.h, before most of the other headers have * been included in mpiimpl.h. */ #ifndef MPICHCONFCONST_H_INCLUDED #define MPICHCONFCONST_H_INCLUDED #define MPICH_ERROR_MSG__NONE 0 #define MPICH_ERROR_MSG__CLASS 1 #define MPICH_ERROR_MSG__GENERIC 2 #define MPICH_ERROR_MSG__ALL 8 /* -------------------------------------------------------------------- */ /* thread-related constants */ /* -------------------------------------------------------------------- */ /* Define the four ways that we achieve proper thread-safe updates of * shared structures and services * * A configure choice will set MPICH_THREAD_GRANULARITY to one of these values */ /* _INVALID exists to avoid accidental macro evaluations to 0 */ #define MPICH_THREAD_GRANULARITY__INVALID 0 #define MPICH_THREAD_GRANULARITY__GLOBAL 1 #define MPICH_THREAD_GRANULARITY__POBJ 2 #define MPICH_THREAD_GRANULARITY__LOCKFREE 3 /* _SINGLE is the "null" granularity, where all processes are single-threaded */ #define MPICH_THREAD_GRANULARITY__SINGLE 4 /* _NONE means no concurrency control, such as when using MPI_THREAD_SINGLE */ #define MPICH_REFCOUNT__NONE 1 #define MPICH_REFCOUNT__LOCKFREE 2 /* Possible values for timing */ #define MPICH_TIMING_KIND__NONE 0 #define MPICH_TIMING_KIND__TIME 1 #define MPICH_TIMING_KIND__LOG 2 #define MPICH_TIMING_KIND__LOG_DETAILED 3 #define MPICH_TIMING_KIND__ALL 4 #define MPICH_TIMING_KIND__RUNTIME 5 /* Possible values for USE_LOGGING */ #define MPICH_LOGGING__NONE 0 #define MPICH_LOGGING__RLOG 1 #define MPICH_LOGGING__EXTERNAL 4 /* Possible values for process state */ #define MPICH_MPI_STATE__PRE_INIT 0 #define MPICH_MPI_STATE__IN_INIT 1 #define MPICH_MPI_STATE__POST_INIT 2 #define MPICH_MPI_STATE__POST_FINALIZED 3 #endif /* MPICHCONFCONST_H_INCLUDED */ # 62 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpichconfconst.h" # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpichconf.h" #endif /* expanded by -frewrite-includes */ # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "./src/include/mpichconf.h" 1 /* src/include/mpichconf.h. Generated from mpichconf.h.in by configure. */ /* src/include/mpichconf.h.in. Generated from configure.ac by autoheader. */ /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPICHCONF_H_INCLUDED #define MPICHCONF_H_INCLUDED /* Define if building universal (internal helper macro) */ /* #undef AC_APPLE_UNIVERSAL_BUILD */ /* Define the number of CH3_RANK_BITS */ #define CH3_RANK_BITS 16 /* Define the number of CH4_RANK_BITS */ /* #undef CH4_RANK_BITS */ /* define to enable collection of statistics */ /* #undef COLLECT_STATS */ /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ /* #undef CRAY_STACKSEG_END */ /* Define to 1 if using `alloca.c'. */ /* #undef C_ALLOCA */ /* Define the search path for machines files */ /* #undef DEFAULT_MACHINES_PATH */ /* Define the default remote shell program to use */ /* #undef DEFAULT_REMOTE_SHELL */ /* Define to disable shared-memory communication for debugging */ /* #undef ENABLED_NO_LOCAL */ /* Define to enable debugging mode where shared-memory communication is done only between even procs or odd procs */ /* #undef ENABLED_ODD_EVEN_CLIQUES */ /* Define to enable shared-memory collectives */ /* #undef ENABLED_SHM_COLLECTIVES */ /* Application checkpointing enabled */ /* #undef ENABLE_CHECKPOINTING */ /* define to add per-vc function pointers to override send and recv functions */ /* #undef ENABLE_COMM_OVERRIDES */ /* Define if FTB is enabled */ /* #undef ENABLE_FTB */ /* Define to 1 to enable getdims-related MPI_T performance variables */ #define ENABLE_PVAR_DIMS 0 /* Define to 1 to enable nemesis-related MPI_T performance variables */ #define ENABLE_PVAR_NEM 0 /* Define to 1 to enable message receive queue-related MPI_T performance variables */ #define ENABLE_PVAR_RECVQ 0 /* Define to 1 to enable rma-related MPI_T performance variables */ #define ENABLE_PVAR_RMA 0 /* The value of false in Fortran */ #define F77_FALSE_VALUE 0 /* Fortran names are lowercase with no trailing underscore */ #define F77_NAME_LOWER 1 /* Fortran names are lowercase with two trailing underscores */ /* #undef F77_NAME_LOWER_2USCORE */ /* Fortran names are lowercase with two trailing underscores in stdcall */ /* #undef F77_NAME_LOWER_2USCORE_STDCALL */ /* Fortran names are lowercase with no trailing underscore in stdcall */ /* #undef F77_NAME_LOWER_STDCALL */ /* Fortran names are lowercase with one trailing underscore */ /* #undef F77_NAME_LOWER_USCORE */ /* Fortran names are lowercase with one trailing underscore in stdcall */ /* #undef F77_NAME_LOWER_USCORE_STDCALL */ /* Fortran names preserve the original case */ /* #undef F77_NAME_MIXED */ /* Fortran names preserve the original case in stdcall */ /* #undef F77_NAME_MIXED_STDCALL */ /* Fortran names preserve the original case with one trailing underscore */ /* #undef F77_NAME_MIXED_USCORE */ /* Fortran names preserve the original case with one trailing underscore in stdcall */ /* #undef F77_NAME_MIXED_USCORE_STDCALL */ /* Fortran names are uppercase */ /* #undef F77_NAME_UPPER */ /* Fortran names are uppercase in stdcall */ /* #undef F77_NAME_UPPER_STDCALL */ /* The value of true in Fortran */ #define F77_TRUE_VALUE 1 /* Define if we know the value of Fortran true and false */ #define F77_TRUE_VALUE_SET 1 /* Define FALSE */ #define FALSE 0 /* Directory to use in namepub */ /* #undef FILE_NAMEPUB_BASEDIR */ /* Define if addresses are a different size than Fortran integers */ #define HAVE_AINT_DIFFERENT_THAN_FINT 1 /* Define if addresses are larger than Fortran integers */ #define HAVE_AINT_LARGER_THAN_FINT 1 /* Define to 1 if you have the `alarm' function. */ #define HAVE_ALARM 1 /* Define to 1 if you have `alloca', as a function or macro. */ #define HAVE_ALLOCA 1 /* Define to 1 if you have and it should be used (not on Ultrix). */ #define HAVE_ALLOCA_H 1 /* Define if int32_t works with any alignment */ #define HAVE_ANY_INT32_T_ALIGNMENT 1 /* Define if int64_t works with any alignment */ #define HAVE_ANY_INT64_T_ALIGNMENT 1 /* Define to 1 if you have the header file. */ #define HAVE_ARPA_INET_H 1 /* Define to 1 if you have the header file. */ #define HAVE_ASSERT_H 1 /* Define to 1 if you have the `bindprocessor' function. */ /* #undef HAVE_BINDPROCESSOR */ /* Define to 1 if the compiler supports __builtin_expect. */ #define HAVE_BUILTIN_EXPECT 1 /* define if the compiler defines __FUNC__ */ /* #undef HAVE_CAP__FUNC__ */ /* Define to 1 if you have the `CFUUIDCreate' function. */ /* #undef HAVE_CFUUIDCREATE */ /* OFI netmod is built */ /* #undef HAVE_CH4_NETMOD_OFI */ /* Portals4 netmod is built */ /* #undef HAVE_CH4_NETMOD_PORTALS4 */ /* UCX netmod is built */ /* #undef HAVE_CH4_NETMOD_UCX */ /* Define to 1 if you have the header file. */ #define HAVE_COMPLEX_H 1 /* Define if CPU_SET and CPU_ZERO defined */ /* #undef HAVE_CPU_SET_MACROS */ /* Define if cpu_set_t is defined in sched.h */ #define HAVE_CPU_SET_T 1 /* Define to 1 if you have the header file. */ #define HAVE_CTYPE_H 1 /* Define if C++ is supported */ #define HAVE_CXX_BINDING 1 /* Define is C++ supports complex types */ #define HAVE_CXX_COMPLEX 1 /* define if the compiler supports exceptions */ #define HAVE_CXX_EXCEPTIONS /**/ /* Define if multiple __attribute__((alias)) are supported */ #define HAVE_C_MULTI_ATTR_ALIAS 1 /* Define if debugger support is included */ /* #undef HAVE_DEBUGGER_SUPPORT */ /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you don't. */ #define HAVE_DECL_STRERROR_R 1 /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 /* Controls how alignment of doubles is performed, separate from other FP values */ /* #undef HAVE_DOUBLE_ALIGNMENT_EXCEPTION */ /* Controls how alignment is applied based on position of doubles in the structure */ /* #undef HAVE_DOUBLE_POS_ALIGNMENT */ /* Define to 1 if the system has the type `double _Complex'. */ #define HAVE_DOUBLE__COMPLEX 1 /* Define to 1 if you have the header file. */ #define HAVE_ENDIAN_H 1 /* Define to 1 if you have the header file. */ #define HAVE_ERRNO_H 1 /* Define to enable error checking */ #define HAVE_ERROR_CHECKING MPID_ERROR_LEVEL_ALL /* Define if environ extern is available */ /* #undef HAVE_EXTERN_ENVIRON */ /* Define to 1 to enable Fortran 2008 binding */ #define HAVE_F08_BINDING 1 /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 /* Define if Fortran 90 type routines available */ #define HAVE_FC_TYPE_ROUTINES 1 /* Define if Fortran integer are the same size as C ints */ #define HAVE_FINT_IS_INT 1 /* Define to 1 if the system has the type `float _Complex'. */ #define HAVE_FLOAT__COMPLEX 1 /* Define if Fortran is supported */ #define HAVE_FORTRAN_BINDING 1 /* Define if GNU __attribute__ is supported */ #define HAVE_GCC_ATTRIBUTE 1 /* Define to 1 if you have the `gethostbyname' function. */ #define HAVE_GETHOSTBYNAME 1 /* Define to 1 if you have the `gethostname' function. */ #define HAVE_GETHOSTNAME 1 /* Define to 1 if you have the `getsid' function. */ /* #undef HAVE_GETSID */ /* Define if struct hostent contains h_addr_list */ #define HAVE_H_ADDR_LIST 1 /* Define to 1 if you have the `inet_pton' function. */ #define HAVE_INET_PTON 1 /* Define to 1 if you have the `initstate_r' function. */ #define HAVE_INITSTATE_R 1 /* Define if int16_t is supported by the C compiler */ #define HAVE_INT16_T 1 /* Define if int32_t is supported by the C compiler */ #define HAVE_INT32_T 1 /* Define if int64_t is supported by the C compiler */ #define HAVE_INT64_T 1 /* Define if int8_t is supported by the C compiler */ #define HAVE_INT8_T 1 /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 /* Define if struct iovec defined in sys/uio.h */ /* #undef HAVE_IOVEC_DEFINITION */ /* Define to 1 if you have the `isatty' function. */ /* #undef HAVE_ISATTY */ /* Define if you have the header file. */ /* #undef HAVE_KNEM_IO_H */ /* Define to 1 if you have the `cr' library (-lcr). */ /* #undef HAVE_LIBCR */ /* Define to 1 if you have the `fabric' library (-lfabric). */ /* #undef HAVE_LIBFABRIC */ /* Define to 1 if you have the `ftb' library (-lftb). */ /* #undef HAVE_LIBFTB */ /* Define to 1 if you have the `hcoll' library (-lhcoll). */ /* #undef HAVE_LIBHCOLL */ /* Define to 1 if you have the `ibverbs' library (-libverbs). */ /* #undef HAVE_LIBIBVERBS */ /* Define to 1 if you have the `llc' library (-lllc). */ /* #undef HAVE_LIBLLC */ /* Define to 1 if you have the `memcached' library (-lmemcached). */ /* #undef HAVE_LIBMEMCACHED */ /* Define to 1 if you have the `mxm' library (-lmxm). */ /* #undef HAVE_LIBMXM */ /* Define to 1 if you have the `portals' library (-lportals). */ /* #undef HAVE_LIBPORTALS */ /* Define to 1 if you have the `ucp' library (-lucp). */ /* #undef HAVE_LIBUCP */ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Controls how alignment is applied based on position of long long ints in the structure */ /* #undef HAVE_LLINT_POS_ALIGNMENT */ /* Define if long double is supported */ #define HAVE_LONG_DOUBLE 1 /* Define to 1 if the system has the type `long double _Complex'. */ #define HAVE_LONG_DOUBLE__COMPLEX 1 /* Define if long long allowed */ #define HAVE_LONG_LONG 1 /* Define if long long is supported */ #define HAVE_LONG_LONG_INT 1 /* Define if C99-style variable argument list macro functionality */ #define HAVE_MACRO_VA_ARGS 1 /* Controls byte alignment of structs with doubles */ #define HAVE_MAX_DOUBLE_FP_ALIGNMENT 8 /* Controls byte alignment of structures with floats, doubles, and long doubles (for MPI structs) */ #define HAVE_MAX_FP_ALIGNMENT 16 /* Controls byte alignment of integer structures (for MPI structs) */ #define HAVE_MAX_INTEGER_ALIGNMENT 8 /* Controls byte alignment of structs with long doubles */ #define HAVE_MAX_LONG_DOUBLE_FP_ALIGNMENT 16 /* Controls byte alignment of structures (for aligning allocated structures) */ #define HAVE_MAX_STRUCT_ALIGNMENT 8 /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `mkstemp' function. */ #define HAVE_MKSTEMP 1 /* Define to 1 if you have the `mmap' function. */ /* #undef HAVE_MMAP */ /* Define so that we can test whether the mpichconf.h file has been included */ #define HAVE_MPICHCONF 1 /* Define if the Fortran init code for MPI works from C programs without special libraries */ /* #undef HAVE_MPI_F_INIT_WORKS_WITH_C */ /* Define if multiple weak symbols may be defined */ /* #undef HAVE_MULTIPLE_PRAGMA_WEAK */ /* Define to 1 if you have the `munmap' function. */ /* #undef HAVE_MUNMAP */ /* Define if a name publishing service is available */ #define HAVE_NAMEPUB_SERVICE 1 /* define if the compiler implements namespaces */ #define HAVE_NAMESPACES /**/ /* define if the compiler implements namespace std */ #define HAVE_NAMESPACE_STD /**/ /* Define to 1 if you have the header file. */ #define HAVE_NETDB_H 1 /* Define to 1 if you have the header file. */ #define HAVE_NETINET_IN_H 1 /* Define to 1 if you have the header file. */ #define HAVE_NETINET_TCP_H 1 /* Define to 1 if you have the header file. */ #define HAVE_NET_IF_H 1 /* Define if the Fortran types are not available in C */ /* #undef HAVE_NO_FORTRAN_MPI_TYPES_IN_C */ /* Define is the OSX thread affinity policy macros defined */ /* #undef HAVE_OSX_THREAD_AFFINITY */ /* Define to 1 if you have the header file. */ /* #undef HAVE_POLL_H */ /* Cray style weak pragma */ /* #undef HAVE_PRAGMA_CRI_DUP */ /* HP style weak pragma */ /* #undef HAVE_PRAGMA_HP_SEC_DEF */ /* Supports weak pragma */ /* #undef HAVE_PRAGMA_WEAK */ /* Define to 1 if you have the `ptrace' function. */ /* #undef HAVE_PTRACE */ /* Define if ptrace parameters available */ /* #undef HAVE_PTRACE_CONT */ /* Define to 1 if you have the `putenv' function. */ #define HAVE_PUTENV 1 /* Define to 1 if you have the `qsort' function. */ #define HAVE_QSORT 1 /* Define to 1 if you have the `rand' function. */ #define HAVE_RAND 1 /* Define to 1 if you have the `random_r' function. */ #define HAVE_RANDOM_R 1 /* Define if ROMIO is enabled */ #define HAVE_ROMIO 1 /* Define to 1 if you have the `sched_getaffinity' function. */ #define HAVE_SCHED_GETAFFINITY 1 /* Define to 1 if you have the header file. */ #define HAVE_SCHED_H 1 /* Define to 1 if you have the `sched_setaffinity' function. */ #define HAVE_SCHED_SETAFFINITY 1 /* Define to 1 if you have the `select' function. */ /* #undef HAVE_SELECT */ /* Define to 1 if you have the `setitimer' function. */ #define HAVE_SETITIMER 1 /* Define to 1 if you have the `setsid' function. */ /* #undef HAVE_SETSID */ /* Define to 1 if you have the `setsockopt' function. */ #define HAVE_SETSOCKOPT 1 /* Define to 1 if you have the `shmat' function. */ /* #undef HAVE_SHMAT */ /* Define to 1 if you have the `shmctl' function. */ /* #undef HAVE_SHMCTL */ /* Define to 1 if you have the `shmdt' function. */ /* #undef HAVE_SHMDT */ /* Define to 1 if you have the `shmget' function. */ /* #undef HAVE_SHMGET */ /* Define to 1 if you have the `sigaction' function. */ /* #undef HAVE_SIGACTION */ /* Define to 1 if you have the `signal' function. */ #define HAVE_SIGNAL 1 /* Define to 1 if you have the header file. */ #define HAVE_SIGNAL_H 1 /* Define to 1 if you have the `sigset' function. */ /* #undef HAVE_SIGSET */ /* Define to 1 if you have the `snprintf' function. */ #define HAVE_SNPRINTF 1 /* Define to 1 if you have the `socket' function. */ #define HAVE_SOCKET 1 /* Define if socklen_t is available */ /* #undef HAVE_SOCKLEN_T */ /* Define to 1 if you have the `srand' function. */ #define HAVE_SRAND 1 /* Define to 1 if you have the header file. */ #define HAVE_STDARG_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDBOOL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDDEF_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDIO_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the `strdup' function. */ #define HAVE_STRDUP 1 /* Define to 1 if you have the `strerror' function. */ #define HAVE_STRERROR 1 /* Define to 1 if you have the `strerror_r' function. */ #define HAVE_STRERROR_R 1 /* Define to 1 if you have the header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strncasecmp' function. */ #define HAVE_STRNCASECMP 1 /* Define to 1 if you have the `strsignal' function. */ /* #undef HAVE_STRSIGNAL */ /* Define if struct ifconf can be used */ #define HAVE_STRUCT_IFCONF 1 /* Define if struct ifreq can be used */ #define HAVE_STRUCT_IFREQ 1 /* Define if sys/bitypes.h exists */ #define HAVE_SYS_BITYPES_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_IOCTL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_IPC_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_MMAN_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_PARAM_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_POLL_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_PTRACE_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_SELECT_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_SHM_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_SOCKET_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_SOCKIO_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TIME_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_UIO_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_UN_H 1 /* Define to enable tag error bits */ #define HAVE_TAG_ERROR_BITS 1 /* Define to 1 if you have the `thread_policy_set' function. */ /* #undef HAVE_THREAD_POLICY_SET */ /* Define to 1 if you have the `time' function. */ #define HAVE_TIME 1 /* Define to 1 if you have the header file. */ #define HAVE_TIME_H 1 /* define to enable timing collection */ /* #undef HAVE_TIMING */ /* Define if uint16_t is supported by the C compiler */ #define HAVE_UINT16_T 1 /* Define if uint32_t is supported by the C compiler */ #define HAVE_UINT32_T 1 /* Define if uint64_t is supported by the C compiler */ #define HAVE_UINT64_T 1 /* Define if uint8_t is supported by the C compiler */ #define HAVE_UINT8_T 1 /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the `unsetenv' function. */ /* #undef HAVE_UNSETENV */ /* Define to 1 if you have the `usleep' function. */ /* #undef HAVE_USLEEP */ /* Define to 1 if you have the `uuid_generate' function. */ /* #undef HAVE_UUID_GENERATE */ /* Define to 1 if you have the header file. */ /* #undef HAVE_UUID_UUID_H */ /* Define if we have va_copy */ #define HAVE_VA_COPY 1 /* Define to 1 if you have the `vsnprintf' function. */ #define HAVE_VSNPRINTF 1 /* Define to 1 if you have the `vsprintf' function. */ #define HAVE_VSPRINTF 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_WAIT_H */ /* Attribute style weak pragma */ #define HAVE_WEAK_ATTRIBUTE 1 /* Define to 1 if the system has the type `_Bool'. */ #define HAVE__BOOL 1 /* define if the compiler defines __FUNCTION__ */ #define HAVE__FUNCTION__ /**/ /* define if the compiler defines __func__ */ #define HAVE__FUNC__ /**/ /* Define if we have __va_copy */ /* #undef HAVE___VA_COPY */ /* Define to the sub-directory where libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" /* Define to enable checking of handles still allocated at MPI_Finalize */ /* #undef MPICH_DEBUG_HANDLEALLOC */ /* Define to enable handle checking */ /* #undef MPICH_DEBUG_HANDLES */ /* Define if each function exit should confirm memory arena correctness */ /* #undef MPICH_DEBUG_MEMARENA */ /* Define to enable preinitialization of memory used by structures and unions */ /* #undef MPICH_DEBUG_MEMINIT */ /* Define to enable mutex debugging */ /* #undef MPICH_DEBUG_MUTEX */ /* define to enable error messages */ #define MPICH_ERROR_MSG_LEVEL MPICH_ERROR_MSG__ALL /* Define as the name of the debugger support library */ /* #undef MPICH_INFODLL_LOC */ /* MPICH is configured to require thread safety */ #define MPICH_IS_THREADED 1 /* Method used to implement atomic updates and access */ #define MPICH_THREAD_GRANULARITY MPICH_THREAD_GRANULARITY__GLOBAL /* Level of thread support selected at compile time */ #define MPICH_THREAD_LEVEL MPI_THREAD_MULTIPLE /* Method used to implement refcount updates */ #define MPICH_THREAD_REFCOUNT MPICH_REFCOUNT__NONE /* define to disable reference counting predefined objects like MPI_COMM_WORLD */ /* #undef MPICH_THREAD_SUPPRESS_PREDEFINED_REFCOUNTS */ /* CH4 should build locality info */ /* #undef MPIDI_BUILD_CH4_LOCALITY_INFO */ /* Define if CH4 will build the default shared memory implementation as opposed to only using a netmod implementation */ /* #undef MPIDI_BUILD_CH4_SHM */ /* Define if CH4U will use per-communicator message queues */ /* #undef MPIDI_CH4U_USE_PER_COMM_QUEUE */ /* Define if CH4 will be providing the exclusive implementation of shared memory */ /* #undef MPIDI_CH4_EXCLUSIVE_SHM */ /* Define to turn on the inlining optimizations in Nemesis code */ #define MPID_NEM_INLINE 1 /* Method for local large message transfers. */ #define MPID_NEM_LOCAL_LMT_IMPL MPID_NEM_LOCAL_LMT_SHM_COPY /* Define to enable lock-free communication queues */ #define MPID_NEM_USE_LOCK_FREE_QUEUES 1 /* Define if a port may be used to communicate with the processes */ /* #undef MPIEXEC_ALLOW_PORT */ /* Size of an MPI_STATUS, in Fortran, in Fortran integers */ #define MPIF_STATUS_SIZE 5 /* limits.h _MAX constant for MPI_Aint */ #define MPIR_AINT_MAX LONG_MAX /* limits.h _MAX constant for MPI_Count */ #define MPIR_COUNT_MAX LLONG_MAX /* a C type used to compute C++ bool reductions */ #define MPIR_CXX_BOOL_CTYPE _Bool /* Define as the MPI Datatype handle for MPI::BOOL */ #define MPIR_CXX_BOOL_VALUE 0x4c000133 /* Define as the MPI Datatype handle for MPI::COMPLEX */ #define MPIR_CXX_COMPLEX_VALUE 0x4c000834 /* Define as the MPI Datatype handle for MPI::DOUBLE_COMPLEX */ #define MPIR_CXX_DOUBLE_COMPLEX_VALUE 0x4c001035 /* Define as the MPI Datatype handle for MPI::LONG_DOUBLE_COMPLEX */ #define MPIR_CXX_LONG_DOUBLE_COMPLEX_VALUE 0x4c002036 /* The C type for FORTRAN DOUBLE PRECISION */ #define MPIR_FC_DOUBLE_CTYPE double /* The C type for FORTRAN REAL */ #define MPIR_FC_REAL_CTYPE float /* C type to use for MPI_INTEGER16 */ /* #undef MPIR_INTEGER16_CTYPE */ /* C type to use for MPI_INTEGER1 */ #define MPIR_INTEGER1_CTYPE char /* C type to use for MPI_INTEGER2 */ #define MPIR_INTEGER2_CTYPE short /* C type to use for MPI_INTEGER4 */ #define MPIR_INTEGER4_CTYPE int /* C type to use for MPI_INTEGER8 */ #define MPIR_INTEGER8_CTYPE long /* limits.h _MAX constant for MPI_Offset */ #define MPIR_OFFSET_MAX LLONG_MAX /* C type to use for MPI_REAL16 */ #define MPIR_REAL16_CTYPE long double /* C type to use for MPI_REAL4 */ #define MPIR_REAL4_CTYPE float /* C type to use for MPI_REAL8 */ #define MPIR_REAL8_CTYPE double /* MPIR_Ucount is an unsigned MPI_Count-sized integer */ #define MPIR_Ucount unsigned long long /* Define to enable timing mutexes */ /* #undef MPIU_MUTEX_WAIT_TIME */ /* Define if /bin must be in path */ /* #undef NEEDS_BIN_IN_PATH */ /* Define if environ decl needed */ /* #undef NEEDS_ENVIRON_DECL */ /* Define if gethostname needs a declaration */ /* #undef NEEDS_GETHOSTNAME_DECL */ /* Define if getsid needs a declaration */ /* #undef NEEDS_GETSID_DECL */ /* Define if mkstemp needs a declaration */ /* #undef NEEDS_MKSTEMP_DECL */ /* define if pointers must be aligned on pointer boundaries */ /* #undef NEEDS_POINTER_ALIGNMENT_ADJUST */ /* Define if _POSIX_SOURCE needed to get sigaction */ /* #undef NEEDS_POSIX_FOR_SIGACTION */ /* Define if putenv needs a declaration */ /* #undef NEEDS_PUTENV_DECL */ /* Define if snprintf needs a declaration */ /* #undef NEEDS_SNPRINTF_DECL */ /* Define if strdup needs a declaration */ /* #undef NEEDS_STRDUP_DECL */ /* Define if strerror_r needs a declaration */ /* #undef NEEDS_STRERROR_R_DECL */ /* Define if strsignal needs a declaration */ /* #undef NEEDS_STRSIGNAL_DECL */ /* Define if vsnprintf needs a declaration */ /* #undef NEEDS_VSNPRINTF_DECL */ /* Name of package */ #define PACKAGE "mpich" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "discuss@mpich.org" /* Define to the full name of this package. */ #define PACKAGE_NAME "MPICH" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "MPICH 3.3a1" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "mpich" /* Define to the home page for this package. */ #define PACKAGE_URL "http://www.mpich.org/" /* Define to the version of this package. */ #define PACKAGE_VERSION "3.3a1" /* Define to turn on the prefetching optimization in Nemesis code */ #define PREFETCH_CELL 1 /* The size of `bool', as computed by sizeof. */ #define SIZEOF_BOOL 1 /* The size of `char', as computed by sizeof. */ #define SIZEOF_CHAR 1 /* The size of `Complex', as computed by sizeof. */ #define SIZEOF_COMPLEX 8 /* The size of `double', as computed by sizeof. */ #define SIZEOF_DOUBLE 8 /* The size of `DoubleComplex', as computed by sizeof. */ #define SIZEOF_DOUBLECOMPLEX 16 /* The size of `double_int', as computed by sizeof. */ #define SIZEOF_DOUBLE_INT 16 /* The size of `double _Complex', as computed by sizeof. */ #define SIZEOF_DOUBLE__COMPLEX 16 /* Define size of PAC_TYPE_NAME */ #define SIZEOF_F77_DOUBLE_PRECISION 8 /* Define size of PAC_TYPE_NAME */ #define SIZEOF_F77_INTEGER 4 /* Define size of PAC_TYPE_NAME */ #define SIZEOF_F77_REAL 4 /* The size of `float', as computed by sizeof. */ #define SIZEOF_FLOAT 4 /* The size of `float_int', as computed by sizeof. */ #define SIZEOF_FLOAT_INT 8 /* The size of `float _Complex', as computed by sizeof. */ #define SIZEOF_FLOAT__COMPLEX 8 /* The size of `int', as computed by sizeof. */ #define SIZEOF_INT 4 /* define if sizeof(int) = sizeof(MPI_Aint) */ /* #undef SIZEOF_INT_IS_AINT */ /* The size of `long', as computed by sizeof. */ #define SIZEOF_LONG 8 /* The size of `LongDoubleComplex', as computed by sizeof. */ #define SIZEOF_LONGDOUBLECOMPLEX 32 /* The size of `long double', as computed by sizeof. */ #define SIZEOF_LONG_DOUBLE 16 /* The size of `long_double_int', as computed by sizeof. */ #define SIZEOF_LONG_DOUBLE_INT 32 /* The size of `long double _Complex', as computed by sizeof. */ #define SIZEOF_LONG_DOUBLE__COMPLEX 32 /* The size of `long_int', as computed by sizeof. */ #define SIZEOF_LONG_INT 16 /* The size of `long long', as computed by sizeof. */ #define SIZEOF_LONG_LONG 8 /* The size of `MPII_Bsend_data_t', as computed by sizeof. */ #define SIZEOF_MPII_BSEND_DATA_T 96 /* The size of `OPA_ptr_t', as computed by sizeof. */ #define SIZEOF_OPA_PTR_T 8 /* The size of `short', as computed by sizeof. */ #define SIZEOF_SHORT 2 /* The size of `short_int', as computed by sizeof. */ #define SIZEOF_SHORT_INT 8 /* The size of `two_int', as computed by sizeof. */ #define SIZEOF_TWO_INT 8 /* The size of `unsigned char', as computed by sizeof. */ #define SIZEOF_UNSIGNED_CHAR 1 /* The size of `unsigned int', as computed by sizeof. */ #define SIZEOF_UNSIGNED_INT 4 /* The size of `unsigned long', as computed by sizeof. */ #define SIZEOF_UNSIGNED_LONG 8 /* The size of `unsigned long long', as computed by sizeof. */ #define SIZEOF_UNSIGNED_LONG_LONG 8 /* The size of `unsigned short', as computed by sizeof. */ #define SIZEOF_UNSIGNED_SHORT 2 /* The size of `void *', as computed by sizeof. */ #define SIZEOF_VOID_P 8 /* The size of `wchar_t', as computed by sizeof. */ #define SIZEOF_WCHAR_T 4 /* The size of `_Bool', as computed by sizeof. */ #define SIZEOF__BOOL 1 /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ /* #undef STACK_DIRECTION */ /* Define calling convention */ #define STDCALL /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define to 1 if strerror_r returns char *. */ /* #undef STRERROR_R_CHAR_P */ /* Define TRUE */ #define TRUE 1 /* Define if MPI_Aint should be used instead of void * for storing attribute values */ /* #undef USE_AINT_FOR_ATTRVAL */ /* Define if alloca should be used if available */ /* #undef USE_ALLOCA */ /* Define if performing coverage tests */ /* #undef USE_COVERAGE */ /* Define to use the fastboxes in Nemesis code */ #define USE_FASTBOX 1 /* Define if file should be used for name publisher */ /* #undef USE_FILE_FOR_NAMEPUB */ /* Define if the length of a CHARACTER*(*) string in Fortran should be passed as size_t instead of int */ /* #undef USE_FORT_STR_LEN_SIZET */ /* define to choose logging library */ #define USE_LOGGING MPICH_LOGGING__NONE /* Define to enable memory tracing */ /* #undef USE_MEMORY_TRACING */ /* Define if we have sysv shared memory */ /* #undef USE_MMAP_SHM */ /* Define if mpiexec should create a new process group session */ /* #undef USE_NEW_SESSION */ /* Define if _POSIX_C_SOURCE needs to be undefined for struct ifconf */ /* #undef USE_NOPOSIX_FOR_IFCONF */ /* Define to use immediate data field */ /* #undef USE_OFI_IMMEDIATE_DATA */ /* Define to use MR_SCALABLE */ /* #undef USE_OFI_MR_SCALABLE */ /* Define to use per-window EP & counter */ /* #undef USE_OFI_STX_RMA */ /* Define to use fi_tagged interfaces */ /* #undef USE_OFI_TAGGED */ /* Define if PMI2 API must be used */ /* #undef USE_PMI2_API */ /* Define if access to PMI information through a port rather than just an fd is allowed */ #define USE_PMI_PORT 1 /* Define if sigaction should be used to set signals */ /* #undef USE_SIGACTION */ /* Define if signal should be used to set signals */ /* #undef USE_SIGNAL */ /* Define it the socket verify macros should be enabled */ /* #undef USE_SOCK_VERIFY */ /* Define if _SVID_SOURCE needs to be defined for struct ifconf */ /* #undef USE_SVIDSOURCE_FOR_IFCONF */ /* Define if we can use a symmetric heap */ #define USE_SYM_HEAP 1 /* Define if we have sysv shared memory */ /* #undef USE_SYSV_SHM */ /* Define if weak symbols should be used */ #define USE_WEAK_SYMBOLS 1 /* Version number of package */ #define VERSION "3.3a1" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif # 1066 "./src/include/mpichconf.h" #else # 1067 "./src/include/mpichconf.h" # ifndef WORDS_BIGENDIAN # define WORDS_BIGENDIAN 1 # endif # 1070 "./src/include/mpichconf.h" #endif # 1071 "./src/include/mpichconf.h" /* Define if words are little endian */ /* #undef WORDS_LITTLEENDIAN */ /* Define if configure will not tell us, for universal binaries */ /* #undef WORDS_UNIVERSAL_ENDIAN */ /* Define for Solaris 2.5.1 so the uint32_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ /* #undef _UINT32_T */ /* Define for Solaris 2.5.1 so the uint64_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ /* #undef _UINT64_T */ /* Define for Solaris 2.5.1 so the uint8_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ /* #undef _UINT8_T */ /* define if bool is a built-in type */ /* #undef bool */ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus /* #undef inline */ #endif # 1104 "./src/include/mpichconf.h" /* Define to the type of a signed integer type of width exactly 16 bits if such a type exists and the standard includes do not define it. */ /* #undef int16_t */ /* Define to the type of a signed integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ /* #undef int32_t */ /* Define to the type of a signed integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ /* #undef int64_t */ /* Define to the type of a signed integer type of width exactly 8 bits if such a type exists and the standard includes do not define it. */ /* #undef int8_t */ /* Define to `int' if does not define. */ /* #undef pid_t */ /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #define restrict __restrict /* Work around a bug in Sun C++: it does not support _Restrict or __restrict__, even though the corresponding Sun C compiler ends up with "#define restrict _Restrict" or "#define restrict __restrict__" in the previous line. Perhaps some future version of Sun C++ will work with restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict # define __restrict__ #endif # 1137 "./src/include/mpichconf.h" /* Define to `unsigned int' if does not define. */ /* #undef size_t */ /* Define if socklen_t is not defined */ /* #undef socklen_t */ /* Define to the type of an unsigned integer type of width exactly 16 bits if such a type exists and the standard includes do not define it. */ /* #undef uint16_t */ /* Define to the type of an unsigned integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ /* #undef uint32_t */ /* Define to the type of an unsigned integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ /* #undef uint64_t */ /* Define to the type of an unsigned integer type of width exactly 8 bits if such a type exists and the standard includes do not define it. */ /* #undef uint8_t */ /* Define to empty if the keyword `volatile' does not work. Warning: valid code using `volatile' can become incorrect without. Disable with care. */ /* #undef volatile */ /* Include nopackage.h to undef autoconf-defined macros that cause conflicts in * subpackages. This should not be necessary, but some packages are too * tightly intertwined right now (such as ROMIO and the MPICH core) */ #if 0 /* expanded by -frewrite-includes */ #include "nopackage.h" #endif /* expanded by -frewrite-includes */ # 1168 "./src/include/mpichconf.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/nopackage.h" 1 /* * (C) 2011 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ /* See comments in MPICH's configure.ac for an explanation of what this file is * and why it exists. */ /* intentionally omitting any #ifndef guard, repeated inclusion is intentional */ #undef PACKAGE #undef PACKAGE_BUGREPORT #undef PACKAGE_NAME #undef PACKAGE_STRING #undef PACKAGE_TARNAME #undef PACKAGE_URL #undef PACKAGE_VERSION # 1169 "./src/include/mpichconf.h" 2 #endif /* !defined(MPICHCONF_H_INCLUDED) */ # 1171 "./src/include/mpichconf.h" # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 22 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 1 3 /* Define ISO C stdio on top of C++ iostreams. Copyright (C) 1991, 1994-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.19 Input/output */ #ifndef _STDIO_H #if !defined __need_FILE && !defined __need___FILE # define _STDIO_H 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 1 3 /* Copyright (C) 1991-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _FEATURES_H #define _FEATURES_H 1 /* These are defined by the user (or the compiler) to specify the desired environment: __STRICT_ANSI__ ISO Standard C. _ISOC99_SOURCE Extensions to ISO C89 from ISO C99. _ISOC11_SOURCE Extensions to ISO C99 from ISO C11. _POSIX_SOURCE IEEE Std 1003.1. _POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2; if >=199309L, add IEEE Std 1003.1b-1993; if >=199506L, add IEEE Std 1003.1c-1995; if >=200112L, all of IEEE 1003.1-2004 if >=200809L, all of IEEE 1003.1-2008 _XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if Single Unix conformance is wanted, to 600 for the sixth revision, to 700 for the seventh revision. _XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions. _LARGEFILE_SOURCE Some more functions for correct standard I/O. _LARGEFILE64_SOURCE Additional functionality from LFS for large files. _FILE_OFFSET_BITS=N Select default filesystem interface. _BSD_SOURCE ISO C, POSIX, and 4.3BSD things. _SVID_SOURCE ISO C, POSIX, and SVID things. _ATFILE_SOURCE Additional *at interfaces. _GNU_SOURCE All of the above, plus GNU extensions. _REENTRANT Select additionally reentrant object. _THREAD_SAFE Same as _REENTRANT, often used by other systems. _FORTIFY_SOURCE If set to numeric value > 0 additional security measures are defined, according to level. The `-ansi' switch to the GNU C compiler defines __STRICT_ANSI__. If none of these are defined, the default is to have _SVID_SOURCE, _BSD_SOURCE, and _POSIX_SOURCE set to one and _POSIX_C_SOURCE set to 200112L. If more than one of these are defined, they accumulate. For example __STRICT_ANSI__, _POSIX_SOURCE and _POSIX_C_SOURCE together give you ISO C, 1003.1, and 1003.2, but nothing else. These are defined by this file and are used by the header files to decide what to declare or define: __USE_ISOC11 Define ISO C11 things. __USE_ISOC99 Define ISO C99 things. __USE_ISOC95 Define ISO C90 AMD1 (C95) things. __USE_POSIX Define IEEE Std 1003.1 things. __USE_POSIX2 Define IEEE Std 1003.2 things. __USE_POSIX199309 Define IEEE Std 1003.1, and .1b things. __USE_POSIX199506 Define IEEE Std 1003.1, .1b, .1c and .1i things. __USE_XOPEN Define XPG things. __USE_XOPEN_EXTENDED Define X/Open Unix things. __USE_UNIX98 Define Single Unix V2 things. __USE_XOPEN2K Define XPG6 things. __USE_XOPEN2KXSI Define XPG6 XSI things. __USE_XOPEN2K8 Define XPG7 things. __USE_XOPEN2K8XSI Define XPG7 XSI things. __USE_LARGEFILE Define correct standard I/O things. __USE_LARGEFILE64 Define LFS things with separate names. __USE_FILE_OFFSET64 Define 64bit interface as default. __USE_BSD Define 4.3BSD things. __USE_SVID Define SVID things. __USE_MISC Define things common to BSD and System V Unix. __USE_ATFILE Define *at interfaces and AT_* constants for them. __USE_GNU Define GNU extensions. __USE_REENTRANT Define reentrant/thread-safe *_r functions. __USE_FORTIFY_LEVEL Additional security measures used, according to level. __FAVOR_BSD Favor 4.3BSD things in cases of conflict. The macros `__GNU_LIBRARY__', `__GLIBC__', and `__GLIBC_MINOR__' are defined by this file unconditionally. `__GNU_LIBRARY__' is provided only for compatibility. All new code should use the other symbols to test for features. All macros listed above as possibly being defined by this file are explicitly undefined if they are not explicitly defined. Feature-test macros that are not defined by the user or compiler but are implied by the other feature-test macros defined (or by the lack of any definitions) are defined by the file. */ /* Undefine everything, so we get a clean slate. */ #undef __USE_ISOC11 #undef __USE_ISOC99 #undef __USE_ISOC95 #undef __USE_ISOCXX11 #undef __USE_POSIX #undef __USE_POSIX2 #undef __USE_POSIX199309 #undef __USE_POSIX199506 #undef __USE_XOPEN #undef __USE_XOPEN_EXTENDED #undef __USE_UNIX98 #undef __USE_XOPEN2K #undef __USE_XOPEN2KXSI #undef __USE_XOPEN2K8 #undef __USE_XOPEN2K8XSI #undef __USE_LARGEFILE #undef __USE_LARGEFILE64 #undef __USE_FILE_OFFSET64 #undef __USE_BSD #undef __USE_SVID #undef __USE_MISC #undef __USE_ATFILE #undef __USE_GNU #undef __USE_REENTRANT #undef __USE_FORTIFY_LEVEL #undef __FAVOR_BSD #undef __KERNEL_STRICT_NAMES /* Suppress kernel-name space pollution unless user expressedly asks for it. */ #ifndef _LOOSE_KERNEL_NAMES # define __KERNEL_STRICT_NAMES #endif # 131 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 /* Always use ISO C things. */ #define __USE_ANSI 1 /* Convenience macros to test the versions of glibc and gcc. Use them like this: #if __GNUC_PREREQ (2,8) ... code requiring gcc 2.8 or later ... #endif Note - they won't work for gcc1 or glibc1, since the _MINOR macros were not defined then. */ #if defined __GNUC__ && defined __GNUC_MINOR__ # define __GNUC_PREREQ(maj, min) \ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) #else # 146 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 # define __GNUC_PREREQ(maj, min) 0 #endif # 148 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 /* If _BSD_SOURCE was defined by the user, favor BSD over POSIX. */ #if defined _BSD_SOURCE && \ !(defined _POSIX_SOURCE || defined _POSIX_C_SOURCE || \ defined _XOPEN_SOURCE || defined _GNU_SOURCE || defined _SVID_SOURCE) # define __FAVOR_BSD 1 #endif # 156 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 /* If _GNU_SOURCE was defined by the user, turn on all the other features. */ #ifdef _GNU_SOURCE # undef _ISOC95_SOURCE # define _ISOC95_SOURCE 1 # undef _ISOC99_SOURCE # define _ISOC99_SOURCE 1 # undef _ISOC11_SOURCE # define _ISOC11_SOURCE 1 # undef _POSIX_SOURCE # define _POSIX_SOURCE 1 # undef _POSIX_C_SOURCE # define _POSIX_C_SOURCE 200809L # undef _XOPEN_SOURCE # define _XOPEN_SOURCE 700 # undef _XOPEN_SOURCE_EXTENDED # define _XOPEN_SOURCE_EXTENDED 1 # undef _LARGEFILE64_SOURCE # define _LARGEFILE64_SOURCE 1 # undef _BSD_SOURCE # define _BSD_SOURCE 1 # undef _SVID_SOURCE # define _SVID_SOURCE 1 # undef _ATFILE_SOURCE # define _ATFILE_SOURCE 1 #endif # 182 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 /* If nothing (other than _GNU_SOURCE) is defined, define _BSD_SOURCE and _SVID_SOURCE. */ #if (!defined __STRICT_ANSI__ && !defined _ISOC99_SOURCE && \ !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE && \ !defined _XOPEN_SOURCE && !defined _BSD_SOURCE && !defined _SVID_SOURCE) # define _BSD_SOURCE 1 # define _SVID_SOURCE 1 #endif # 191 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 /* This is to enable the ISO C11 extension. */ #if (defined _ISOC11_SOURCE \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L)) # define __USE_ISOC11 1 #endif # 197 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 /* This is to enable the ISO C99 extension. */ #if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) # define __USE_ISOC99 1 #endif # 203 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 /* This is to enable the ISO C90 Amendment 1:1995 extension. */ #if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199409L)) # define __USE_ISOC95 1 #endif # 209 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 /* This is to enable compatibility for ISO C++11. So far g++ does not provide a macro. Check the temporary macro for now, too. */ #if ((defined __cplusplus && __cplusplus >= 201103L) \ || defined __GXX_EXPERIMENTAL_CXX0X__) # define __USE_ISOCXX11 1 #endif # 218 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 /* If none of the ANSI/POSIX macros are defined, use POSIX.1 and POSIX.2 (and IEEE Std 1003.1b-1993 unless _XOPEN_SOURCE is defined). */ #if ((!defined __STRICT_ANSI__ || (_XOPEN_SOURCE - 0) >= 500) && \ !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE) # define _POSIX_SOURCE 1 # if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 500 # define _POSIX_C_SOURCE 2 # elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 600 # 227 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 # define _POSIX_C_SOURCE 199506L # elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 700 # 229 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 # define _POSIX_C_SOURCE 200112L # else # 231 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 # define _POSIX_C_SOURCE 200809L # endif # 233 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 # define __USE_POSIX_IMPLICITLY 1 #endif # 235 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 #if defined _POSIX_SOURCE || _POSIX_C_SOURCE >= 1 || defined _XOPEN_SOURCE # define __USE_POSIX 1 #endif # 239 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 #if defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 2 || defined _XOPEN_SOURCE # define __USE_POSIX2 1 #endif # 243 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 #if (_POSIX_C_SOURCE - 0) >= 199309L # define __USE_POSIX199309 1 #endif # 247 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 #if (_POSIX_C_SOURCE - 0) >= 199506L # define __USE_POSIX199506 1 #endif # 251 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 #if (_POSIX_C_SOURCE - 0) >= 200112L # define __USE_XOPEN2K 1 # undef __USE_ISOC95 # define __USE_ISOC95 1 # undef __USE_ISOC99 # define __USE_ISOC99 1 #endif # 259 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 #if (_POSIX_C_SOURCE - 0) >= 200809L # define __USE_XOPEN2K8 1 # undef _ATFILE_SOURCE # define _ATFILE_SOURCE 1 #endif # 265 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 #ifdef _XOPEN_SOURCE # define __USE_XOPEN 1 # if (_XOPEN_SOURCE - 0) >= 500 # define __USE_XOPEN_EXTENDED 1 # define __USE_UNIX98 1 # undef _LARGEFILE_SOURCE # define _LARGEFILE_SOURCE 1 # if (_XOPEN_SOURCE - 0) >= 600 # if (_XOPEN_SOURCE - 0) >= 700 # define __USE_XOPEN2K8 1 # define __USE_XOPEN2K8XSI 1 # endif # 278 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 # define __USE_XOPEN2K 1 # define __USE_XOPEN2KXSI 1 # undef __USE_ISOC95 # define __USE_ISOC95 1 # undef __USE_ISOC99 # define __USE_ISOC99 1 # endif # 285 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 # else # 286 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 # ifdef _XOPEN_SOURCE_EXTENDED # define __USE_XOPEN_EXTENDED 1 # endif # 289 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 # endif # 290 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 #endif # 291 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 #ifdef _LARGEFILE_SOURCE # define __USE_LARGEFILE 1 #endif # 295 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 #ifdef _LARGEFILE64_SOURCE # define __USE_LARGEFILE64 1 #endif # 299 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 #if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS == 64 # define __USE_FILE_OFFSET64 1 #endif # 303 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 #if defined _BSD_SOURCE || defined _SVID_SOURCE # define __USE_MISC 1 #endif # 307 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 #ifdef _BSD_SOURCE # define __USE_BSD 1 #endif # 311 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 #ifdef _SVID_SOURCE # define __USE_SVID 1 #endif # 315 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 #ifdef _ATFILE_SOURCE # define __USE_ATFILE 1 #endif # 319 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 #ifdef _GNU_SOURCE # define __USE_GNU 1 #endif # 323 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 #if defined _REENTRANT || defined _THREAD_SAFE # define __USE_REENTRANT 1 #endif # 327 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 # if !defined __OPTIMIZE__ || __OPTIMIZE__ <= 0 # warning _FORTIFY_SOURCE requires compiling with optimization (-O) # elif !__GNUC_PREREQ (4, 1) # 332 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 # warning _FORTIFY_SOURCE requires GCC 4.1 or later # elif _FORTIFY_SOURCE > 1 # 334 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 # define __USE_FORTIFY_LEVEL 2 # else # 336 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 # define __USE_FORTIFY_LEVEL 1 # endif # 338 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 #endif # 339 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 #ifndef __USE_FORTIFY_LEVEL # define __USE_FORTIFY_LEVEL 0 #endif # 342 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 /* Get definitions of __STDC_* predefined macros, if the compiler has not preincluded this header automatically. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 345 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdc-predef.h" 1 3 /* Copyright (C) 1991-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _STDC_PREDEF_H #define _STDC_PREDEF_H 1 /* This header is separate from features.h so that the compiler can include it implicitly at the start of every compilation. It must not itself include or any other header that includes because the implicit include comes before any feature test macros that may be defined in a source file before it first explicitly includes a system header. GCC knows the name of this header in order to preinclude it. */ /* We do support the IEC 559 math functionality, real and complex. */ #define __STDC_IEC_559__ 1 #define __STDC_IEC_559_COMPLEX__ 1 /* wchar_t uses ISO/IEC 10646 (2nd ed., published 2011-03-15) / Unicode 6.0. */ #define __STDC_ISO_10646__ 201103L /* We do not support C11 . */ #define __STDC_NO_THREADS__ 1 #endif # 41 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdc-predef.h" 3 # 346 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 2 3 /* This macro indicates that the installed library is the GNU C Library. For historic reasons the value now is 6 and this will stay from now on. The use of this variable is deprecated. Use __GLIBC__ and __GLIBC_MINOR__ now (see below) when you want to test for a specific GNU C library version and use the values in to get the sonames of the shared libraries. */ #undef __GNU_LIBRARY__ #define __GNU_LIBRARY__ 6 /* Major and minor version number of the GNU C library package. Use these macros to test for features in specific releases. */ #define __GLIBC__ 2 #define __GLIBC_MINOR__ 17 #define __GLIBC_PREREQ(maj, min) \ ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min)) /* Decide whether a compiler supports the long long datatypes. */ #if defined __GNUC__ \ || (defined __PGI && defined __i386__ ) \ || (defined __INTEL_COMPILER && (defined __i386__ || defined __ia64__)) \ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) # define __GLIBC_HAVE_LONG_LONG 1 #endif # 371 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 /* This is here only because every header file already includes this one. */ #ifndef __ASSEMBLER__ # ifndef _SYS_CDEFS_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 375 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 1 3 /* Copyright (C) 1992-2002, 2004, 2005, 2006, 2007, 2009, 2011, 2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_CDEFS_H #define _SYS_CDEFS_H 1 /* We are almost always included from features.h. */ #ifndef _FEATURES_H #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 24 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # 25 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 #endif # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* The GNU libc does not support any K&R compilers or the traditional mode of ISO C compilers anymore. Check for some of the combinations not anymore supported. */ #if defined __GNUC__ && !defined __STDC__ # error "You need a ISO C conforming compiler to use the glibc headers" #endif # 33 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* Some user header file might have defined this before. */ #undef __P #undef __PMT #ifdef __GNUC__ /* All functions, except those with callbacks or those that synchronize memory, are leaf functions. */ # if __GNUC_PREREQ (4, 6) && !defined _LIBC # define __LEAF , __leaf__ # define __LEAF_ATTR __attribute__ ((__leaf__)) # else # 46 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # define __LEAF # define __LEAF_ATTR # endif # 49 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* GCC can always grok prototypes. For C++ programs we add throw() to help it optimize the function calls. But this works only with gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions as non-throwing using a function attribute since programs can use the -fexceptions options for C code as well. */ # if !defined __cplusplus && __GNUC_PREREQ (3, 3) # define __THROW __attribute__ ((__nothrow__ __LEAF)) # define __THROWNL __attribute__ ((__nothrow__)) # define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct # else # 60 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # if defined __cplusplus && __GNUC_PREREQ (2,8) # define __THROW throw () # define __THROWNL throw () # define __NTH(fct) __LEAF_ATTR fct throw () # else # 65 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # define __THROW # define __THROWNL # define __NTH(fct) fct # endif # 69 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # endif # 70 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 #else /* Not GCC. */ # 72 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # define __inline /* No inline functions. */ # define __THROW # define __THROWNL # define __NTH(fct) fct #endif /* GCC. */ # 80 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* These two macros are not used in glibc anymore. They are kept here only because some other projects expect the macros to be defined. */ #define __P(args) args #define __PMT(args) args /* For these things, GCC behaves the ANSI way normally, and the non-ANSI way under -traditional. */ #define __CONCAT(x,y) x ## y #define __STRING(x) #x /* This is not a typedef so `const __ptr_t' does the right thing. */ #define __ptr_t void * #define __long_double_t long double /* C++ needs to know that types and declarations are C, not C++. */ #ifdef __cplusplus # define __BEGIN_DECLS extern "C" { # define __END_DECLS } #else # 102 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # define __BEGIN_DECLS # define __END_DECLS #endif # 105 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* The standard library needs the functions from the ISO C90 standard in the std namespace. At the same time we want to be safe for future changes and we include the ISO C99 code in the non-standard namespace __c99. The C++ wrapper header take case of adding the definitions to the global namespace. */ #if defined __cplusplus && defined _GLIBCPP_USE_NAMESPACES # define __BEGIN_NAMESPACE_STD namespace std { # define __END_NAMESPACE_STD } # define __USING_NAMESPACE_STD(name) using std::name; # define __BEGIN_NAMESPACE_C99 namespace __c99 { # define __END_NAMESPACE_C99 } # define __USING_NAMESPACE_C99(name) using __c99::name; #else # 120 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* For compatibility we do not add the declarations into any namespace. They will end up in the global namespace which is what old code expects. */ # define __BEGIN_NAMESPACE_STD # define __END_NAMESPACE_STD # define __USING_NAMESPACE_STD(name) # define __BEGIN_NAMESPACE_C99 # define __END_NAMESPACE_C99 # define __USING_NAMESPACE_C99(name) #endif # 130 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* Support for bounded pointers. */ #ifndef __BOUNDED_POINTERS__ # define __bounded /* nothing */ # define __unbounded /* nothing */ # define __ptrvalue /* nothing */ #endif # 138 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* Fortify support. */ #define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) #define __bos0(ptr) __builtin_object_size (ptr, 0) #define __fortify_function __extern_always_inline __attribute_artificial__ #if __GNUC_PREREQ (4,3) # define __warndecl(name, msg) \ extern void name (void) __attribute__((__warning__ (msg))) # define __warnattr(msg) __attribute__((__warning__ (msg))) # define __errordecl(name, msg) \ extern void name (void) __attribute__((__error__ (msg))) #else # 152 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # define __warndecl(name, msg) extern void name (void) # define __warnattr(msg) # define __errordecl(name, msg) extern void name (void) #endif # 156 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* Support for flexible arrays. */ #if __GNUC_PREREQ (2,97) /* GCC 2.97 supports C99 flexible array members. */ # define __flexarr [] #else # 162 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # ifdef __GNUC__ # define __flexarr [0] # else # 165 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L # define __flexarr [] # else # 168 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* Some other non-C99 compiler. Approximate with [1]. */ # define __flexarr [1] # endif # 171 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # endif # 172 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 #endif # 173 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* __asm__ ("xyz") is used throughout the headers to rename functions at the assembly language level. This is wrapped by the __REDIRECT macro, in order to support compilers that can do this some other way. When compilers don't support asm-names at all, we have to do preprocessor tricks instead (which don't have exactly the right semantics, but it's the best we can do). Example: int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */ #if defined __GNUC__ && __GNUC__ >= 2 # define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias)) # ifdef __cplusplus # define __REDIRECT_NTH(name, proto, alias) \ name proto __THROW __asm__ (__ASMNAME (#alias)) # define __REDIRECT_NTHNL(name, proto, alias) \ name proto __THROWNL __asm__ (__ASMNAME (#alias)) # else # 194 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # define __REDIRECT_NTH(name, proto, alias) \ name proto __asm__ (__ASMNAME (#alias)) __THROW # define __REDIRECT_NTHNL(name, proto, alias) \ name proto __asm__ (__ASMNAME (#alias)) __THROWNL # endif # 199 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname) # define __ASMNAME2(prefix, cname) __STRING (prefix) cname /* #elif __SOME_OTHER_COMPILER__ # define __REDIRECT(name, proto, alias) name proto; \ _Pragma("let " #name " = " #alias) */ #endif # 209 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* GCC has various useful declarations that can be made with the `__attribute__' syntax. All of the ways we use this do fine if they are omitted for compilers that don't understand it. */ #if !defined __GNUC__ || __GNUC__ < 2 # define __attribute__(xyz) /* Ignore */ #endif # 216 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* At some point during the gcc 2.96 development the `malloc' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ #if __GNUC_PREREQ (2,96) # define __attribute_malloc__ __attribute__ ((__malloc__)) #else # 223 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # define __attribute_malloc__ /* Ignore */ #endif # 225 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* At some point during the gcc 2.96 development the `pure' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ #if __GNUC_PREREQ (2,96) # define __attribute_pure__ __attribute__ ((__pure__)) #else # 232 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # define __attribute_pure__ /* Ignore */ #endif # 234 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* This declaration tells the compiler that the value is constant. */ #if __GNUC_PREREQ (2,5) # define __attribute_const__ __attribute__ ((__const__)) #else # 239 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # define __attribute_const__ /* Ignore */ #endif # 241 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* At some point during the gcc 3.1 development the `used' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ #if __GNUC_PREREQ (3,1) # define __attribute_used__ __attribute__ ((__used__)) # define __attribute_noinline__ __attribute__ ((__noinline__)) #else # 249 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # define __attribute_used__ __attribute__ ((__unused__)) # define __attribute_noinline__ /* Ignore */ #endif # 252 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* gcc allows marking deprecated functions. */ #if __GNUC_PREREQ (3,2) # define __attribute_deprecated__ __attribute__ ((__deprecated__)) #else # 257 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # define __attribute_deprecated__ /* Ignore */ #endif # 259 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* At some point during the gcc 2.8 development the `format_arg' attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. If several `format_arg' attributes are given for the same function, in gcc-3.0 and older, all but the last one are ignored. In newer gccs, all designated arguments are considered. */ #if __GNUC_PREREQ (2,8) # define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x))) #else # 269 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # define __attribute_format_arg__(x) /* Ignore */ #endif # 271 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* At some point during the gcc 2.97 development the `strfmon' format attribute for functions was introduced. We don't want to use it unconditionally (although this would be possible) since it generates warnings. */ #if __GNUC_PREREQ (2,97) # define __attribute_format_strfmon__(a,b) \ __attribute__ ((__format__ (__strfmon__, a, b))) #else # 280 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # define __attribute_format_strfmon__(a,b) /* Ignore */ #endif # 282 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* The nonull function attribute allows to mark pointer parameters which must not be NULL. */ #if __GNUC_PREREQ (3,3) # define __nonnull(params) __attribute__ ((__nonnull__ params)) #else # 288 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # define __nonnull(params) #endif # 290 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* If fortification mode, we warn about unused results of certain function calls which can lead to problems. */ #if __GNUC_PREREQ (3,4) # define __attribute_warn_unused_result__ \ __attribute__ ((__warn_unused_result__)) # if __USE_FORTIFY_LEVEL > 0 # define __wur __attribute_warn_unused_result__ # endif # 299 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 #else # 300 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # define __attribute_warn_unused_result__ /* empty */ #endif # 302 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 #ifndef __wur # define __wur /* Ignore */ #endif # 305 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* Forces a function to be always inlined. */ #if __GNUC_PREREQ (3,2) # define __always_inline __inline __attribute__ ((__always_inline__)) #else # 310 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # define __always_inline __inline #endif # 312 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* Associate error messages with the source location of the call site rather than with the source location inside the function. */ #if __GNUC_PREREQ (4,3) # define __attribute_artificial__ __attribute__ ((__artificial__)) #else # 318 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # define __attribute_artificial__ /* Ignore */ #endif # 320 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 inline semantics, unless -fgnu89-inline is used. */ #if (!defined __cplusplus || __GNUC_PREREQ (4,3)) && defined __GNUC__ # if defined __GNUC_STDC_INLINE__ || defined __cplusplus # define __extern_inline extern __inline __attribute__ ((__gnu_inline__)) # define __extern_always_inline \ extern __always_inline __attribute__ ((__gnu_inline__)) # else # 329 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # define __extern_inline extern __inline # define __extern_always_inline extern __always_inline # endif # 332 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 #elif defined __GNUC__ /* C++ and GCC <4.3. */ # 333 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # define __extern_inline extern __inline # define __extern_always_inline \ extern __always_inline #else /* Not GCC. */ # 337 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # define __extern_inline /* Ignore */ # define __extern_always_inline /* Ignore */ #endif # 340 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* GCC 4.3 and above allow passing all anonymous arguments of an __extern_always_inline function to some other vararg function. */ #if __GNUC_PREREQ (4,3) # define __va_arg_pack() __builtin_va_arg_pack () # define __va_arg_pack_len() __builtin_va_arg_pack_len () #endif # 347 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* It is possible to compile containing GCC extensions even if GCC is run in pedantic mode if the uses are carefully marked using the `__extension__' keyword. But this is not generally available before version 2.8. */ #if !__GNUC_PREREQ (2,8) # define __extension__ /* Ignore */ #endif # 355 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* __restrict is known in EGCS 1.2 and above. */ #if !__GNUC_PREREQ (2,92) # define __restrict /* Ignore */ #endif # 360 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* ISO C99 also allows to declare arrays as non-overlapping. The syntax is array_name[restrict] GCC 3.1 supports this. */ #if __GNUC_PREREQ (3,1) && !defined __GNUG__ # define __restrict_arr __restrict #else # 367 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # ifdef __GNUC__ # define __restrict_arr /* Not supported in old GCC. */ # else # 370 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L # define __restrict_arr restrict # else # 373 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 /* Some other non-C99 compiler. */ # define __restrict_arr /* Not supported. */ # endif # 376 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # endif # 377 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 #endif # 378 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 #if __GNUC__ >= 3 # define __glibc_unlikely(cond) __builtin_expect((cond), 0) #else # 382 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # define __glibc_unlikely(cond) (cond) #endif # 384 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 385 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 1 3 /* Determine the wordsize from the preprocessor defines. */ #if defined __powerpc64__ # define __WORDSIZE 64 # define __WORDSIZE_TIME64_COMPAT32 1 #else # 7 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 # define __WORDSIZE 32 #endif # 9 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 #if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL /* Signal the glibc ABI didn't used to have a `long double'. The changes all the `long double' function variants to be redirects to the double functions. */ # define __LONG_DOUBLE_MATH_OPTIONAL 1 # ifndef __LONG_DOUBLE_128__ # define __NO_LONG_DOUBLE_MATH 1 # endif # 19 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 #endif # 20 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 # 386 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 2 3 #if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH # define __LDBL_COMPAT 1 # ifdef __REDIRECT # define __LDBL_REDIR1(name, proto, alias) __REDIRECT (name, proto, alias) # define __LDBL_REDIR(name, proto) \ __LDBL_REDIR1 (name, proto, __nldbl_##name) # define __LDBL_REDIR1_NTH(name, proto, alias) __REDIRECT_NTH (name, proto, alias) # define __LDBL_REDIR_NTH(name, proto) \ __LDBL_REDIR1_NTH (name, proto, __nldbl_##name) # define __LDBL_REDIR1_DECL(name, alias) \ extern __typeof (name) name __asm (__ASMNAME (#alias)); # define __LDBL_REDIR_DECL(name) \ extern __typeof (name) name __asm (__ASMNAME ("__nldbl_" #name)); # define __REDIRECT_LDBL(name, proto, alias) \ __LDBL_REDIR1 (name, proto, __nldbl_##alias) # define __REDIRECT_NTH_LDBL(name, proto, alias) \ __LDBL_REDIR1_NTH (name, proto, __nldbl_##alias) # endif # 405 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 #endif # 406 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 #if !defined __LDBL_COMPAT || !defined __REDIRECT # define __LDBL_REDIR1(name, proto, alias) name proto # define __LDBL_REDIR(name, proto) name proto # define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW # define __LDBL_REDIR_NTH(name, proto) name proto __THROW # define __LDBL_REDIR_DECL(name) # ifdef __REDIRECT # define __REDIRECT_LDBL(name, proto, alias) __REDIRECT (name, proto, alias) # define __REDIRECT_NTH_LDBL(name, proto, alias) \ __REDIRECT_NTH (name, proto, alias) # endif # 417 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 #endif # 418 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 #endif /* sys/cdefs.h */ # 420 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/cdefs.h" 3 # 376 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 2 3 # endif # 377 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 /* If we don't have __REDIRECT, prototypes will be missing if __USE_FILE_OFFSET64 but not __USE_LARGEFILE[64]. */ # if defined __USE_FILE_OFFSET64 && !defined __REDIRECT # define __USE_LARGEFILE 1 # define __USE_LARGEFILE64 1 # endif # 384 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 #endif /* !ASSEMBLER */ # 386 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 /* Decide whether we can define 'extern inline' functions in headers. */ #if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \ && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__ \ && defined __extern_inline # define __USE_EXTERN_INLINES 1 #endif # 393 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 /* This is here only because every header file already includes this one. Get the definitions of all the appropriate `__stub_FUNCTION' symbols. contains `#define __stub_FUNCTION' when FUNCTION is a stub that will always return failure (and set errno to ENOSYS). */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 399 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/gnu/stubs.h" 1 3 /* This file is automatically generated. This file selects the right generated file of `__stub_FUNCTION' macros based on the architecture being compiled for. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 5 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/gnu/stubs.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 1 3 /* Determine the wordsize from the preprocessor defines. */ #if defined __powerpc64__ # define __WORDSIZE 64 # define __WORDSIZE_TIME64_COMPAT32 1 #else # 7 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 # define __WORDSIZE 32 #endif # 9 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 #if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL /* Signal the glibc ABI didn't used to have a `long double'. The changes all the `long double' function variants to be redirects to the double functions. */ # define __LONG_DOUBLE_MATH_OPTIONAL 1 # ifndef __LONG_DOUBLE_128__ # define __NO_LONG_DOUBLE_MATH 1 # endif # 19 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 #endif # 20 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 # 6 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/gnu/stubs.h" 2 3 #if __WORDSIZE == 32 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 8 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/gnu/stubs.h" 3 # 9 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/gnu/stubs.h" 3 #endif # 10 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/gnu/stubs.h" 3 #if __WORDSIZE == 64 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 11 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/gnu/stubs.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/gnu/stubs-64.h" 1 3 /* This file is automatically generated. It defines a symbol `__stub_FUNCTION' for each function in the C library which is a stub, meaning it will fail every time called, usually setting errno to ENOSYS. */ #ifdef _LIBC #error Applications may not define the macro _LIBC #endif # 9 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/gnu/stubs-64.h" 3 #define __stub___kernel_rem_pio2l #define __stub_chflags #define __stub_clock_adjtime #define __stub_fanotify_init #define __stub_fanotify_mark #define __stub_fattach #define __stub_fchflags #define __stub_fdetach #define __stub_gtty #define __stub_lchmod #define __stub_name_to_handle_at #define __stub_open_by_handle_at #define __stub_prlimit #define __stub_prlimit64 #define __stub_revoke #define __stub_setlogin #define __stub_sigreturn #define __stub_sstk #define __stub_stty # 12 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/gnu/stubs.h" 2 3 #endif # 13 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/gnu/stubs.h" 3 # 400 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 2 3 #endif /* features.h */ # 403 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/features.h" 3 # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 2 3 __BEGIN_DECLS # define __need_size_t # define __need_NULL #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 33 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # 1 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 1 3 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) /* Always define miscellaneous pieces when modules are available. */ #if !__has_feature(modules) #define __STDDEF_H #endif # 37 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 44 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_ptrdiff_t) #if !defined(_PTRDIFF_T) || __has_feature(modules) /* Always define ptrdiff_t when modules are available. */ #if !__has_feature(modules) #define _PTRDIFF_T #endif # 51 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 53 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 55 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_size_t) #if !defined(_SIZE_T) || __has_feature(modules) /* Always define size_t when modules are available. */ #if !__has_feature(modules) #define _SIZE_T #endif # 62 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ size_t; #endif # 64 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_size_t #endif /*defined(__need_size_t) */ # 66 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) /* Always define rsize_t when modules are available. */ #if !__has_feature(modules) #define _RSIZE_T #endif # 76 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ rsize_t; #endif # 78 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif /* defined(__need_STDDEF_H_misc) */ # 79 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_wchar_t) #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if !defined(_WCHAR_T) || __has_feature(modules) #if !__has_feature(modules) #define _WCHAR_T #if defined(_MSC_EXTENSIONS) #define _WCHAR_T_DEFINED #endif # 89 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 90 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WCHAR_TYPE__ wchar_t; #endif # 92 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 93 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 95 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_NULL) #undef NULL #ifdef __cplusplus # if !defined(__MINGW32__) && !defined(_MSC_VER) # define NULL __null # else # 102 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL 0 # endif # 104 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #else # 105 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL ((void*)0) #endif # 107 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #ifdef __cplusplus #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 112 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 113 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_NULL #endif /* defined(__need_NULL) */ # 115 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 118 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 119 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 120 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 123 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if defined(__need_wint_t) /* Always define wint_t when modules are available. */ #if !defined(_WINT_T) || __has_feature(modules) #if !__has_feature(modules) #define _WINT_T #endif # 132 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WINT_TYPE__ wint_t; #endif # 134 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wint_t #endif /* __need_wint_t */ # 136 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 138 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 34 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 2 3 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 35 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/types.h" 1 3 /* bits/types.h -- definitions of __*_t types underlying *_t types. Copyright (C) 2002-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ #ifndef _BITS_TYPES_H #define _BITS_TYPES_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/types.h" 3 # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/types.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/types.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 1 3 /* Determine the wordsize from the preprocessor defines. */ #if defined __powerpc64__ # define __WORDSIZE 64 # define __WORDSIZE_TIME64_COMPAT32 1 #else # 7 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 # define __WORDSIZE 32 #endif # 9 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 #if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL /* Signal the glibc ABI didn't used to have a `long double'. The changes all the `long double' function variants to be redirects to the double functions. */ # define __LONG_DOUBLE_MATH_OPTIONAL 1 # ifndef __LONG_DOUBLE_128__ # define __NO_LONG_DOUBLE_MATH 1 # endif # 19 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 #endif # 20 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/types.h" 2 3 /* Convenience types. */ typedef unsigned char __u_char; typedef unsigned short int __u_short; typedef unsigned int __u_int; typedef unsigned long int __u_long; /* Fixed-size types, underlying types depend on word size and compiler. */ typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef signed short int __int16_t; typedef unsigned short int __uint16_t; typedef signed int __int32_t; typedef unsigned int __uint32_t; #if __WORDSIZE == 64 typedef signed long int __int64_t; typedef unsigned long int __uint64_t; #elif defined __GLIBC_HAVE_LONG_LONG # 46 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/types.h" 3 __extension__ typedef signed long long int __int64_t; __extension__ typedef unsigned long long int __uint64_t; #endif # 49 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/types.h" 3 /* quad_t is also 64 bits. */ #if __WORDSIZE == 64 typedef long int __quad_t; typedef unsigned long int __u_quad_t; #elif defined __GLIBC_HAVE_LONG_LONG # 55 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/types.h" 3 __extension__ typedef long long int __quad_t; __extension__ typedef unsigned long long int __u_quad_t; #else # 58 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/types.h" 3 typedef struct { long __val[2]; } __quad_t; typedef struct { __u_long __val[2]; } __u_quad_t; #endif # 67 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/types.h" 3 /* The machine-dependent file defines __*_T_TYPE macros for each of the OS types we define below. The definitions of those macros must use the following macros for underlying types. We define __S_TYPE and __U_TYPE for the signed and unsigned variants of each of the following integer types on this machine. 16 -- "natural" 16-bit type (always short) 32 -- "natural" 32-bit type (always int) 64 -- "natural" 64-bit type (long or long long) LONG32 -- 32-bit type, traditionally long QUAD -- 64-bit type, always long long WORD -- natural type of __WORDSIZE bits (int or long) LONGWORD -- type of __WORDSIZE bits, traditionally long We distinguish WORD/LONGWORD, 32/LONG32, and 64/QUAD so that the conventional uses of `long' or `long long' type modifiers match the types we define, even when a less-adorned type would be the same size. This matters for (somewhat) portably writing printf/scanf formats for these types, where using the appropriate l or ll format modifiers can make the typedefs and the formats match up across all GNU platforms. If we used `long' when it's 64 bits where `long long' is expected, then the compiler would warn about the formats not matching the argument types, and the programmer changing them to shut up the compiler would break the program's portability. Here we assume what is presently the case in all the GCC configurations we support: long long is always 64 bits, long is always word/address size, and int is always 32 bits. */ #define __S16_TYPE short int #define __U16_TYPE unsigned short int #define __S32_TYPE int #define __U32_TYPE unsigned int #define __SLONGWORD_TYPE long int #define __ULONGWORD_TYPE unsigned long int #if __WORDSIZE == 32 # define __SQUAD_TYPE __quad_t # define __UQUAD_TYPE __u_quad_t # define __SWORD_TYPE int # define __UWORD_TYPE unsigned int # define __SLONG32_TYPE long int # define __ULONG32_TYPE unsigned long int # define __S64_TYPE __quad_t # define __U64_TYPE __u_quad_t /* We want __extension__ before typedef's that use nonstandard base types such as `long long' in C89 mode. */ # define __STD_TYPE __extension__ typedef #elif __WORDSIZE == 64 # 117 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/types.h" 3 # define __SQUAD_TYPE long int # define __UQUAD_TYPE unsigned long int # define __SWORD_TYPE long int # define __UWORD_TYPE unsigned long int # define __SLONG32_TYPE int # define __ULONG32_TYPE unsigned int # define __S64_TYPE long int # define __U64_TYPE unsigned long int /* No need to mark the typedef with __extension__. */ # define __STD_TYPE typedef #else # 128 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/types.h" 3 # error #endif # 130 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/types.h" 3 #if 0 /* expanded by -frewrite-includes */ #include /* Defines __*_T_TYPE macros. */ #endif /* expanded by -frewrite-includes */ # 130 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/types.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/typesizes.h" 1 3 /* bits/typesizes.h -- underlying types for *_t. Generic version. Copyright (C) 2002-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_TYPES_H # error "Never include directly; use instead." #endif # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/typesizes.h" 3 #ifndef _BITS_TYPESIZES_H #define _BITS_TYPESIZES_H 1 /* See for the meaning of these macros. This file exists so that need not vary across different GNU platforms. */ #define __DEV_T_TYPE __UQUAD_TYPE #define __UID_T_TYPE __U32_TYPE #define __GID_T_TYPE __U32_TYPE #define __INO_T_TYPE __ULONGWORD_TYPE #define __INO64_T_TYPE __UQUAD_TYPE #define __MODE_T_TYPE __U32_TYPE #define __NLINK_T_TYPE __UWORD_TYPE #define __OFF_T_TYPE __SLONGWORD_TYPE #define __OFF64_T_TYPE __SQUAD_TYPE #define __PID_T_TYPE __S32_TYPE #define __RLIM_T_TYPE __ULONGWORD_TYPE #define __RLIM64_T_TYPE __UQUAD_TYPE #define __BLKCNT_T_TYPE __SLONGWORD_TYPE #define __BLKCNT64_T_TYPE __SQUAD_TYPE #define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE #define __FSBLKCNT64_T_TYPE __UQUAD_TYPE #define __FSFILCNT_T_TYPE __ULONGWORD_TYPE #define __FSFILCNT64_T_TYPE __UQUAD_TYPE #define __FSWORD_T_TYPE __SWORD_TYPE #define __ID_T_TYPE __U32_TYPE #define __CLOCK_T_TYPE __SLONGWORD_TYPE #define __TIME_T_TYPE __SLONGWORD_TYPE #define __USECONDS_T_TYPE __U32_TYPE #define __SUSECONDS_T_TYPE __SLONGWORD_TYPE #define __DADDR_T_TYPE __S32_TYPE #define __KEY_T_TYPE __S32_TYPE #define __CLOCKID_T_TYPE __S32_TYPE #define __TIMER_T_TYPE void * #define __BLKSIZE_T_TYPE __SLONGWORD_TYPE #define __FSID_T_TYPE struct { int __val[2]; } #define __SSIZE_T_TYPE __SWORD_TYPE #define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE #define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE #ifdef __LP64__ /* Tell the libc code that off_t and off64_t are actually the same type for all ABI purposes, even if possibly expressed as different base types for C type-checking purposes. */ # define __OFF_T_MATCHES_OFF64_T 1 /* Same for ino_t and ino64_t. */ # define __INO_T_MATCHES_INO64_T 1 #endif # 72 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/typesizes.h" 3 /* Number of descriptors that can fit in an `fd_set'. */ #define __FD_SETSIZE 1024 #endif /* bits/typesizes.h */ # 78 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/typesizes.h" 3 # 131 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/types.h" 2 3 __STD_TYPE __DEV_T_TYPE __dev_t; /* Type of device numbers. */ __STD_TYPE __UID_T_TYPE __uid_t; /* Type of user identifications. */ __STD_TYPE __GID_T_TYPE __gid_t; /* Type of group identifications. */ __STD_TYPE __INO_T_TYPE __ino_t; /* Type of file serial numbers. */ __STD_TYPE __INO64_T_TYPE __ino64_t; /* Type of file serial numbers (LFS).*/ __STD_TYPE __MODE_T_TYPE __mode_t; /* Type of file attribute bitmasks. */ __STD_TYPE __NLINK_T_TYPE __nlink_t; /* Type of file link counts. */ __STD_TYPE __OFF_T_TYPE __off_t; /* Type of file sizes and offsets. */ __STD_TYPE __OFF64_T_TYPE __off64_t; /* Type of file sizes and offsets (LFS). */ __STD_TYPE __PID_T_TYPE __pid_t; /* Type of process identifications. */ __STD_TYPE __FSID_T_TYPE __fsid_t; /* Type of file system IDs. */ __STD_TYPE __CLOCK_T_TYPE __clock_t; /* Type of CPU usage counts. */ __STD_TYPE __RLIM_T_TYPE __rlim_t; /* Type for resource measurement. */ __STD_TYPE __RLIM64_T_TYPE __rlim64_t; /* Type for resource measurement (LFS). */ __STD_TYPE __ID_T_TYPE __id_t; /* General type for IDs. */ __STD_TYPE __TIME_T_TYPE __time_t; /* Seconds since the Epoch. */ __STD_TYPE __USECONDS_T_TYPE __useconds_t; /* Count of microseconds. */ __STD_TYPE __SUSECONDS_T_TYPE __suseconds_t; /* Signed count of microseconds. */ __STD_TYPE __DADDR_T_TYPE __daddr_t; /* The type of a disk address. */ __STD_TYPE __KEY_T_TYPE __key_t; /* Type of an IPC key. */ /* Clock ID used in clock and timer functions. */ __STD_TYPE __CLOCKID_T_TYPE __clockid_t; /* Timer ID returned by `timer_create'. */ __STD_TYPE __TIMER_T_TYPE __timer_t; /* Type to represent block size. */ __STD_TYPE __BLKSIZE_T_TYPE __blksize_t; /* Types from the Large File Support interface. */ /* Type to count number of disk blocks. */ __STD_TYPE __BLKCNT_T_TYPE __blkcnt_t; __STD_TYPE __BLKCNT64_T_TYPE __blkcnt64_t; /* Type to count file system blocks. */ __STD_TYPE __FSBLKCNT_T_TYPE __fsblkcnt_t; __STD_TYPE __FSBLKCNT64_T_TYPE __fsblkcnt64_t; /* Type to count file system nodes. */ __STD_TYPE __FSFILCNT_T_TYPE __fsfilcnt_t; __STD_TYPE __FSFILCNT64_T_TYPE __fsfilcnt64_t; /* Type of miscellaneous file system fields. */ __STD_TYPE __FSWORD_T_TYPE __fsword_t; __STD_TYPE __SSIZE_T_TYPE __ssize_t; /* Type of a byte count, or error. */ /* Signed long type used in system calls. */ __STD_TYPE __SYSCALL_SLONG_TYPE __syscall_slong_t; /* Unsigned long type used in system calls. */ __STD_TYPE __SYSCALL_ULONG_TYPE __syscall_ulong_t; /* These few don't really vary by system, they always correspond to one of the other defined types. */ typedef __off64_t __loff_t; /* Type of file sizes and offsets (LFS). */ typedef __quad_t *__qaddr_t; typedef char *__caddr_t; /* Duplicates info from stdint.h but this is used in unistd.h. */ __STD_TYPE __SWORD_TYPE __intptr_t; /* Duplicate info from sys/socket.h. */ __STD_TYPE __U32_TYPE __socklen_t; #undef __STD_TYPE #endif /* bits/types.h */ # 204 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/types.h" 3 # 36 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 2 3 # define __need_FILE # define __need___FILE #endif /* Don't need FILE. */ # 39 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #if !defined __FILE_defined && defined __need_FILE /* Define outside of namespace so the C++ is happy. */ struct _IO_FILE; __BEGIN_NAMESPACE_STD /* The opaque type of streams. This is the definition used elsewhere. */ typedef struct _IO_FILE FILE; __END_NAMESPACE_STD #if defined __USE_LARGEFILE64 || defined __USE_SVID || defined __USE_POSIX \ || defined __USE_BSD || defined __USE_ISOC99 || defined __USE_XOPEN \ || defined __USE_POSIX2 __USING_NAMESPACE_STD(FILE) #endif # 55 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # define __FILE_defined 1 #endif /* FILE not defined. */ # 58 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #undef __need_FILE #if !defined ____FILE_defined && defined __need___FILE /* The opaque type of streams. This is the definition used elsewhere. */ typedef struct _IO_FILE __FILE; # define ____FILE_defined 1 #endif /* __FILE not defined. */ # 68 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #undef __need___FILE #ifdef _STDIO_H #define _STDIO_USES_IOSTREAM #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 74 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 1 3 /* Copyright (C) 1991-1995,1997-2007,2009,2011,2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Per Bothner . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . As a special exception, if you link the code in this file with files compiled with a GNU compiler to produce an executable, that does not cause the resulting executable to be covered by the GNU Lesser General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU Lesser General Public License. This exception applies to code released by its copyright holders in files containing the exception. */ #ifndef _IO_STDIO_H #define _IO_STDIO_H #if 0 /* expanded by -frewrite-includes */ #include <_G_config.h> #endif /* expanded by -frewrite-includes */ # 32 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/_G_config.h" 1 3 /* This file is needed by libio to define various configuration parameters. These are always the same in the GNU C library. */ #ifndef _G_config_h #define _G_config_h 1 /* Define types for libio in terms of the standard internal type names. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 9 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/_G_config.h" 3 # 10 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/_G_config.h" 3 #define __need_size_t #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T # define __need_wchar_t #endif # 14 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/_G_config.h" 3 #define __need_NULL #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 15 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/_G_config.h" 3 # 1 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 1 3 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) /* Always define miscellaneous pieces when modules are available. */ #if !__has_feature(modules) #define __STDDEF_H #endif # 37 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 44 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_ptrdiff_t) #if !defined(_PTRDIFF_T) || __has_feature(modules) /* Always define ptrdiff_t when modules are available. */ #if !__has_feature(modules) #define _PTRDIFF_T #endif # 51 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 53 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 55 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_size_t) #if !defined(_SIZE_T) || __has_feature(modules) /* Always define size_t when modules are available. */ #if !__has_feature(modules) #define _SIZE_T #endif # 62 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ size_t; #endif # 64 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_size_t #endif /*defined(__need_size_t) */ # 66 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) /* Always define rsize_t when modules are available. */ #if !__has_feature(modules) #define _RSIZE_T #endif # 76 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ rsize_t; #endif # 78 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif /* defined(__need_STDDEF_H_misc) */ # 79 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_wchar_t) #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if !defined(_WCHAR_T) || __has_feature(modules) #if !__has_feature(modules) #define _WCHAR_T #if defined(_MSC_EXTENSIONS) #define _WCHAR_T_DEFINED #endif # 89 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 90 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WCHAR_TYPE__ wchar_t; #endif # 92 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 93 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 95 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_NULL) #undef NULL #ifdef __cplusplus # if !defined(__MINGW32__) && !defined(_MSC_VER) # define NULL __null # else # 102 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL 0 # endif # 104 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #else # 105 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL ((void*)0) #endif # 107 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #ifdef __cplusplus #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 112 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 113 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_NULL #endif /* defined(__need_NULL) */ # 115 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 118 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 119 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 120 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 123 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if defined(__need_wint_t) /* Always define wint_t when modules are available. */ #if !defined(_WINT_T) || __has_feature(modules) #if !__has_feature(modules) #define _WINT_T #endif # 132 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WINT_TYPE__ wint_t; #endif # 134 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wint_t #endif /* __need_wint_t */ # 136 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 138 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 16 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/_G_config.h" 2 3 #define __need_mbstate_t #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T # define __need_wint_t #endif # 20 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/_G_config.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 20 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/_G_config.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 1 3 /* Copyright (C) 1995-2008, 2009, 2010, 2011, 2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.24 * Extended multibyte and wide character utilities */ #ifndef _WCHAR_H #if !defined __need_mbstate_t && !defined __need_wint_t # define _WCHAR_H 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #endif # 29 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #ifdef _WCHAR_H /* Get FILE definition. */ # define __need___FILE # if defined __USE_UNIX98 || defined __USE_XOPEN2K # define __need_FILE # endif # 36 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 36 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 # 37 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 /* Get va_list definition. */ # define __need___va_list #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 39 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 # 40 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 41 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 # 42 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 /* Get size_t, wchar_t, wint_t and NULL from . */ # define __need_size_t # define __need_wchar_t # define __need_NULL #endif # 48 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #if defined _WCHAR_H || defined __need_wint_t || !defined __WINT_TYPE__ # undef __need_wint_t # define __need_wint_t #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 51 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 # 52 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 /* We try to get wint_t from , but not all GCC versions define it there. So define it ourselves if it remains undefined. */ # ifndef _WINT_T /* Integral type unchanged by default argument promotions that can hold any value corresponding to members of the extended character set, as well as at least one value that does not correspond to any member of the extended character set. */ # define _WINT_T typedef unsigned int wint_t; # else # 63 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 /* Work around problems with the file which doesn't put wint_t in the std namespace. */ # if defined __cplusplus && defined _GLIBCPP_USE_NAMESPACES \ && defined __WINT_TYPE__ __BEGIN_NAMESPACE_STD typedef __WINT_TYPE__ wint_t; __END_NAMESPACE_STD # endif # 71 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 # endif # 72 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 /* Tell the caller that we provide correct C++ prototypes. */ # if defined __cplusplus && __GNUC_PREREQ (4, 4) # define __CORRECT_ISO_CPP_WCHAR_H_PROTO # endif # 77 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #endif # 78 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #if (defined _WCHAR_H || defined __need_mbstate_t) && !defined ____mbstate_t_defined # define ____mbstate_t_defined 1 /* Conversion state information. */ typedef struct { int __count; union { # ifdef __WINT_TYPE__ __WINT_TYPE__ __wch; # else # 90 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 wint_t __wch; # endif # 92 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 char __wchb[4]; } __value; /* Value so far. */ } __mbstate_t; #endif # 96 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #undef __need_mbstate_t /* The rest of the file is only used if used if __need_mbstate_t is not defined. */ #ifdef _WCHAR_H # ifndef __mbstate_t_defined __BEGIN_NAMESPACE_C99 /* Public type. */ typedef __mbstate_t mbstate_t; __END_NAMESPACE_C99 # define __mbstate_t_defined 1 # endif # 110 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #ifdef __USE_GNU __USING_NAMESPACE_C99(mbstate_t) #endif # 114 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #ifndef WCHAR_MIN /* These constants might also be defined in . */ # define WCHAR_MIN __WCHAR_MIN # define WCHAR_MAX __WCHAR_MAX #endif # 120 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #ifndef WEOF # define WEOF (0xffffffffu) #endif # 124 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 /* For XPG4 compliance we have to define the stuff from here as well. */ #if defined __USE_XOPEN && !defined __USE_UNIX98 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 128 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 # 129 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #endif # 130 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 __BEGIN_DECLS __BEGIN_NAMESPACE_STD /* This incomplete type is defined in but needed here because of `wcsftime'. */ struct tm; __END_NAMESPACE_STD /* XXX We have to clean this up at some point. Since tm is in the std namespace but wcsftime is in __c99 the type wouldn't be found without inserting it in the global namespace. */ __USING_NAMESPACE_STD(tm) __BEGIN_NAMESPACE_STD /* Copy SRC to DEST. */ extern wchar_t *wcscpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src) __THROW; /* Copy no more than N wide-characters of SRC to DEST. */ extern wchar_t *wcsncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) __THROW; /* Append SRC onto DEST. */ extern wchar_t *wcscat (wchar_t *__restrict __dest, const wchar_t *__restrict __src) __THROW; /* Append no more than N wide-characters of SRC onto DEST. */ extern wchar_t *wcsncat (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) __THROW; /* Compare S1 and S2. */ extern int wcscmp (const wchar_t *__s1, const wchar_t *__s2) __THROW __attribute_pure__; /* Compare N wide-characters of S1 and S2. */ extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) __THROW __attribute_pure__; __END_NAMESPACE_STD #ifdef __USE_XOPEN2K8 /* Compare S1 and S2, ignoring case. */ extern int wcscasecmp (const wchar_t *__s1, const wchar_t *__s2) __THROW; /* Compare no more than N chars of S1 and S2, ignoring case. */ extern int wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) __THROW; /* Similar to the two functions above but take the information from the provided locale and not the global locale. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 180 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 # 181 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 extern int wcscasecmp_l (const wchar_t *__s1, const wchar_t *__s2, __locale_t __loc) __THROW; extern int wcsncasecmp_l (const wchar_t *__s1, const wchar_t *__s2, size_t __n, __locale_t __loc) __THROW; #endif # 188 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 __BEGIN_NAMESPACE_STD /* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE category of the current locale. */ extern int wcscoll (const wchar_t *__s1, const wchar_t *__s2) __THROW; /* Transform S2 into array pointed to by S1 such that if wcscmp is applied to two transformed strings the result is the as applying `wcscoll' to the original strings. */ extern size_t wcsxfrm (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) __THROW; __END_NAMESPACE_STD #ifdef __USE_XOPEN2K8 /* Similar to the two functions above but take the information from the provided locale and not the global locale. */ /* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE category of the given locale. */ extern int wcscoll_l (const wchar_t *__s1, const wchar_t *__s2, __locale_t __loc) __THROW; /* Transform S2 into array pointed to by S1 such that if wcscmp is applied to two transformed strings the result is the as applying `wcscoll' to the original strings. */ extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2, size_t __n, __locale_t __loc) __THROW; /* Duplicate S, returning an identical malloc'd string. */ extern wchar_t *wcsdup (const wchar_t *__s) __THROW __attribute_malloc__; #endif # 218 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 __BEGIN_NAMESPACE_STD /* Find the first occurrence of WC in WCS. */ #ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO extern "C++" wchar_t *wcschr (wchar_t *__wcs, wchar_t __wc) __THROW __asm ("wcschr") __attribute_pure__; extern "C++" const wchar_t *wcschr (const wchar_t *__wcs, wchar_t __wc) __THROW __asm ("wcschr") __attribute_pure__; #else # 227 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 extern wchar_t *wcschr (const wchar_t *__wcs, wchar_t __wc) __THROW __attribute_pure__; #endif # 230 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 /* Find the last occurrence of WC in WCS. */ #ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO extern "C++" wchar_t *wcsrchr (wchar_t *__wcs, wchar_t __wc) __THROW __asm ("wcsrchr") __attribute_pure__; extern "C++" const wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc) __THROW __asm ("wcsrchr") __attribute_pure__; #else # 237 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 extern wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc) __THROW __attribute_pure__; #endif # 240 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 __END_NAMESPACE_STD #ifdef __USE_GNU /* This function is similar to `wcschr'. But it returns a pointer to the closing NUL wide character in case C is not found in S. */ extern wchar_t *wcschrnul (const wchar_t *__s, wchar_t __wc) __THROW __attribute_pure__; #endif # 248 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 __BEGIN_NAMESPACE_STD /* Return the length of the initial segmet of WCS which consists entirely of wide characters not in REJECT. */ extern size_t wcscspn (const wchar_t *__wcs, const wchar_t *__reject) __THROW __attribute_pure__; /* Return the length of the initial segmet of WCS which consists entirely of wide characters in ACCEPT. */ extern size_t wcsspn (const wchar_t *__wcs, const wchar_t *__accept) __THROW __attribute_pure__; /* Find the first occurrence in WCS of any character in ACCEPT. */ #ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO extern "C++" wchar_t *wcspbrk (wchar_t *__wcs, const wchar_t *__accept) __THROW __asm ("wcspbrk") __attribute_pure__; extern "C++" const wchar_t *wcspbrk (const wchar_t *__wcs, const wchar_t *__accept) __THROW __asm ("wcspbrk") __attribute_pure__; #else # 266 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 extern wchar_t *wcspbrk (const wchar_t *__wcs, const wchar_t *__accept) __THROW __attribute_pure__; #endif # 269 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 /* Find the first occurrence of NEEDLE in HAYSTACK. */ #ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO extern "C++" wchar_t *wcsstr (wchar_t *__haystack, const wchar_t *__needle) __THROW __asm ("wcsstr") __attribute_pure__; extern "C++" const wchar_t *wcsstr (const wchar_t *__haystack, const wchar_t *__needle) __THROW __asm ("wcsstr") __attribute_pure__; #else # 277 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 extern wchar_t *wcsstr (const wchar_t *__haystack, const wchar_t *__needle) __THROW __attribute_pure__; #endif # 280 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 /* Divide WCS into tokens separated by characters in DELIM. */ extern wchar_t *wcstok (wchar_t *__restrict __s, const wchar_t *__restrict __delim, wchar_t **__restrict __ptr) __THROW; /* Return the number of wide characters in S. */ extern size_t wcslen (const wchar_t *__s) __THROW __attribute_pure__; __END_NAMESPACE_STD #ifdef __USE_XOPEN /* Another name for `wcsstr' from XPG4. */ # ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO extern "C++" wchar_t *wcswcs (wchar_t *__haystack, const wchar_t *__needle) __THROW __asm ("wcswcs") __attribute_pure__; extern "C++" const wchar_t *wcswcs (const wchar_t *__haystack, const wchar_t *__needle) __THROW __asm ("wcswcs") __attribute_pure__; # else # 299 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 extern wchar_t *wcswcs (const wchar_t *__haystack, const wchar_t *__needle) __THROW __attribute_pure__; # endif # 302 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #endif # 303 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #ifdef __USE_XOPEN2K8 /* Return the number of wide characters in S, but at most MAXLEN. */ extern size_t wcsnlen (const wchar_t *__s, size_t __maxlen) __THROW __attribute_pure__; #endif # 309 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 __BEGIN_NAMESPACE_STD /* Search N wide characters of S for C. */ #ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO extern "C++" wchar_t *wmemchr (wchar_t *__s, wchar_t __c, size_t __n) __THROW __asm ("wmemchr") __attribute_pure__; extern "C++" const wchar_t *wmemchr (const wchar_t *__s, wchar_t __c, size_t __n) __THROW __asm ("wmemchr") __attribute_pure__; #else # 320 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 extern wchar_t *wmemchr (const wchar_t *__s, wchar_t __c, size_t __n) __THROW __attribute_pure__; #endif # 323 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 /* Compare N wide characters of S1 and S2. */ extern int wmemcmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) __THROW __attribute_pure__; /* Copy N wide characters of SRC to DEST. */ extern wchar_t *wmemcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) __THROW; /* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for overlapping strings. */ extern wchar_t *wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n) __THROW; /* Set N wide characters of S to C. */ extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW; __END_NAMESPACE_STD #ifdef __USE_GNU /* Copy N wide characters of SRC to DEST and return pointer to following wide character. */ extern wchar_t *wmempcpy (wchar_t *__restrict __s1, const wchar_t *__restrict __s2, size_t __n) __THROW; #endif # 348 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 __BEGIN_NAMESPACE_STD /* Determine whether C constitutes a valid (one-byte) multibyte character. */ extern wint_t btowc (int __c) __THROW; /* Determine whether C corresponds to a member of the extended character set whose multibyte representation is a single byte. */ extern int wctob (wint_t __c) __THROW; /* Determine whether PS points to an object representing the initial state. */ extern int mbsinit (const mbstate_t *__ps) __THROW __attribute_pure__; /* Write wide character representation of multibyte character pointed to by S to PWC. */ extern size_t mbrtowc (wchar_t *__restrict __pwc, const char *__restrict __s, size_t __n, mbstate_t *__restrict __p) __THROW; /* Write multibyte representation of wide character WC to S. */ extern size_t wcrtomb (char *__restrict __s, wchar_t __wc, mbstate_t *__restrict __ps) __THROW; /* Return number of bytes in multibyte character pointed to by S. */ extern size_t __mbrlen (const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) __THROW; extern size_t mbrlen (const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps) __THROW; __END_NAMESPACE_STD #ifdef __USE_EXTERN_INLINES /* Define inline function as optimization. */ /* Added for bug fix */ #ifndef __cplusplus /* We can use the BTOWC and WCTOB optimizations since we know that all locales must use ASCII encoding for the values in the ASCII range and because the wchar_t encoding is always ISO 10646. */ extern wint_t __btowc_alias (int __c) __asm ("btowc"); __extern_inline wint_t __NTH (btowc (int __c)) { return (__builtin_constant_p (__c) && __c >= '\0' && __c <= '\x7f' ? (wint_t) __c : __btowc_alias (__c)); } extern int __wctob_alias (wint_t __c) __asm ("wctob"); __extern_inline int __NTH (wctob (wint_t __wc)) { return (__builtin_constant_p (__wc) && __wc >= L'\0' && __wc <= L'\x7f' ? (int) __wc : __wctob_alias (__wc)); } #endif # 401 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 __extern_inline size_t __NTH (mbrlen (const char *__restrict __s, size_t __n, mbstate_t *__restrict __ps)) { return (__ps != NULL ? mbrtowc (NULL, __s, __n, __ps) : __mbrlen (__s, __n, NULL)); } #endif # 407 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 __BEGIN_NAMESPACE_STD /* Write wide character representation of multibyte character string SRC to DST. */ extern size_t mbsrtowcs (wchar_t *__restrict __dst, const char **__restrict __src, size_t __len, mbstate_t *__restrict __ps) __THROW; /* Write multibyte character representation of wide character string SRC to DST. */ extern size_t wcsrtombs (char *__restrict __dst, const wchar_t **__restrict __src, size_t __len, mbstate_t *__restrict __ps) __THROW; __END_NAMESPACE_STD #ifdef __USE_XOPEN2K8 /* Write wide character representation of at most NMC bytes of the multibyte character string SRC to DST. */ extern size_t mbsnrtowcs (wchar_t *__restrict __dst, const char **__restrict __src, size_t __nmc, size_t __len, mbstate_t *__restrict __ps) __THROW; /* Write multibyte character representation of at most NWC characters from the wide character string SRC to DST. */ extern size_t wcsnrtombs (char *__restrict __dst, const wchar_t **__restrict __src, size_t __nwc, size_t __len, mbstate_t *__restrict __ps) __THROW; #endif /* use POSIX 2008 */ # 437 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 /* The following functions are extensions found in X/Open CAE. */ #ifdef __USE_XOPEN /* Determine number of column positions required for C. */ extern int wcwidth (wchar_t __c) __THROW; /* Determine number of column positions required for first N wide characters (or fewer if S ends before this) in S. */ extern int wcswidth (const wchar_t *__s, size_t __n) __THROW; #endif /* Use X/Open. */ # 448 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 __BEGIN_NAMESPACE_STD /* Convert initial portion of the wide string NPTR to `double' representation. */ extern double wcstod (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; __END_NAMESPACE_STD #ifdef __USE_ISOC99 __BEGIN_NAMESPACE_C99 /* Likewise for `float' and `long double' sizes of floating-point numbers. */ extern float wcstof (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; extern long double wcstold (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr) __THROW; __END_NAMESPACE_C99 #endif /* C99 */ # 466 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 __BEGIN_NAMESPACE_STD /* Convert initial portion of wide string NPTR to `long int' representation. */ extern long int wcstol (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; /* Convert initial portion of wide string NPTR to `unsigned long int' representation. */ extern unsigned long int wcstoul (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; __END_NAMESPACE_STD #if defined __USE_ISOC99 || (defined __GNUC__ && defined __USE_GNU) __BEGIN_NAMESPACE_C99 /* Convert initial portion of wide string NPTR to `long long int' representation. */ __extension__ extern long long int wcstoll (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; /* Convert initial portion of wide string NPTR to `unsigned long long int' representation. */ __extension__ extern unsigned long long int wcstoull (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; __END_NAMESPACE_C99 #endif /* ISO C99 or GCC and GNU. */ # 498 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #if defined __GNUC__ && defined __USE_GNU /* Convert initial portion of wide string NPTR to `long long int' representation. */ __extension__ extern long long int wcstoq (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; /* Convert initial portion of wide string NPTR to `unsigned long long int' representation. */ __extension__ extern unsigned long long int wcstouq (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base) __THROW; #endif /* GCC and use GNU. */ # 514 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #ifdef __USE_GNU /* The concept of one static locale per category is not very well thought out. Many applications will need to process its data using information from several different locales. Another application is the implementation of the internationalization handling in the upcoming ISO C++ standard library. To support this another set of the functions using locale data exist which have an additional argument. Attention: all these functions are *not* standardized in any form. This is a proof-of-concept implementation. */ /* Structure for reentrant locale using functions. This is an (almost) opaque type for the user level programs. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 529 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 # 530 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 /* Special versions of the functions above which take the locale to use as an additional parameter. */ extern long int wcstol_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) __THROW; extern unsigned long int wcstoul_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) __THROW; __extension__ extern long long int wcstoll_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) __THROW; __extension__ extern unsigned long long int wcstoull_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, int __base, __locale_t __loc) __THROW; extern double wcstod_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, __locale_t __loc) __THROW; extern float wcstof_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, __locale_t __loc) __THROW; extern long double wcstold_l (const wchar_t *__restrict __nptr, wchar_t **__restrict __endptr, __locale_t __loc) __THROW; #endif /* use GNU */ # 564 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #ifdef __USE_XOPEN2K8 /* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */ extern wchar_t *wcpcpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src) __THROW; /* Copy no more than N characters of SRC to DEST, returning the address of the last character written into DEST. */ extern wchar_t *wcpncpy (wchar_t *__restrict __dest, const wchar_t *__restrict __src, size_t __n) __THROW; /* Wide character I/O functions. */ /* Like OPEN_MEMSTREAM, but the stream is wide oriented and produces a wide character string. */ extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) __THROW; #endif # 585 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #if defined __USE_ISOC95 || defined __USE_UNIX98 __BEGIN_NAMESPACE_STD /* Select orientation for stream. */ extern int fwide (__FILE *__fp, int __mode) __THROW; /* Write formatted output to STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fwprintf (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...) /* __attribute__ ((__format__ (__wprintf__, 2, 3))) */; /* Write formatted output to stdout. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int wprintf (const wchar_t *__restrict __format, ...) /* __attribute__ ((__format__ (__wprintf__, 1, 2))) */; /* Write formatted output of at most N characters to S. */ extern int swprintf (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __format, ...) __THROW /* __attribute__ ((__format__ (__wprintf__, 3, 4))) */; /* Write formatted output to S from argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vfwprintf (__FILE *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) /* __attribute__ ((__format__ (__wprintf__, 2, 0))) */; /* Write formatted output to stdout from argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vwprintf (const wchar_t *__restrict __format, __gnuc_va_list __arg) /* __attribute__ ((__format__ (__wprintf__, 1, 0))) */; /* Write formatted output of at most N character to S from argument list ARG. */ extern int vswprintf (wchar_t *__restrict __s, size_t __n, const wchar_t *__restrict __format, __gnuc_va_list __arg) __THROW /* __attribute__ ((__format__ (__wprintf__, 3, 0))) */; /* Read formatted input from STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fwscanf (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...) /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; /* Read formatted input from stdin. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int wscanf (const wchar_t *__restrict __format, ...) /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */; /* Read formatted input from S. */ extern int swscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, ...) __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; # if defined __USE_ISOC99 && !defined __USE_GNU \ && (!defined __LDBL_COMPAT || !defined __REDIRECT) \ && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) # ifdef __REDIRECT /* For strict ISO C99 or POSIX compliance disallow %as, %aS and %a[ GNU extension which conflicts with valid %a followed by letter s, S or [. */ extern int __REDIRECT (fwscanf, (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...), __isoc99_fwscanf) /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; extern int __REDIRECT (wscanf, (const wchar_t *__restrict __format, ...), __isoc99_wscanf) /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */; extern int __REDIRECT_NTH (swscanf, (const wchar_t *__restrict __s, const wchar_t *__restrict __format, ...), __isoc99_swscanf) /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */; # else # 671 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 extern int __isoc99_fwscanf (__FILE *__restrict __stream, const wchar_t *__restrict __format, ...); extern int __isoc99_wscanf (const wchar_t *__restrict __format, ...); extern int __isoc99_swscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, ...) __THROW; # define fwscanf __isoc99_fwscanf # define wscanf __isoc99_wscanf # define swscanf __isoc99_swscanf # endif # 681 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 # endif # 682 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 __END_NAMESPACE_STD #endif /* Use ISO C95, C99 and Unix98. */ # 685 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #ifdef __USE_ISOC99 __BEGIN_NAMESPACE_C99 /* Read formatted input from S into argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vfwscanf (__FILE *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; /* Read formatted input from stdin into argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vwscanf (const wchar_t *__restrict __format, __gnuc_va_list __arg) /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */; /* Read formatted input from S into argument list ARG. */ extern int vswscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; # if !defined __USE_GNU \ && (!defined __LDBL_COMPAT || !defined __REDIRECT) \ && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) # ifdef __REDIRECT extern int __REDIRECT (vfwscanf, (__FILE *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg), __isoc99_vfwscanf) /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; extern int __REDIRECT (vwscanf, (const wchar_t *__restrict __format, __gnuc_va_list __arg), __isoc99_vwscanf) /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */; extern int __REDIRECT_NTH (vswscanf, (const wchar_t *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg), __isoc99_vswscanf) /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */; # else # 725 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 extern int __isoc99_vfwscanf (__FILE *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg); extern int __isoc99_vwscanf (const wchar_t *__restrict __format, __gnuc_va_list __arg); extern int __isoc99_vswscanf (const wchar_t *__restrict __s, const wchar_t *__restrict __format, __gnuc_va_list __arg) __THROW; # define vfwscanf __isoc99_vfwscanf # define vwscanf __isoc99_vwscanf # define vswscanf __isoc99_vswscanf # endif # 737 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 # endif # 738 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 __END_NAMESPACE_C99 #endif /* Use ISO C99. */ # 741 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 __BEGIN_NAMESPACE_STD /* Read a character from STREAM. These functions are possible cancellation points and therefore not marked with __THROW. */ extern wint_t fgetwc (__FILE *__stream); extern wint_t getwc (__FILE *__stream); /* Read a character from stdin. This function is a possible cancellation point and therefore not marked with __THROW. */ extern wint_t getwchar (void); /* Write a character to STREAM. These functions are possible cancellation points and therefore not marked with __THROW. */ extern wint_t fputwc (wchar_t __wc, __FILE *__stream); extern wint_t putwc (wchar_t __wc, __FILE *__stream); /* Write a character to stdout. This function is a possible cancellation point and therefore not marked with __THROW. */ extern wint_t putwchar (wchar_t __wc); /* Get a newline-terminated wide character string of finite length from STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern wchar_t *fgetws (wchar_t *__restrict __ws, int __n, __FILE *__restrict __stream); /* Write a string to STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fputws (const wchar_t *__restrict __ws, __FILE *__restrict __stream); /* Push a character back onto the input buffer of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern wint_t ungetwc (wint_t __wc, __FILE *__stream); __END_NAMESPACE_STD #ifdef __USE_GNU /* These are defined to be equivalent to the `char' functions defined in POSIX.1:1996. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern wint_t getwc_unlocked (__FILE *__stream); extern wint_t getwchar_unlocked (void); /* This is the wide character version of a GNU extension. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern wint_t fgetwc_unlocked (__FILE *__stream); /* Faster version when locking is not necessary. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern wint_t fputwc_unlocked (wchar_t __wc, __FILE *__stream); /* These are defined to be equivalent to the `char' functions defined in POSIX.1:1996. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern wint_t putwc_unlocked (wchar_t __wc, __FILE *__stream); extern wint_t putwchar_unlocked (wchar_t __wc); /* This function does the same as `fgetws' but does not lock the stream. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern wchar_t *fgetws_unlocked (wchar_t *__restrict __ws, int __n, __FILE *__restrict __stream); /* This function does the same as `fputws' but does not lock the stream. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fputws_unlocked (const wchar_t *__restrict __ws, __FILE *__restrict __stream); #endif # 852 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 __BEGIN_NAMESPACE_C99 /* Format TP into S according to FORMAT. Write no more than MAXSIZE wide characters and return the number of wide characters written, or 0 if it would exceed MAXSIZE. */ extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize, const wchar_t *__restrict __format, const struct tm *__restrict __tp) __THROW; __END_NAMESPACE_C99 # ifdef __USE_GNU #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 864 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 # 865 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 /* Similar to `wcsftime' but takes the information from the provided locale and not the global locale. */ extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, const wchar_t *__restrict __format, const struct tm *__restrict __tp, __locale_t __loc) __THROW; # endif # 873 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 /* The X/Open standard demands that most of the functions defined in the header must also appear here. This is probably because some X/Open members wrote their implementation before the ISO C standard was published and introduced the better solution. We have to provide these definitions for compliance reasons but we do this nonsense only if really necessary. */ #if defined __USE_UNIX98 && !defined __USE_GNU # define __need_iswxxx #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 882 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 # 883 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #endif # 884 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 /* Define some macros helping to catch buffer overflows. */ #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 887 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 # 888 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #endif # 889 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #ifdef __LDBL_COMPAT #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 891 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 # 892 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #endif # 893 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 __END_DECLS #endif /* _WCHAR_H defined */ # 897 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 #endif /* wchar.h */ # 899 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/wchar.h" 3 /* Undefine all __need_* constants in case we are included to get those constants but the whole file was already read. */ #undef __need_mbstate_t #undef __need_wint_t # 21 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/_G_config.h" 2 3 typedef struct { __off_t __pos; __mbstate_t __state; } _G_fpos_t; typedef struct { __off64_t __pos; __mbstate_t __state; } _G_fpos64_t; #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 32 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/_G_config.h" 3 # 33 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/_G_config.h" 3 typedef union { struct __gconv_info __cd; struct { struct __gconv_info __cd; struct __gconv_step_data __data; } __combined; } _G_iconv_t; #endif # 43 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/_G_config.h" 3 /* These library features are always available in the GNU C library. */ #define _G_va_list __gnuc_va_list #define _G_HAVE_MMAP 1 #define _G_HAVE_MREMAP 1 #define _G_IO_IO_FILE_VERSION 0x20001 /* This is defined by if `st_blksize' exists. */ #define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE) #define _G_BUFSIZ 8192 #endif /* _G_config.h */ # 59 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/_G_config.h" 3 # 33 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 2 3 /* ALL of these should be defined in _G_config.h */ #define _IO_fpos_t _G_fpos_t #define _IO_fpos64_t _G_fpos64_t #define _IO_size_t size_t #define _IO_ssize_t __ssize_t #define _IO_off_t __off_t #define _IO_off64_t __off64_t #define _IO_pid_t __pid_t #define _IO_uid_t __uid_t #define _IO_iconv_t _G_iconv_t #define _IO_HAVE_ST_BLKSIZE _G_HAVE_ST_BLKSIZE #define _IO_BUFSIZ _G_BUFSIZ #define _IO_va_list _G_va_list #define _IO_wint_t wint_t /* This define avoids name pollution if we're using GNU stdarg.h */ #define __need___va_list #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 50 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 # 1 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stdarg.h" 1 3 /*===---- stdarg.h - Variable argument handling ----------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #ifndef __STDARG_H #define __STDARG_H #ifndef _VA_LIST typedef __builtin_va_list va_list; #define _VA_LIST #endif # 33 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stdarg.h" 3 #define va_start(ap, param) __builtin_va_start(ap, param) #define va_end(ap) __builtin_va_end(ap) #define va_arg(ap, type) __builtin_va_arg(ap, type) /* GCC always defines __va_copy, but does not define va_copy unless in c99 mode * or -ansi is not specified, since it was not part of C90. */ #define __va_copy(d,s) __builtin_va_copy(d,s) #if __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L || !defined(__STRICT_ANSI__) #define va_copy(dest, src) __builtin_va_copy(dest, src) #endif # 45 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stdarg.h" 3 /* Hack required to make standard headers work, at least on Ubuntu */ #ifndef __GNUC_VA_LIST #define __GNUC_VA_LIST 1 #endif # 50 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stdarg.h" 3 typedef __builtin_va_list __gnuc_va_list; #endif /* __STDARG_H */ # 53 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stdarg.h" 3 # 51 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 2 3 #ifdef __GNUC_VA_LIST # undef _IO_va_list # define _IO_va_list __gnuc_va_list #endif /* __GNUC_VA_LIST */ # 55 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 #ifndef __P #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 57 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 # 58 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 #endif /*!__P*/ # 59 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 #define _IO_UNIFIED_JUMPTABLES 1 #ifndef EOF # define EOF (-1) #endif # 65 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 #ifndef NULL # if defined __GNUG__ && \ (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)) # define NULL (__null) # else # 70 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 # if !defined(__cplusplus) # define NULL ((void*)0) # else # 73 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 # define NULL (0) # endif # 75 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 # endif # 76 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 #endif # 77 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 #define _IOS_INPUT 1 #define _IOS_OUTPUT 2 #define _IOS_ATEND 4 #define _IOS_APPEND 8 #define _IOS_TRUNC 16 #define _IOS_NOCREATE 32 #define _IOS_NOREPLACE 64 #define _IOS_BIN 128 /* Magic numbers and bits for the _flags field. The magic numbers use the high-order bits of _flags; the remaining bits are available for variable flags. Note: The magic numbers must all be negative if stdio emulation is desired. */ #define _IO_MAGIC 0xFBAD0000 /* Magic number */ #define _OLD_STDIO_MAGIC 0xFABC0000 /* Emulate old stdio. */ #define _IO_MAGIC_MASK 0xFFFF0000 #define _IO_USER_BUF 1 /* User owns buffer; don't delete it on close. */ #define _IO_UNBUFFERED 2 #define _IO_NO_READS 4 /* Reading not allowed */ #define _IO_NO_WRITES 8 /* Writing not allowd */ #define _IO_EOF_SEEN 0x10 #define _IO_ERR_SEEN 0x20 #define _IO_DELETE_DONT_CLOSE 0x40 /* Don't call close(_fileno) on cleanup. */ #define _IO_LINKED 0x80 /* Set if linked (using _chain) to streambuf::_list_all.*/ #define _IO_IN_BACKUP 0x100 #define _IO_LINE_BUF 0x200 #define _IO_TIED_PUT_GET 0x400 /* Set if put and get pointer logicly tied. */ #define _IO_CURRENTLY_PUTTING 0x800 #define _IO_IS_APPENDING 0x1000 #define _IO_IS_FILEBUF 0x2000 #define _IO_BAD_SEEN 0x4000 #define _IO_USER_LOCK 0x8000 #define _IO_FLAGS2_MMAP 1 #define _IO_FLAGS2_NOTCANCEL 2 #ifdef _LIBC # define _IO_FLAGS2_FORTIFY 4 #endif # 118 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 #define _IO_FLAGS2_USER_WBUF 8 #ifdef _LIBC # define _IO_FLAGS2_SCANF_STD 16 # define _IO_FLAGS2_NOCLOSE 32 # define _IO_FLAGS2_CLOEXEC 64 #endif # 124 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 /* These are "formatting flags" matching the iostream fmtflags enum values. */ #define _IO_SKIPWS 01 #define _IO_LEFT 02 #define _IO_RIGHT 04 #define _IO_INTERNAL 010 #define _IO_DEC 020 #define _IO_OCT 040 #define _IO_HEX 0100 #define _IO_SHOWBASE 0200 #define _IO_SHOWPOINT 0400 #define _IO_UPPERCASE 01000 #define _IO_SHOWPOS 02000 #define _IO_SCIENTIFIC 04000 #define _IO_FIXED 010000 #define _IO_UNITBUF 020000 #define _IO_STDIO 040000 #define _IO_DONT_CLOSE 0100000 #define _IO_BOOLALPHA 0200000 struct _IO_jump_t; struct _IO_FILE; /* Handle lock. */ #ifdef _IO_MTSAFE_IO # if defined __GLIBC__ && __GLIBC__ >= 2 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 150 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 # 151 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 # else # 152 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 /*# include */ # endif # 154 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 #else # 155 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 typedef void _IO_lock_t; #endif # 157 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 /* A streammarker remembers a position in a buffer. */ struct _IO_marker { struct _IO_marker *_next; struct _IO_FILE *_sbuf; /* If _pos >= 0 it points to _buf->Gbase()+_pos. FIXME comment */ /* if _pos < 0, it points to _buf->eBptr()+_pos. FIXME comment */ int _pos; #if 0 void set_streampos(streampos sp) { _spos = sp; } void set_offset(int offset) { _pos = offset; _spos = (streampos)(-2); } public: streammarker(streambuf *sb); ~streammarker(); int saving() { return _spos == -2; } int delta(streammarker&); int delta(); #endif # 178 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 }; /* This is the structure from the libstdc++ codecvt class. */ enum __codecvt_result { __codecvt_ok, __codecvt_partial, __codecvt_error, __codecvt_noconv }; #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T /* The order of the elements in the following struct must match the order of the virtual functions in the libstdc++ codecvt class. */ struct _IO_codecvt { void (*__codecvt_destr) (struct _IO_codecvt *); enum __codecvt_result (*__codecvt_do_out) (struct _IO_codecvt *, __mbstate_t *, const wchar_t *, const wchar_t *, const wchar_t **, char *, char *, char **); enum __codecvt_result (*__codecvt_do_unshift) (struct _IO_codecvt *, __mbstate_t *, char *, char *, char **); enum __codecvt_result (*__codecvt_do_in) (struct _IO_codecvt *, __mbstate_t *, const char *, const char *, const char **, wchar_t *, wchar_t *, wchar_t **); int (*__codecvt_do_encoding) (struct _IO_codecvt *); int (*__codecvt_do_always_noconv) (struct _IO_codecvt *); int (*__codecvt_do_length) (struct _IO_codecvt *, __mbstate_t *, const char *, const char *, _IO_size_t); int (*__codecvt_do_max_length) (struct _IO_codecvt *); _IO_iconv_t __cd_in; _IO_iconv_t __cd_out; }; /* Extra data for wide character streams. */ struct _IO_wide_data { wchar_t *_IO_read_ptr; /* Current read pointer */ wchar_t *_IO_read_end; /* End of get area. */ wchar_t *_IO_read_base; /* Start of putback+get area. */ wchar_t *_IO_write_base; /* Start of put area. */ wchar_t *_IO_write_ptr; /* Current put pointer. */ wchar_t *_IO_write_end; /* End of put area. */ wchar_t *_IO_buf_base; /* Start of reserve area. */ wchar_t *_IO_buf_end; /* End of reserve area. */ /* The following fields are used to support backing up and undo. */ wchar_t *_IO_save_base; /* Pointer to start of non-current get area. */ wchar_t *_IO_backup_base; /* Pointer to first valid character of backup area */ wchar_t *_IO_save_end; /* Pointer to end of non-current get area. */ __mbstate_t _IO_state; __mbstate_t _IO_last_state; struct _IO_codecvt _codecvt; wchar_t _shortbuf[1]; const struct _IO_jump_t *_wide_vtable; }; #endif # 245 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 struct _IO_FILE { int _flags; /* High-order word is _IO_MAGIC; rest is flags. */ #define _IO_file_flags _flags /* The following pointers correspond to the C++ streambuf protocol. */ /* Note: Tk uses the _IO_read_ptr and _IO_read_end fields directly. */ char* _IO_read_ptr; /* Current read pointer */ char* _IO_read_end; /* End of get area. */ char* _IO_read_base; /* Start of putback+get area. */ char* _IO_write_base; /* Start of put area. */ char* _IO_write_ptr; /* Current put pointer. */ char* _IO_write_end; /* End of put area. */ char* _IO_buf_base; /* Start of reserve area. */ char* _IO_buf_end; /* End of reserve area. */ /* The following fields are used to support backing up and undo. */ char *_IO_save_base; /* Pointer to start of non-current get area. */ char *_IO_backup_base; /* Pointer to first valid character of backup area */ char *_IO_save_end; /* Pointer to end of non-current get area. */ struct _IO_marker *_markers; struct _IO_FILE *_chain; int _fileno; #if 0 int _blksize; #else # 273 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 int _flags2; #endif # 275 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 _IO_off_t _old_offset; /* This used to be _offset but it's too small. */ #define __HAVE_COLUMN /* temporary */ /* 1+column number of pbase(); 0 is unknown. */ unsigned short _cur_column; signed char _vtable_offset; char _shortbuf[1]; /* char* _save_gptr; char* _save_egptr; */ _IO_lock_t *_lock; #ifdef _IO_USE_OLD_IO_FILE }; struct _IO_FILE_complete { struct _IO_FILE _file; #endif # 293 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 #if defined _G_IO_IO_FILE_VERSION && _G_IO_IO_FILE_VERSION == 0x20001 _IO_off64_t _offset; # if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T /* Wide character stream stuff. */ struct _IO_codecvt *_codecvt; struct _IO_wide_data *_wide_data; struct _IO_FILE *_freeres_list; void *_freeres_buf; size_t _freeres_size; # else # 303 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 void *__pad1; void *__pad2; void *__pad3; void *__pad4; size_t __pad5; # endif # 309 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 int _mode; /* Make sure we don't get into trouble again. */ char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)]; #endif # 313 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 }; #ifndef __cplusplus typedef struct _IO_FILE _IO_FILE; #endif # 318 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 struct _IO_FILE_plus; extern struct _IO_FILE_plus _IO_2_1_stdin_; extern struct _IO_FILE_plus _IO_2_1_stdout_; extern struct _IO_FILE_plus _IO_2_1_stderr_; #ifndef _LIBC #define _IO_stdin ((_IO_FILE*)(&_IO_2_1_stdin_)) #define _IO_stdout ((_IO_FILE*)(&_IO_2_1_stdout_)) #define _IO_stderr ((_IO_FILE*)(&_IO_2_1_stderr_)) #else # 329 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 extern _IO_FILE *_IO_stdin attribute_hidden; extern _IO_FILE *_IO_stdout attribute_hidden; extern _IO_FILE *_IO_stderr attribute_hidden; #endif # 333 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 /* Functions to do I/O and file management for a stream. */ /* Read NBYTES bytes from COOKIE into a buffer pointed to by BUF. Return number of bytes read. */ typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes); /* Write N bytes pointed to by BUF to COOKIE. Write all N bytes unless there is an error. Return number of bytes written. If there is an error, return 0 and do not write anything. If the file has been opened for append (__mode.__append set), then set the file pointer to the end of the file and then do the write; if not, just write at the current file pointer. */ typedef __ssize_t __io_write_fn (void *__cookie, const char *__buf, size_t __n); /* Move COOKIE's file position to *POS bytes from the beginning of the file (if W is SEEK_SET), the current position (if W is SEEK_CUR), or the end of the file (if W is SEEK_END). Set *POS to the new file position. Returns zero if successful, nonzero if not. */ typedef int __io_seek_fn (void *__cookie, _IO_off64_t *__pos, int __w); /* Close COOKIE. */ typedef int __io_close_fn (void *__cookie); #ifdef _GNU_SOURCE /* User-visible names for the above. */ typedef __io_read_fn cookie_read_function_t; typedef __io_write_fn cookie_write_function_t; typedef __io_seek_fn cookie_seek_function_t; typedef __io_close_fn cookie_close_function_t; /* The structure with the cookie function pointers. */ typedef struct { __io_read_fn *read; /* Read bytes. */ __io_write_fn *write; /* Write bytes. */ __io_seek_fn *seek; /* Seek/tell file position. */ __io_close_fn *close; /* Close file. */ } _IO_cookie_io_functions_t; typedef _IO_cookie_io_functions_t cookie_io_functions_t; struct _IO_cookie_file; /* Initialize one of those. */ extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write, void *__cookie, _IO_cookie_io_functions_t __fns); #endif # 385 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 #ifdef __cplusplus extern "C" { #endif # 390 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 extern int __underflow (_IO_FILE *); extern int __uflow (_IO_FILE *); extern int __overflow (_IO_FILE *, int); #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T extern _IO_wint_t __wunderflow (_IO_FILE *); extern _IO_wint_t __wuflow (_IO_FILE *); extern _IO_wint_t __woverflow (_IO_FILE *, _IO_wint_t); #endif # 399 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 #if __GNUC__ >= 3 # define _IO_BE(expr, res) __builtin_expect ((expr), res) #else # 403 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 # define _IO_BE(expr, res) (expr) #endif # 405 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 #define _IO_getc_unlocked(_fp) \ (_IO_BE ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end, 0) \ ? __uflow (_fp) : *(unsigned char *) (_fp)->_IO_read_ptr++) #define _IO_peekc_unlocked(_fp) \ (_IO_BE ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end, 0) \ && __underflow (_fp) == EOF ? EOF \ : *(unsigned char *) (_fp)->_IO_read_ptr) #define _IO_putc_unlocked(_ch, _fp) \ (_IO_BE ((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end, 0) \ ? __overflow (_fp, (unsigned char) (_ch)) \ : (unsigned char) (*(_fp)->_IO_write_ptr++ = (_ch))) #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T # define _IO_getwc_unlocked(_fp) \ (_IO_BE ((_fp)->_wide_data == NULL \ || ((_fp)->_wide_data->_IO_read_ptr \ >= (_fp)->_wide_data->_IO_read_end), 0) \ ? __wuflow (_fp) : (_IO_wint_t) *(_fp)->_wide_data->_IO_read_ptr++) # define _IO_putwc_unlocked(_wch, _fp) \ (_IO_BE ((_fp)->_wide_data == NULL \ || ((_fp)->_wide_data->_IO_write_ptr \ >= (_fp)->_wide_data->_IO_write_end), 0) \ ? __woverflow (_fp, _wch) \ : (_IO_wint_t) (*(_fp)->_wide_data->_IO_write_ptr++ = (_wch))) #endif # 431 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 #define _IO_feof_unlocked(__fp) (((__fp)->_flags & _IO_EOF_SEEN) != 0) #define _IO_ferror_unlocked(__fp) (((__fp)->_flags & _IO_ERR_SEEN) != 0) extern int _IO_getc (_IO_FILE *__fp); extern int _IO_putc (int __c, _IO_FILE *__fp); extern int _IO_feof (_IO_FILE *__fp) __THROW; extern int _IO_ferror (_IO_FILE *__fp) __THROW; extern int _IO_peekc_locked (_IO_FILE *__fp); /* This one is for Emacs. */ #define _IO_PENDING_OUTPUT_COUNT(_fp) \ ((_fp)->_IO_write_ptr - (_fp)->_IO_write_base) extern void _IO_flockfile (_IO_FILE *) __THROW; extern void _IO_funlockfile (_IO_FILE *) __THROW; extern int _IO_ftrylockfile (_IO_FILE *) __THROW; #ifdef _IO_MTSAFE_IO # define _IO_peekc(_fp) _IO_peekc_locked (_fp) # define _IO_flockfile(_fp) \ if (((_fp)->_flags & _IO_USER_LOCK) == 0) _IO_flockfile (_fp) # define _IO_funlockfile(_fp) \ if (((_fp)->_flags & _IO_USER_LOCK) == 0) _IO_funlockfile (_fp) #else # 457 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 # define _IO_peekc(_fp) _IO_peekc_unlocked (_fp) # define _IO_flockfile(_fp) /**/ # define _IO_funlockfile(_fp) /**/ # define _IO_ftrylockfile(_fp) /**/ # define _IO_cleanup_region_start(_fct, _fp) /**/ # define _IO_cleanup_region_end(_Doit) /**/ #endif /* !_IO_MTSAFE_IO */ # 464 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict, _IO_va_list, int *__restrict); extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict, _IO_va_list); extern _IO_ssize_t _IO_padn (_IO_FILE *, int, _IO_ssize_t); extern _IO_size_t _IO_sgetn (_IO_FILE *, void *, _IO_size_t); extern _IO_off64_t _IO_seekoff (_IO_FILE *, _IO_off64_t, int, int); extern _IO_off64_t _IO_seekpos (_IO_FILE *, _IO_off64_t, int); extern void _IO_free_backup_area (_IO_FILE *) __THROW; #if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T extern _IO_wint_t _IO_getwc (_IO_FILE *__fp); extern _IO_wint_t _IO_putwc (wchar_t __wc, _IO_FILE *__fp); extern int _IO_fwide (_IO_FILE *__fp, int __mode) __THROW; # if __GNUC__ >= 2 /* While compiling glibc we have to handle compatibility with very old versions. */ # if defined _LIBC && defined SHARED #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 485 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 # 486 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 # if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) # define _IO_fwide_maybe_incompatible \ (__builtin_expect (&_IO_stdin_used == NULL, 0)) extern const int _IO_stdin_used; weak_extern (_IO_stdin_used); # endif # 492 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 # endif # 493 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 # ifndef _IO_fwide_maybe_incompatible # define _IO_fwide_maybe_incompatible (0) # endif # 496 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 /* A special optimized version of the function above. It optimizes the case of initializing an unoriented byte stream. */ # define _IO_fwide(__fp, __mode) \ ({ int __result = (__mode); \ if (__result < 0 && ! _IO_fwide_maybe_incompatible) \ { \ if ((__fp)->_mode == 0) \ /* We know that all we have to do is to set the flag. */ \ (__fp)->_mode = -1; \ __result = (__fp)->_mode; \ } \ else if (__builtin_constant_p (__mode) && (__mode) == 0) \ __result = _IO_fwide_maybe_incompatible ? -1 : (__fp)->_mode; \ else \ __result = _IO_fwide (__fp, __result); \ __result; }) # endif # 513 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 extern int _IO_vfwscanf (_IO_FILE * __restrict, const wchar_t * __restrict, _IO_va_list, int *__restrict); extern int _IO_vfwprintf (_IO_FILE *__restrict, const wchar_t *__restrict, _IO_va_list); extern _IO_ssize_t _IO_wpadn (_IO_FILE *, wint_t, _IO_ssize_t); extern void _IO_free_wbackup_area (_IO_FILE *) __THROW; #endif # 521 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 #ifdef __LDBL_COMPAT #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 523 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 # 524 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 #endif # 525 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 #ifdef __cplusplus } #endif # 529 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 #endif /* _IO_STDIO_H */ # 531 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/libio.h" 3 # 75 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 2 3 #if defined __USE_XOPEN || defined __USE_XOPEN2K8 # ifdef __GNUC__ # ifndef _VA_LIST_DEFINED typedef _G_va_list va_list; # define _VA_LIST_DEFINED # endif # 82 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # else # 83 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 83 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # 84 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # endif # 85 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #endif # 86 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #ifdef __USE_XOPEN2K8 # ifndef __off_t_defined # ifndef __USE_FILE_OFFSET64 typedef __off_t off_t; # else # 92 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 typedef __off64_t off_t; # endif # 94 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # define __off_t_defined # endif # 96 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # if defined __USE_LARGEFILE64 && !defined __off64_t_defined typedef __off64_t off64_t; # define __off64_t_defined # endif # 100 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # ifndef __ssize_t_defined typedef __ssize_t ssize_t; # define __ssize_t_defined # endif # 105 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #endif # 106 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 /* The type of the second argument to `fgetpos' and `fsetpos'. */ __BEGIN_NAMESPACE_STD #ifndef __USE_FILE_OFFSET64 typedef _G_fpos_t fpos_t; #else # 112 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 typedef _G_fpos64_t fpos_t; #endif # 114 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 __END_NAMESPACE_STD #ifdef __USE_LARGEFILE64 typedef _G_fpos64_t fpos64_t; #endif # 118 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 /* The possibilities for the third argument to `setvbuf'. */ #define _IOFBF 0 /* Fully buffered. */ #define _IOLBF 1 /* Line buffered. */ #define _IONBF 2 /* No buffering. */ /* Default buffer size. */ #ifndef BUFSIZ # define BUFSIZ _IO_BUFSIZ #endif # 129 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 /* End of file character. Some things throughout the library rely on this being -1. */ #ifndef EOF # define EOF (-1) #endif # 136 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 /* The possibilities for the third argument to `fseek'. These values should not be changed. */ #define SEEK_SET 0 /* Seek from beginning of file. */ #define SEEK_CUR 1 /* Seek from current position. */ #define SEEK_END 2 /* Seek from end of file. */ #ifdef __USE_GNU # define SEEK_DATA 3 /* Seek to next data. */ # define SEEK_HOLE 4 /* Seek to next hole. */ #endif # 147 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #if defined __USE_SVID || defined __USE_XOPEN /* Default path prefix for `tempnam' and `tmpnam'. */ # define P_tmpdir "/tmp" #endif # 153 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 /* Get the values: L_tmpnam How long an array of chars must be to be passed to `tmpnam'. TMP_MAX The minimum number of unique filenames generated by tmpnam (and tempnam when it uses tmpnam's name space), or tempnam (the two are separate). L_ctermid How long an array to pass to `ctermid'. L_cuserid How long an array to pass to `cuserid'. FOPEN_MAX Minimum number of files that can be open at once. FILENAME_MAX Maximum length of a filename. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 164 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stdio_lim.h" 1 3 /* Copyright (C) 1994, 1997, 1998, 1999, 2009 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if !defined _STDIO_H && !defined __need_FOPEN_MAX && !defined __need_IOV_MAX # error "Never include directly; use instead." #endif # 21 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stdio_lim.h" 3 #ifdef _STDIO_H # define L_tmpnam 20 # define TMP_MAX 238328 # define FILENAME_MAX 4096 # ifdef __USE_POSIX # define L_ctermid 9 # if !defined __USE_XOPEN2K || defined __USE_GNU # define L_cuserid 9 # endif # 32 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stdio_lim.h" 3 # endif # 33 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stdio_lim.h" 3 #endif # 34 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stdio_lim.h" 3 #if defined __need_FOPEN_MAX || defined _STDIO_H # undef FOPEN_MAX # define FOPEN_MAX 16 #endif # 39 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stdio_lim.h" 3 #if defined __need_IOV_MAX && !defined IOV_MAX # define IOV_MAX 1024 #endif # 43 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stdio_lim.h" 3 # 165 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 2 3 /* Standard streams. */ extern struct _IO_FILE *stdin; /* Standard input stream. */ extern struct _IO_FILE *stdout; /* Standard output stream. */ extern struct _IO_FILE *stderr; /* Standard error output stream. */ /* C89/C99 say they're macros. Make them happy. */ #define stdin stdin #define stdout stdout #define stderr stderr __BEGIN_NAMESPACE_STD /* Remove file FILENAME. */ extern int remove (const char *__filename) __THROW; /* Rename file OLD to NEW. */ extern int rename (const char *__old, const char *__new) __THROW; __END_NAMESPACE_STD #ifdef __USE_ATFILE /* Rename file OLD relative to OLDFD to NEW relative to NEWFD. */ extern int renameat (int __oldfd, const char *__old, int __newfd, const char *__new) __THROW; #endif # 188 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 __BEGIN_NAMESPACE_STD /* Create a temporary file and open it read/write. This function is a possible cancellation point and therefore not marked with __THROW. */ #ifndef __USE_FILE_OFFSET64 extern FILE *tmpfile (void) __wur; #else # 197 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # ifdef __REDIRECT extern FILE *__REDIRECT (tmpfile, (void), tmpfile64) __wur; # else # 200 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # define tmpfile tmpfile64 # endif # 202 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #endif # 203 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #ifdef __USE_LARGEFILE64 extern FILE *tmpfile64 (void) __wur; #endif # 207 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 /* Generate a temporary filename. */ extern char *tmpnam (char *__s) __THROW __wur; __END_NAMESPACE_STD #ifdef __USE_MISC /* This is the reentrant variant of `tmpnam'. The only difference is that it does not allow S to be NULL. */ extern char *tmpnam_r (char *__s) __THROW __wur; #endif # 217 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #if defined __USE_SVID || defined __USE_XOPEN /* Generate a unique temporary filename using up to five characters of PFX if it is not NULL. The directory to put this file in is searched for as follows: First the environment variable "TMPDIR" is checked. If it contains the name of a writable directory, that directory is used. If not and if DIR is not NULL, that value is checked. If that fails, P_tmpdir is tried and finally "/tmp". The storage for the filename is allocated by `malloc'. */ extern char *tempnam (const char *__dir, const char *__pfx) __THROW __attribute_malloc__ __wur; #endif # 230 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 __BEGIN_NAMESPACE_STD /* Close STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fclose (FILE *__stream); /* Flush STREAM, or all streams if STREAM is NULL. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fflush (FILE *__stream); __END_NAMESPACE_STD #ifdef __USE_MISC /* Faster versions when locking is not required. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fflush_unlocked (FILE *__stream); #endif # 254 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #ifdef __USE_GNU /* Close all streams. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fcloseall (void); #endif # 264 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 __BEGIN_NAMESPACE_STD #ifndef __USE_FILE_OFFSET64 /* Open a file and create a new stream for it. This function is a possible cancellation point and therefore not marked with __THROW. */ extern FILE *fopen (const char *__restrict __filename, const char *__restrict __modes) __wur; /* Open a file, replacing an existing stream with it. This function is a possible cancellation point and therefore not marked with __THROW. */ extern FILE *freopen (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream) __wur; #else # 282 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # ifdef __REDIRECT extern FILE *__REDIRECT (fopen, (const char *__restrict __filename, const char *__restrict __modes), fopen64) __wur; extern FILE *__REDIRECT (freopen, (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream), freopen64) __wur; # else # 291 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # define fopen fopen64 # define freopen freopen64 # endif # 294 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #endif # 295 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 __END_NAMESPACE_STD #ifdef __USE_LARGEFILE64 extern FILE *fopen64 (const char *__restrict __filename, const char *__restrict __modes) __wur; extern FILE *freopen64 (const char *__restrict __filename, const char *__restrict __modes, FILE *__restrict __stream) __wur; #endif # 303 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #ifdef __USE_POSIX /* Create a new stream that refers to an existing system file descriptor. */ extern FILE *fdopen (int __fd, const char *__modes) __THROW __wur; #endif # 308 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #ifdef __USE_GNU /* Create a new stream that refers to the given magic cookie, and uses the given functions for input and output. */ extern FILE *fopencookie (void *__restrict __magic_cookie, const char *__restrict __modes, _IO_cookie_io_functions_t __io_funcs) __THROW __wur; #endif # 316 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #ifdef __USE_XOPEN2K8 /* Create a new stream that refers to a memory buffer. */ extern FILE *fmemopen (void *__s, size_t __len, const char *__modes) __THROW __wur; /* Open a stream that writes into a malloc'd buffer that is expanded as necessary. *BUFLOC and *SIZELOC are updated with the buffer's location and the number of characters written on fflush or fclose. */ extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __THROW __wur; #endif # 327 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 __BEGIN_NAMESPACE_STD /* If BUF is NULL, make STREAM unbuffered. Else make it use buffer BUF, of size BUFSIZ. */ extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __THROW; /* Make STREAM use buffering mode MODE. If BUF is not NULL, use N bytes of it for buffering; else allocate an internal buffer N bytes long. */ extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, int __modes, size_t __n) __THROW; __END_NAMESPACE_STD #ifdef __USE_BSD /* If BUF is NULL, make STREAM unbuffered. Else make it use SIZE bytes of BUF for buffering. */ extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf, size_t __size) __THROW; /* Make STREAM line-buffered. */ extern void setlinebuf (FILE *__stream) __THROW; #endif # 349 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 __BEGIN_NAMESPACE_STD /* Write formatted output to STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fprintf (FILE *__restrict __stream, const char *__restrict __format, ...); /* Write formatted output to stdout. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int printf (const char *__restrict __format, ...); /* Write formatted output to S. */ extern int sprintf (char *__restrict __s, const char *__restrict __format, ...) __THROWNL; /* Write formatted output to S from argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vfprintf (FILE *__restrict __s, const char *__restrict __format, _G_va_list __arg); /* Write formatted output to stdout from argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vprintf (const char *__restrict __format, _G_va_list __arg); /* Write formatted output to S from argument list ARG. */ extern int vsprintf (char *__restrict __s, const char *__restrict __format, _G_va_list __arg) __THROWNL; __END_NAMESPACE_STD #if defined __USE_BSD || defined __USE_ISOC99 || defined __USE_UNIX98 __BEGIN_NAMESPACE_C99 /* Maximum chars of output to write in MAXLEN. */ extern int snprintf (char *__restrict __s, size_t __maxlen, const char *__restrict __format, ...) __THROWNL __attribute__ ((__format__ (__printf__, 3, 4))); extern int vsnprintf (char *__restrict __s, size_t __maxlen, const char *__restrict __format, _G_va_list __arg) __THROWNL __attribute__ ((__format__ (__printf__, 3, 0))); __END_NAMESPACE_C99 #endif # 395 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #ifdef __USE_GNU /* Write formatted output to a string dynamically allocated with `malloc'. Store the address of the string in *PTR. */ extern int vasprintf (char **__restrict __ptr, const char *__restrict __f, _G_va_list __arg) __THROWNL __attribute__ ((__format__ (__printf__, 2, 0))) __wur; extern int __asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) __THROWNL __attribute__ ((__format__ (__printf__, 2, 3))) __wur; extern int asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...) __THROWNL __attribute__ ((__format__ (__printf__, 2, 3))) __wur; #endif # 409 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #ifdef __USE_XOPEN2K8 /* Write formatted output to a file descriptor. */ extern int vdprintf (int __fd, const char *__restrict __fmt, _G_va_list __arg) __attribute__ ((__format__ (__printf__, 2, 0))); extern int dprintf (int __fd, const char *__restrict __fmt, ...) __attribute__ ((__format__ (__printf__, 2, 3))); #endif # 418 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 __BEGIN_NAMESPACE_STD /* Read formatted input from STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __wur; /* Read formatted input from stdin. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int scanf (const char *__restrict __format, ...) __wur; /* Read formatted input from S. */ extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __THROW; #if defined __USE_ISOC99 && !defined __USE_GNU \ && (!defined __LDBL_COMPAT || !defined __REDIRECT) \ && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) # ifdef __REDIRECT /* For strict ISO C99 or POSIX compliance disallow %as, %aS and %a[ GNU extension which conflicts with valid %a followed by letter s, S or [. */ extern int __REDIRECT (fscanf, (FILE *__restrict __stream, const char *__restrict __format, ...), __isoc99_fscanf) __wur; extern int __REDIRECT (scanf, (const char *__restrict __format, ...), __isoc99_scanf) __wur; extern int __REDIRECT_NTH (sscanf, (const char *__restrict __s, const char *__restrict __format, ...), __isoc99_sscanf); # else # 452 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 extern int __isoc99_fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __wur; extern int __isoc99_scanf (const char *__restrict __format, ...) __wur; extern int __isoc99_sscanf (const char *__restrict __s, const char *__restrict __format, ...) __THROW; # define fscanf __isoc99_fscanf # define scanf __isoc99_scanf # define sscanf __isoc99_sscanf # endif # 461 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #endif # 462 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 __END_NAMESPACE_STD #ifdef __USE_ISOC99 __BEGIN_NAMESPACE_C99 /* Read formatted input from S into argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, _G_va_list __arg) __attribute__ ((__format__ (__scanf__, 2, 0))) __wur; /* Read formatted input from stdin into argument list ARG. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int vscanf (const char *__restrict __format, _G_va_list __arg) __attribute__ ((__format__ (__scanf__, 1, 0))) __wur; /* Read formatted input from S into argument list ARG. */ extern int vsscanf (const char *__restrict __s, const char *__restrict __format, _G_va_list __arg) __THROW __attribute__ ((__format__ (__scanf__, 2, 0))); # if !defined __USE_GNU \ && (!defined __LDBL_COMPAT || !defined __REDIRECT) \ && (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) # ifdef __REDIRECT /* For strict ISO C99 or POSIX compliance disallow %as, %aS and %a[ GNU extension which conflicts with valid %a followed by letter s, S or [. */ extern int __REDIRECT (vfscanf, (FILE *__restrict __s, const char *__restrict __format, _G_va_list __arg), __isoc99_vfscanf) __attribute__ ((__format__ (__scanf__, 2, 0))) __wur; extern int __REDIRECT (vscanf, (const char *__restrict __format, _G_va_list __arg), __isoc99_vscanf) __attribute__ ((__format__ (__scanf__, 1, 0))) __wur; extern int __REDIRECT_NTH (vsscanf, (const char *__restrict __s, const char *__restrict __format, _G_va_list __arg), __isoc99_vsscanf) __attribute__ ((__format__ (__scanf__, 2, 0))); # else # 508 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 extern int __isoc99_vfscanf (FILE *__restrict __s, const char *__restrict __format, _G_va_list __arg) __wur; extern int __isoc99_vscanf (const char *__restrict __format, _G_va_list __arg) __wur; extern int __isoc99_vsscanf (const char *__restrict __s, const char *__restrict __format, _G_va_list __arg) __THROW; # define vfscanf __isoc99_vfscanf # define vscanf __isoc99_vscanf # define vsscanf __isoc99_vsscanf # endif # 520 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # endif # 521 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 __END_NAMESPACE_C99 #endif /* Use ISO C9x. */ # 524 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 __BEGIN_NAMESPACE_STD /* Read a character from STREAM. These functions are possible cancellation points and therefore not marked with __THROW. */ extern int fgetc (FILE *__stream); extern int getc (FILE *__stream); /* Read a character from stdin. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int getchar (void); __END_NAMESPACE_STD /* The C standard explicitly says this is a macro, so we always do the optimization for it. */ #define getc(_fp) _IO_getc (_fp) #if defined __USE_POSIX || defined __USE_MISC /* These are defined in POSIX.1:1996. These functions are possible cancellation points and therefore not marked with __THROW. */ extern int getc_unlocked (FILE *__stream); extern int getchar_unlocked (void); #endif /* Use POSIX or MISC. */ # 553 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #ifdef __USE_MISC /* Faster version when locking is not necessary. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fgetc_unlocked (FILE *__stream); #endif /* Use MISC. */ # 563 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 __BEGIN_NAMESPACE_STD /* Write a character to STREAM. These functions are possible cancellation points and therefore not marked with __THROW. These functions is a possible cancellation point and therefore not marked with __THROW. */ extern int fputc (int __c, FILE *__stream); extern int putc (int __c, FILE *__stream); /* Write a character to stdout. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int putchar (int __c); __END_NAMESPACE_STD /* The C standard explicitly says this can be a macro, so we always do the optimization for it. */ #define putc(_ch, _fp) _IO_putc (_ch, _fp) #ifdef __USE_MISC /* Faster version when locking is not necessary. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fputc_unlocked (int __c, FILE *__stream); #endif /* Use MISC. */ # 596 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #if defined __USE_POSIX || defined __USE_MISC /* These are defined in POSIX.1:1996. These functions are possible cancellation points and therefore not marked with __THROW. */ extern int putc_unlocked (int __c, FILE *__stream); extern int putchar_unlocked (int __c); #endif /* Use POSIX or MISC. */ # 605 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #if defined __USE_SVID || defined __USE_MISC \ || (defined __USE_XOPEN && !defined __USE_XOPEN2K) /* Get a word (int) from STREAM. */ extern int getw (FILE *__stream); /* Write a word (int) to STREAM. */ extern int putw (int __w, FILE *__stream); #endif # 615 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 __BEGIN_NAMESPACE_STD /* Get a newline-terminated string of finite length from STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream) __wur; #if !defined __USE_ISOC11 \ || (defined __cplusplus && __cplusplus <= 201103L) /* Get a newline-terminated string from stdin, removing the newline. DO NOT USE THIS FUNCTION!! There is no limit on how much it will read. The function has been officially removed in ISO C11. This opportunity is used to also remove it from the GNU feature list. It is now only available when explicitly using an old ISO C, Unix, or POSIX standard. GCC defines _GNU_SOURCE when building C++ code and the function is still in C++11, so it is also available for C++. This function is a possible cancellation point and therefore not marked with __THROW. */ extern char *gets (char *__s) __wur __attribute_deprecated__; #endif # 640 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 __END_NAMESPACE_STD #ifdef __USE_GNU /* This function does the same as `fgets' but does not lock the stream. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern char *fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream) __wur; #endif # 652 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #ifdef __USE_XOPEN2K8 /* Read up to (and including) a DELIMITER from STREAM into *LINEPTR (and null-terminate it). *LINEPTR is a pointer returned from malloc (or NULL), pointing to *N characters of space. It is realloc'd as necessary. Returns the number of characters read (not including the null terminator), or -1 on error or EOF. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern _IO_ssize_t __getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) __wur; extern _IO_ssize_t getdelim (char **__restrict __lineptr, size_t *__restrict __n, int __delimiter, FILE *__restrict __stream) __wur; /* Like `getdelim', but reads up to a newline. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern _IO_ssize_t getline (char **__restrict __lineptr, size_t *__restrict __n, FILE *__restrict __stream) __wur; #endif # 682 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 __BEGIN_NAMESPACE_STD /* Write a string to STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fputs (const char *__restrict __s, FILE *__restrict __stream); /* Write a string, followed by a newline, to stdout. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int puts (const char *__s); /* Push a character back onto the input buffer of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int ungetc (int __c, FILE *__stream); /* Read chunks of generic data from STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern size_t fread (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __wur; /* Write chunks of generic data to STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern size_t fwrite (const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __s); __END_NAMESPACE_STD #ifdef __USE_GNU /* This function does the same as `fputs' but does not lock the stream. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int fputs_unlocked (const char *__restrict __s, FILE *__restrict __stream); #endif # 729 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #ifdef __USE_MISC /* Faster versions when locking is not necessary. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern size_t fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __wur; extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream); #endif # 742 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 __BEGIN_NAMESPACE_STD /* Seek to a certain position on STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fseek (FILE *__stream, long int __off, int __whence); /* Return the current position of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern long int ftell (FILE *__stream) __wur; /* Rewind to the beginning of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void rewind (FILE *__stream); __END_NAMESPACE_STD /* The Single Unix Specification, Version 2, specifies an alternative, more adequate interface for the two functions above which deal with file offset. `long int' is not the right type. These definitions are originally defined in the Large File Support API. */ #if defined __USE_LARGEFILE || defined __USE_XOPEN2K # ifndef __USE_FILE_OFFSET64 /* Seek to a certain position on STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fseeko (FILE *__stream, __off_t __off, int __whence); /* Return the current position of STREAM. This function is a possible cancellation point and therefore not marked with __THROW. */ extern __off_t ftello (FILE *__stream) __wur; # else # 780 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # ifdef __REDIRECT extern int __REDIRECT (fseeko, (FILE *__stream, __off64_t __off, int __whence), fseeko64); extern __off64_t __REDIRECT (ftello, (FILE *__stream), ftello64); # else # 786 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # define fseeko fseeko64 # define ftello ftello64 # endif # 789 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # endif # 790 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #endif # 791 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 __BEGIN_NAMESPACE_STD #ifndef __USE_FILE_OFFSET64 /* Get STREAM's position. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos); /* Set STREAM's position. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int fsetpos (FILE *__stream, const fpos_t *__pos); #else # 805 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # ifdef __REDIRECT extern int __REDIRECT (fgetpos, (FILE *__restrict __stream, fpos_t *__restrict __pos), fgetpos64); extern int __REDIRECT (fsetpos, (FILE *__stream, const fpos_t *__pos), fsetpos64); # else # 811 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # define fgetpos fgetpos64 # define fsetpos fsetpos64 # endif # 814 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #endif # 815 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 __END_NAMESPACE_STD #ifdef __USE_LARGEFILE64 extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence); extern __off64_t ftello64 (FILE *__stream) __wur; extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos); extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos); #endif # 823 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 __BEGIN_NAMESPACE_STD /* Clear the error and EOF indicators for STREAM. */ extern void clearerr (FILE *__stream) __THROW; /* Return the EOF indicator for STREAM. */ extern int feof (FILE *__stream) __THROW __wur; /* Return the error indicator for STREAM. */ extern int ferror (FILE *__stream) __THROW __wur; __END_NAMESPACE_STD #ifdef __USE_MISC /* Faster versions when locking is not required. */ extern void clearerr_unlocked (FILE *__stream) __THROW; extern int feof_unlocked (FILE *__stream) __THROW __wur; extern int ferror_unlocked (FILE *__stream) __THROW __wur; #endif # 839 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 __BEGIN_NAMESPACE_STD /* Print a message describing the meaning of the value of errno. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void perror (const char *__s); __END_NAMESPACE_STD /* Provide the declarations for `sys_errlist' and `sys_nerr' if they are available on this system. Even if available, these variables should not be used directly. The `strerror' function provides all the necessary functionality. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 853 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sys_errlist.h" 1 3 /* Declare sys_errlist and sys_nerr, or don't. Compatibility (do) version. Copyright (C) 2002, 2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _STDIO_H # error "Never include directly; use instead." #endif # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sys_errlist.h" 3 /* sys_errlist and sys_nerr are deprecated. Use strerror instead. */ #ifdef __USE_BSD extern int sys_nerr; extern const char *const sys_errlist[]; #endif # 29 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sys_errlist.h" 3 #ifdef __USE_GNU extern int _sys_nerr; extern const char *const _sys_errlist[]; #endif # 33 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sys_errlist.h" 3 # 854 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 2 3 #ifdef __USE_POSIX /* Return the system file descriptor for STREAM. */ extern int fileno (FILE *__stream) __THROW __wur; #endif /* Use POSIX. */ # 860 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #ifdef __USE_MISC /* Faster version when locking is not required. */ extern int fileno_unlocked (FILE *__stream) __THROW __wur; #endif # 865 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #if (defined __USE_POSIX2 || defined __USE_SVID || defined __USE_BSD || \ defined __USE_MISC) /* Create a new stream connected to a pipe running the given command. This function is a possible cancellation point and therefore not marked with __THROW. */ extern FILE *popen (const char *__command, const char *__modes) __wur; /* Close a stream opened by popen and return the status of its child. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int pclose (FILE *__stream); #endif # 881 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #ifdef __USE_POSIX /* Return the name of the controlling terminal. */ extern char *ctermid (char *__s) __THROW; #endif /* Use POSIX. */ # 887 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #ifdef __USE_XOPEN /* Return the name of the current user. */ extern char *cuserid (char *__s); #endif /* Use X/Open, but not issue 6. */ # 893 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #ifdef __USE_GNU struct obstack; /* See . */ /* Write formatted output to an obstack. */ extern int obstack_printf (struct obstack *__restrict __obstack, const char *__restrict __format, ...) __THROWNL __attribute__ ((__format__ (__printf__, 2, 3))); extern int obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __format, _G_va_list __args) __THROWNL __attribute__ ((__format__ (__printf__, 2, 0))); #endif /* Use GNU. */ # 907 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #if defined __USE_POSIX || defined __USE_MISC /* These are defined in POSIX.1:1996. */ /* Acquire ownership of STREAM. */ extern void flockfile (FILE *__stream) __THROW; /* Try to acquire ownership of STREAM but do not block if it is not possible. */ extern int ftrylockfile (FILE *__stream) __THROW __wur; /* Relinquish the ownership granted for STREAM. */ extern void funlockfile (FILE *__stream) __THROW; #endif /* POSIX || misc */ # 922 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #if defined __USE_XOPEN && !defined __USE_XOPEN2K && !defined __USE_GNU /* The X/Open standard requires some functions and variables to be declared here which do not belong into this header. But we have to follow. In GNU mode we don't do this nonsense. */ # define __need_getopt #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 928 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # 929 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #endif /* X/Open, but not issue 6 and not for GNU. */ # 930 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 /* If we are compiling with optimizing read this file. It contains several optimizing inline functions and macros. */ #ifdef __USE_EXTERN_INLINES #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 934 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stdio.h" 1 3 /* Optimizing macros and inline functions for stdio functions. Copyright (C) 1998,2000,2001,2004,2007,2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _STDIO_H # error "Never include directly; use instead." #endif # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stdio.h" 3 #ifndef __extern_inline # define __STDIO_INLINE inline #else # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stdio.h" 3 # define __STDIO_INLINE __extern_inline #endif # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stdio.h" 3 #ifdef __USE_EXTERN_INLINES /* For -D_FORTIFY_SOURCE{,=2} bits/stdio2.h will define a different inline. */ # if !(__USE_FORTIFY_LEVEL > 0 && defined __fortify_function) /* Write formatted output to stdout from argument list ARG. */ __STDIO_INLINE int vprintf (const char *__restrict __fmt, _G_va_list __arg) { return vfprintf (stdout, __fmt, __arg); } # endif # 41 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stdio.h" 3 /* Read a character from stdin. */ __STDIO_INLINE int getchar (void) { return _IO_getc (stdin); } # ifdef __USE_MISC /* Faster version when locking is not necessary. */ __STDIO_INLINE int fgetc_unlocked (FILE *__fp) { return _IO_getc_unlocked (__fp); } # endif /* misc */ # 58 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stdio.h" 3 # if defined __USE_POSIX || defined __USE_MISC /* This is defined in POSIX.1:1996. */ __STDIO_INLINE int getc_unlocked (FILE *__fp) { return _IO_getc_unlocked (__fp); } /* This is defined in POSIX.1:1996. */ __STDIO_INLINE int getchar_unlocked (void) { return _IO_getc_unlocked (stdin); } # endif /* POSIX || misc */ # 75 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stdio.h" 3 /* Write a character to stdout. */ __STDIO_INLINE int putchar (int __c) { return _IO_putc (__c, stdout); } # ifdef __USE_MISC /* Faster version when locking is not necessary. */ __STDIO_INLINE int fputc_unlocked (int __c, FILE *__stream) { return _IO_putc_unlocked (__c, __stream); } # endif /* misc */ # 93 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stdio.h" 3 # if defined __USE_POSIX || defined __USE_MISC /* This is defined in POSIX.1:1996. */ __STDIO_INLINE int putc_unlocked (int __c, FILE *__stream) { return _IO_putc_unlocked (__c, __stream); } /* This is defined in POSIX.1:1996. */ __STDIO_INLINE int putchar_unlocked (int __c) { return _IO_putc_unlocked (__c, stdout); } # endif /* POSIX || misc */ # 110 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stdio.h" 3 # ifdef __USE_GNU /* Like `getdelim', but reads up to a newline. */ __STDIO_INLINE _IO_ssize_t getline (char **__lineptr, size_t *__n, FILE *__stream) { return __getdelim (__lineptr, __n, '\n', __stream); } # endif /* GNU */ # 120 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stdio.h" 3 # ifdef __USE_MISC /* Faster versions when locking is not required. */ __STDIO_INLINE int __NTH (feof_unlocked (FILE *__stream)) { return _IO_feof_unlocked (__stream); } /* Faster versions when locking is not required. */ __STDIO_INLINE int __NTH (ferror_unlocked (FILE *__stream)) { return _IO_ferror_unlocked (__stream); } # endif /* misc */ # 137 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stdio.h" 3 #endif /* Use extern inlines. */ # 139 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stdio.h" 3 #if defined __USE_MISC && defined __GNUC__ && defined __OPTIMIZE__ \ && !defined __cplusplus /* Perform some simple optimizations. */ # define fread_unlocked(ptr, size, n, stream) \ (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \ && (size_t) (size) * (size_t) (n) <= 8 \ && (size_t) (size) != 0) \ ? ({ char *__ptr = (char *) (ptr); \ FILE *__stream = (stream); \ size_t __cnt; \ for (__cnt = (size_t) (size) * (size_t) (n); \ __cnt > 0; --__cnt) \ { \ int __c = _IO_getc_unlocked (__stream); \ if (__c == EOF) \ break; \ *__ptr++ = __c; \ } \ ((size_t) (size) * (size_t) (n) - __cnt) \ / (size_t) (size); }) \ : (((__builtin_constant_p (size) && (size_t) (size) == 0) \ || (__builtin_constant_p (n) && (size_t) (n) == 0)) \ /* Evaluate all parameters once. */ \ ? ((void) (ptr), (void) (stream), (void) (size), \ (void) (n), (size_t) 0) \ : fread_unlocked (ptr, size, n, stream)))) # define fwrite_unlocked(ptr, size, n, stream) \ (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) \ && (size_t) (size) * (size_t) (n) <= 8 \ && (size_t) (size) != 0) \ ? ({ const char *__ptr = (const char *) (ptr); \ FILE *__stream = (stream); \ size_t __cnt; \ for (__cnt = (size_t) (size) * (size_t) (n); \ __cnt > 0; --__cnt) \ if (_IO_putc_unlocked (*__ptr++, __stream) == EOF) \ break; \ ((size_t) (size) * (size_t) (n) - __cnt) \ / (size_t) (size); }) \ : (((__builtin_constant_p (size) && (size_t) (size) == 0) \ || (__builtin_constant_p (n) && (size_t) (n) == 0)) \ /* Evaluate all parameters once. */ \ ? ((void) (ptr), (void) (stream), (void) (size), \ (void) (n), (size_t) 0) \ : fwrite_unlocked (ptr, size, n, stream)))) #endif # 188 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stdio.h" 3 /* Define helper macro. */ #undef __STDIO_INLINE # 935 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 2 3 #endif # 936 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #if __USE_FORTIFY_LEVEL > 0 && defined __extern_always_inline #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 937 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # 938 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #endif # 939 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #ifdef __LDBL_COMPAT #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 940 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # 941 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #endif # 942 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 __END_DECLS #endif /* included. */ # 946 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 #endif /* !_STDIO_H */ # 948 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdio.h" 3 # 23 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #ifdef STDC_HEADERS #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 24 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 1 3 /* Copyright (C) 1991-2007, 2009-2011, 2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.20 General utilities */ #ifndef _STDLIB_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 24 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # 25 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 /* Get size_t, wchar_t and NULL from . */ #define __need_size_t #ifndef __need_malloc_and_calloc # define __need_wchar_t # define __need_NULL #endif # 32 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 32 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # 1 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 1 3 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) /* Always define miscellaneous pieces when modules are available. */ #if !__has_feature(modules) #define __STDDEF_H #endif # 37 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 44 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_ptrdiff_t) #if !defined(_PTRDIFF_T) || __has_feature(modules) /* Always define ptrdiff_t when modules are available. */ #if !__has_feature(modules) #define _PTRDIFF_T #endif # 51 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 53 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 55 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_size_t) #if !defined(_SIZE_T) || __has_feature(modules) /* Always define size_t when modules are available. */ #if !__has_feature(modules) #define _SIZE_T #endif # 62 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ size_t; #endif # 64 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_size_t #endif /*defined(__need_size_t) */ # 66 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) /* Always define rsize_t when modules are available. */ #if !__has_feature(modules) #define _RSIZE_T #endif # 76 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ rsize_t; #endif # 78 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif /* defined(__need_STDDEF_H_misc) */ # 79 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_wchar_t) #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if !defined(_WCHAR_T) || __has_feature(modules) #if !__has_feature(modules) #define _WCHAR_T #if defined(_MSC_EXTENSIONS) #define _WCHAR_T_DEFINED #endif # 89 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 90 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WCHAR_TYPE__ wchar_t; #endif # 92 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 93 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 95 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_NULL) #undef NULL #ifdef __cplusplus # if !defined(__MINGW32__) && !defined(_MSC_VER) # define NULL __null # else # 102 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL 0 # endif # 104 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #else # 105 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL ((void*)0) #endif # 107 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #ifdef __cplusplus #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 112 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 113 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_NULL #endif /* defined(__need_NULL) */ # 115 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 118 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 119 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 120 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 123 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if defined(__need_wint_t) /* Always define wint_t when modules are available. */ #if !defined(_WINT_T) || __has_feature(modules) #if !__has_feature(modules) #define _WINT_T #endif # 132 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WINT_TYPE__ wint_t; #endif # 134 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wint_t #endif /* __need_wint_t */ # 136 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 138 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 33 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 2 3 __BEGIN_DECLS #ifndef __need_malloc_and_calloc #define _STDLIB_H 1 #if (defined __USE_XOPEN || defined __USE_XOPEN2K8) && !defined _SYS_WAIT_H /* XPG requires a few symbols from being defined. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 41 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/waitflags.h" 1 3 /* Definitions of flag bits for `waitpid' et al. Copyright (C) 1992,1996,1997,2000,2004,2005 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if !defined _SYS_WAIT_H && !defined _STDLIB_H # error "Never include directly; use instead." #endif # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/waitflags.h" 3 /* Bits in the third argument to `waitpid'. */ #define WNOHANG 1 /* Don't block waiting. */ #define WUNTRACED 2 /* Report status of stopped children. */ /* Bits in the fourth argument to `waitid'. */ #define WSTOPPED 2 /* Report stopped child (same as WUNTRACED). */ #define WEXITED 4 /* Report dead child. */ #define WCONTINUED 8 /* Report continued child. */ #define WNOWAIT 0x01000000 /* Don't reap, just poll status. */ #define __WNOTHREAD 0x20000000 /* Don't wait on children of other threads in this group */ #define __WALL 0x40000000 /* Wait for any child. */ #define __WCLONE 0x80000000 /* Wait for cloned process. */ # 42 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 2 3 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 42 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/waitstatus.h" 1 3 /* Definitions of status bits for `wait' et al. Copyright (C) 1992,1994,1996,1997,2000,2004 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if !defined _SYS_WAIT_H && !defined _STDLIB_H # error "Never include directly; use instead." #endif # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/waitstatus.h" 3 /* Everything extant so far uses these same bits. */ /* If WIFEXITED(STATUS), the low-order 8 bits of the status. */ #define __WEXITSTATUS(status) (((status) & 0xff00) >> 8) /* If WIFSIGNALED(STATUS), the terminating signal. */ #define __WTERMSIG(status) ((status) & 0x7f) /* If WIFSTOPPED(STATUS), the signal that stopped the child. */ #define __WSTOPSIG(status) __WEXITSTATUS(status) /* Nonzero if STATUS indicates normal termination. */ #define __WIFEXITED(status) (__WTERMSIG(status) == 0) /* Nonzero if STATUS indicates termination by a signal. */ #define __WIFSIGNALED(status) \ (((signed char) (((status) & 0x7f) + 1) >> 1) > 0) /* Nonzero if STATUS indicates the child is stopped. */ #define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f) /* Nonzero if STATUS indicates the child continued after a stop. We only define this if provides the WCONTINUED flag bit. */ #ifdef WCONTINUED # define __WIFCONTINUED(status) ((status) == __W_CONTINUED) #endif # 51 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/waitstatus.h" 3 /* Nonzero if STATUS indicates the child dumped core. */ #define __WCOREDUMP(status) ((status) & __WCOREFLAG) /* Macros for constructing status values. */ #define __W_EXITCODE(ret, sig) ((ret) << 8 | (sig)) #define __W_STOPCODE(sig) ((sig) << 8 | 0x7f) #define __W_CONTINUED 0xffff #define __WCOREFLAG 0x80 #ifdef __USE_BSD #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 64 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/waitstatus.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/endian.h" 1 3 /* Copyright (C) 1992-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _ENDIAN_H #define _ENDIAN_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 21 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/endian.h" 3 # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/endian.h" 3 /* Definitions for byte order, according to significance of bytes, from low addresses to high addresses. The value is what you get by putting '4' in the most significant byte, '3' in the second most significant byte, '2' in the second least significant byte, and '1' in the least significant byte, and then writing down one digit for each byte, starting with the byte at the lowest address at the left, and proceeding to the byte with the highest address at the right. */ #define __LITTLE_ENDIAN 1234 #define __BIG_ENDIAN 4321 #define __PDP_ENDIAN 3412 /* This file defines `__BYTE_ORDER' for the particular machine. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 36 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/endian.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/endian.h" 1 3 /* Copyright (C) 1997, 1998 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* PowerPC can be little or big endian. Hopefully gcc will know... */ #ifndef _ENDIAN_H # error "Never use directly; include instead." #endif # 23 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/endian.h" 3 #if defined __BIG_ENDIAN__ || defined _BIG_ENDIAN # if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN # error Both BIG_ENDIAN and LITTLE_ENDIAN defined! # endif # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/endian.h" 3 # define __BYTE_ORDER __BIG_ENDIAN #else # 30 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/endian.h" 3 # if defined __LITTLE_ENDIAN__ || defined _LITTLE_ENDIAN # define __BYTE_ORDER __LITTLE_ENDIAN # else # 33 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/endian.h" 3 # warning Cannot determine current byte order, assuming big-endian. # define __BYTE_ORDER __BIG_ENDIAN # endif # 36 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/endian.h" 3 #endif # 37 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/endian.h" 3 # 37 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/endian.h" 2 3 /* Some machines may need to use a different endianness for floating point values. */ #ifndef __FLOAT_WORD_ORDER # define __FLOAT_WORD_ORDER __BYTE_ORDER #endif # 43 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/endian.h" 3 #ifdef __USE_BSD # define LITTLE_ENDIAN __LITTLE_ENDIAN # define BIG_ENDIAN __BIG_ENDIAN # define PDP_ENDIAN __PDP_ENDIAN # define BYTE_ORDER __BYTE_ORDER #endif # 50 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/endian.h" 3 #if __BYTE_ORDER == __LITTLE_ENDIAN # define __LONG_LONG_PAIR(HI, LO) LO, HI #elif __BYTE_ORDER == __BIG_ENDIAN # 54 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/endian.h" 3 # define __LONG_LONG_PAIR(HI, LO) HI, LO #endif # 56 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/endian.h" 3 #if defined __USE_BSD && !defined __ASSEMBLER__ /* Conversion interfaces. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 60 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/endian.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 1 3 /* Macros to swap the order of bytes in integer values. Copyright (C) 1997-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H # error "Never use directly; include instead." #endif # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 #ifndef _BITS_BYTESWAP_H #define _BITS_BYTESWAP_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 /* Swap bytes in 16 bit value. */ #define __bswap_constant_16(x) \ ((unsigned short int)((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8))) /* Get __bswap_16. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 34 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap-16.h" 1 3 /* Macros to swap the order of bytes in 16-bit integer values. Copyright (C) 2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_BYTESWAP_H # error "Never use directly; include instead." #endif # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap-16.h" 3 #ifdef __GNUC__ # define __bswap_16(x) \ (__extension__ \ ({ unsigned short int __bsx = (unsigned short int) (x); \ __bswap_constant_16 (__bsx); })) #else # 29 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap-16.h" 3 static __inline unsigned short int __bswap_16 (unsigned short int __bsx) { return __bswap_constant_16 (__bsx); } #endif # 35 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap-16.h" 3 # 35 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 2 3 /* Swap bytes in 32 bit value. */ #define __bswap_constant_32(x) \ ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | \ (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24)) #ifdef __GNUC__ # if __GNUC_PREREQ (4, 3) static __inline unsigned int __bswap_32 (unsigned int __bsx) { return __builtin_bswap32 (__bsx); } # else # 49 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 # define __bswap_32(x) \ (__extension__ \ ({ register unsigned int __bsx = (x); __bswap_constant_32 (__bsx); })) # endif # 53 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 #else # 54 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 static __inline unsigned int __bswap_32 (unsigned int __bsx) { return __bswap_constant_32 (__bsx); } #endif # 60 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 /* Swap bytes in 64 bit value. */ #if __GNUC_PREREQ (2, 0) # define __bswap_constant_64(x) \ (__extension__ ((((x) & 0xff00000000000000ull) >> 56) \ | (((x) & 0x00ff000000000000ull) >> 40) \ | (((x) & 0x0000ff0000000000ull) >> 24) \ | (((x) & 0x000000ff00000000ull) >> 8) \ | (((x) & 0x00000000ff000000ull) << 8) \ | (((x) & 0x0000000000ff0000ull) << 24) \ | (((x) & 0x000000000000ff00ull) << 40) \ | (((x) & 0x00000000000000ffull) << 56))) # if __GNUC_PREREQ (4, 3) static __inline __uint64_t __bswap_64 (__uint64_t __bsx) { return __builtin_bswap64 (__bsx); } # else # 80 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 # define __bswap_64(x) \ (__extension__ \ ({ union { __extension__ __uint64_t __ll; \ unsigned int __l[2]; } __w, __r; \ if (__builtin_constant_p (x)) \ __r.__ll = __bswap_constant_64 (x); \ else \ { \ __w.__ll = (x); \ __r.__l[0] = __bswap_32 (__w.__l[1]); \ __r.__l[1] = __bswap_32 (__w.__l[0]); \ } \ __r.__ll; })) # endif # 94 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 #elif __GLIBC_HAVE_LONG_LONG # 95 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 # define __bswap_constant_64(x) \ ((((x) & 0xff00000000000000ull) >> 56) \ | (((x) & 0x00ff000000000000ull) >> 40) \ | (((x) & 0x0000ff0000000000ull) >> 24) \ | (((x) & 0x000000ff00000000ull) >> 8) \ | (((x) & 0x00000000ff000000ull) << 8) \ | (((x) & 0x0000000000ff0000ull) << 24) \ | (((x) & 0x000000000000ff00ull) << 40) \ | (((x) & 0x00000000000000ffull) << 56)) static __inline __uint64_t __bswap_64 (__uint64_t __bsx) { return __bswap_constant_64 (__bsx); } #endif # 111 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 #endif /* _BITS_BYTESWAP_H */ # 113 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 # 61 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/endian.h" 2 3 # if __BYTE_ORDER == __LITTLE_ENDIAN # define htobe16(x) __bswap_16 (x) # define htole16(x) (x) # define be16toh(x) __bswap_16 (x) # define le16toh(x) (x) # define htobe32(x) __bswap_32 (x) # define htole32(x) (x) # define be32toh(x) __bswap_32 (x) # define le32toh(x) (x) # if __GLIBC_HAVE_LONG_LONG # define htobe64(x) __bswap_64 (x) # define htole64(x) (x) # define be64toh(x) __bswap_64 (x) # define le64toh(x) (x) # endif # 79 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/endian.h" 3 # else # 81 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/endian.h" 3 # define htobe16(x) (x) # define htole16(x) __bswap_16 (x) # define be16toh(x) (x) # define le16toh(x) __bswap_16 (x) # define htobe32(x) (x) # define htole32(x) __bswap_32 (x) # define be32toh(x) (x) # define le32toh(x) __bswap_32 (x) # if __GLIBC_HAVE_LONG_LONG # define htobe64(x) (x) # define htole64(x) __bswap_64 (x) # define be64toh(x) (x) # define le64toh(x) __bswap_64 (x) # endif # 97 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/endian.h" 3 # endif # 98 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/endian.h" 3 #endif # 99 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/endian.h" 3 #endif /* endian.h */ # 101 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/endian.h" 3 # 65 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/waitstatus.h" 2 3 union wait { int w_status; struct { # if __BYTE_ORDER == __LITTLE_ENDIAN unsigned int __w_termsig:7; /* Terminating signal. */ unsigned int __w_coredump:1; /* Set if dumped core. */ unsigned int __w_retcode:8; /* Return code if exited normally. */ unsigned int:16; # endif /* Little endian. */ # 77 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/waitstatus.h" 3 # if __BYTE_ORDER == __BIG_ENDIAN unsigned int:16; unsigned int __w_retcode:8; unsigned int __w_coredump:1; unsigned int __w_termsig:7; # endif /* Big endian. */ # 83 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/waitstatus.h" 3 } __wait_terminated; struct { # if __BYTE_ORDER == __LITTLE_ENDIAN unsigned int __w_stopval:8; /* W_STOPPED if stopped. */ unsigned int __w_stopsig:8; /* Stopping signal. */ unsigned int:16; # endif /* Little endian. */ # 91 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/waitstatus.h" 3 # if __BYTE_ORDER == __BIG_ENDIAN unsigned int:16; unsigned int __w_stopsig:8; /* Stopping signal. */ unsigned int __w_stopval:8; /* W_STOPPED if stopped. */ # endif /* Big endian. */ # 96 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/waitstatus.h" 3 } __wait_stopped; }; # define w_termsig __wait_terminated.__w_termsig # define w_coredump __wait_terminated.__w_coredump # define w_retcode __wait_terminated.__w_retcode # define w_stopsig __wait_stopped.__w_stopsig # define w_stopval __wait_stopped.__w_stopval #endif /* Use BSD. */ # 106 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/waitstatus.h" 3 # 43 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 2 3 # ifdef __USE_BSD /* Lots of hair to allow traditional BSD use of `union wait' as well as POSIX.1 use of `int' for the status word. */ # if defined __GNUC__ && !defined __cplusplus # define __WAIT_INT(status) \ (__extension__ (((union { __typeof(status) __in; int __i; }) \ { .__in = (status) }).__i)) # else # 54 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # define __WAIT_INT(status) (*(int *) &(status)) # endif # 56 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 /* This is the type of the argument to `wait'. The funky union causes redeclarations with either `int *' or `union wait *' to be allowed without complaint. __WAIT_STATUS_DEFN is the type used in the actual function definitions. */ # if !defined __GNUC__ || __GNUC__ < 2 || defined __cplusplus # define __WAIT_STATUS void * # define __WAIT_STATUS_DEFN void * # else # 66 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 /* This works in GCC 2.6.1 and later. */ typedef union { union wait *__uptr; int *__iptr; } __WAIT_STATUS __attribute__ ((__transparent_union__)); # define __WAIT_STATUS_DEFN int * # endif # 74 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # else /* Don't use BSD. */ # 76 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # define __WAIT_INT(status) (status) # define __WAIT_STATUS int * # define __WAIT_STATUS_DEFN int * # endif /* Use BSD. */ # 82 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 /* Define the macros also would define this way. */ # define WEXITSTATUS(status) __WEXITSTATUS (__WAIT_INT (status)) # define WTERMSIG(status) __WTERMSIG (__WAIT_INT (status)) # define WSTOPSIG(status) __WSTOPSIG (__WAIT_INT (status)) # define WIFEXITED(status) __WIFEXITED (__WAIT_INT (status)) # define WIFSIGNALED(status) __WIFSIGNALED (__WAIT_INT (status)) # define WIFSTOPPED(status) __WIFSTOPPED (__WAIT_INT (status)) # ifdef __WIFCONTINUED # define WIFCONTINUED(status) __WIFCONTINUED (__WAIT_INT (status)) # endif # 93 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #endif /* X/Open or XPG7 and not included. */ # 94 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 __BEGIN_NAMESPACE_STD /* Returned by `div'. */ typedef struct { int quot; /* Quotient. */ int rem; /* Remainder. */ } div_t; /* Returned by `ldiv'. */ #ifndef __ldiv_t_defined typedef struct { long int quot; /* Quotient. */ long int rem; /* Remainder. */ } ldiv_t; # define __ldiv_t_defined 1 #endif # 112 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 __END_NAMESPACE_STD #if defined __USE_ISOC99 && !defined __lldiv_t_defined __BEGIN_NAMESPACE_C99 /* Returned by `lldiv'. */ __extension__ typedef struct { long long int quot; /* Quotient. */ long long int rem; /* Remainder. */ } lldiv_t; # define __lldiv_t_defined 1 __END_NAMESPACE_C99 #endif # 125 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 /* The largest number rand will return (same as INT_MAX). */ #define RAND_MAX 2147483647 /* We define these the same for all machines. Changes from this to the outside world should be done in `_exit'. */ #define EXIT_FAILURE 1 /* Failing exit status. */ #define EXIT_SUCCESS 0 /* Successful exit status. */ /* Maximum length of a multibyte character in the current locale. */ #define MB_CUR_MAX (__ctype_get_mb_cur_max ()) extern size_t __ctype_get_mb_cur_max (void) __THROW __wur; __BEGIN_NAMESPACE_STD /* Convert a string to a floating-point number. */ extern double atof (const char *__nptr) __THROW __attribute_pure__ __nonnull ((1)) __wur; /* Convert a string to an integer. */ extern int atoi (const char *__nptr) __THROW __attribute_pure__ __nonnull ((1)) __wur; /* Convert a string to a long integer. */ extern long int atol (const char *__nptr) __THROW __attribute_pure__ __nonnull ((1)) __wur; __END_NAMESPACE_STD #if defined __USE_ISOC99 || (defined __GLIBC_HAVE_LONG_LONG && defined __USE_MISC) __BEGIN_NAMESPACE_C99 /* Convert a string to a long long integer. */ __extension__ extern long long int atoll (const char *__nptr) __THROW __attribute_pure__ __nonnull ((1)) __wur; __END_NAMESPACE_C99 #endif # 161 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 __BEGIN_NAMESPACE_STD /* Convert a string to a floating-point number. */ extern double strtod (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); __END_NAMESPACE_STD #ifdef __USE_ISOC99 __BEGIN_NAMESPACE_C99 /* Likewise for `float' and `long double' sizes of floating-point numbers. */ extern float strtof (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); extern long double strtold (const char *__restrict __nptr, char **__restrict __endptr) __THROW __nonnull ((1)); __END_NAMESPACE_C99 #endif # 180 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 __BEGIN_NAMESPACE_STD /* Convert a string to a long integer. */ extern long int strtol (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); /* Convert a string to an unsigned long integer. */ extern unsigned long int strtoul (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); __END_NAMESPACE_STD #if defined __GLIBC_HAVE_LONG_LONG && defined __USE_BSD /* Convert a string to a quadword integer. */ __extension__ extern long long int strtoq (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); /* Convert a string to an unsigned quadword integer. */ __extension__ extern unsigned long long int strtouq (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); #endif /* GCC and use BSD. */ # 204 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #if defined __USE_ISOC99 || (defined __GLIBC_HAVE_LONG_LONG && defined __USE_MISC) __BEGIN_NAMESPACE_C99 /* Convert a string to a quadword integer. */ __extension__ extern long long int strtoll (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); /* Convert a string to an unsigned quadword integer. */ __extension__ extern unsigned long long int strtoull (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW __nonnull ((1)); __END_NAMESPACE_C99 #endif /* ISO C99 or GCC and use MISC. */ # 219 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #ifdef __USE_GNU /* The concept of one static locale per category is not very well thought out. Many applications will need to process its data using information from several different locales. Another problem is the implementation of the internationalization handling in the ISO C++ standard library. To support this another set of the functions using locale data exist which take an additional argument. Attention: even though several *_l interfaces are part of POSIX:2008, these are not. */ /* Structure for reentrant locale using functions. This is an (almost) opaque type for the user level programs. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 235 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # 236 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 /* Special versions of the functions above which take the locale to use as an additional parameter. */ extern long int strtol_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) __THROW __nonnull ((1, 4)); extern unsigned long int strtoul_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) __THROW __nonnull ((1, 4)); __extension__ extern long long int strtoll_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) __THROW __nonnull ((1, 4)); __extension__ extern unsigned long long int strtoull_l (const char *__restrict __nptr, char **__restrict __endptr, int __base, __locale_t __loc) __THROW __nonnull ((1, 4)); extern double strtod_l (const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) __THROW __nonnull ((1, 3)); extern float strtof_l (const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) __THROW __nonnull ((1, 3)); extern long double strtold_l (const char *__restrict __nptr, char **__restrict __endptr, __locale_t __loc) __THROW __nonnull ((1, 3)); #endif /* GNU */ # 273 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #ifdef __USE_EXTERN_INLINES __BEGIN_NAMESPACE_STD __extern_inline int __NTH (atoi (const char *__nptr)) { return (int) strtol (__nptr, (char **) NULL, 10); } __extern_inline long int __NTH (atol (const char *__nptr)) { return strtol (__nptr, (char **) NULL, 10); } __END_NAMESPACE_STD # if defined __USE_MISC || defined __USE_ISOC99 __BEGIN_NAMESPACE_C99 __extension__ __extern_inline long long int __NTH (atoll (const char *__nptr)) { return strtoll (__nptr, (char **) NULL, 10); } __END_NAMESPACE_C99 # endif # 298 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #endif /* Optimizing and Inlining. */ # 299 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #if defined __USE_SVID || defined __USE_XOPEN_EXTENDED /* Convert N to base 64 using the digits "./0-9A-Za-z", least-significant digit first. Returns a pointer to static storage overwritten by the next call. */ extern char *l64a (long int __n) __THROW __wur; /* Read a number from a string S in base 64 as above. */ extern long int a64l (const char *__s) __THROW __attribute_pure__ __nonnull ((1)) __wur; #endif /* Use SVID || extended X/Open. */ # 312 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #if defined __USE_SVID || defined __USE_XOPEN_EXTENDED || defined __USE_BSD #if 0 /* expanded by -frewrite-includes */ # include /* we need int32_t... */ #endif /* expanded by -frewrite-includes */ # 314 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 1 3 /* Copyright (C) 1991,1992,1994-2002,2006,2010 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 2.6 Primitive System Data Types */ #ifndef _SYS_TYPES_H #define _SYS_TYPES_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 25 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 __BEGIN_DECLS #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 29 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 # 30 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #ifdef __USE_BSD # ifndef __u_char_defined typedef __u_char u_char; typedef __u_short u_short; typedef __u_int u_int; typedef __u_long u_long; typedef __quad_t quad_t; typedef __u_quad_t u_quad_t; typedef __fsid_t fsid_t; # define __u_char_defined # endif # 42 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #endif # 43 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 typedef __loff_t loff_t; #ifndef __ino_t_defined # ifndef __USE_FILE_OFFSET64 typedef __ino_t ino_t; # else # 50 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 typedef __ino64_t ino_t; # endif # 52 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 # define __ino_t_defined #endif # 54 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #if defined __USE_LARGEFILE64 && !defined __ino64_t_defined typedef __ino64_t ino64_t; # define __ino64_t_defined #endif # 58 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #ifndef __dev_t_defined typedef __dev_t dev_t; # define __dev_t_defined #endif # 63 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #ifndef __gid_t_defined typedef __gid_t gid_t; # define __gid_t_defined #endif # 68 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #ifndef __mode_t_defined typedef __mode_t mode_t; # define __mode_t_defined #endif # 73 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #ifndef __nlink_t_defined typedef __nlink_t nlink_t; # define __nlink_t_defined #endif # 78 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #ifndef __uid_t_defined typedef __uid_t uid_t; # define __uid_t_defined #endif # 83 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #ifndef __off_t_defined # ifndef __USE_FILE_OFFSET64 typedef __off_t off_t; # else # 88 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 typedef __off64_t off_t; # endif # 90 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 # define __off_t_defined #endif # 92 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #if defined __USE_LARGEFILE64 && !defined __off64_t_defined typedef __off64_t off64_t; # define __off64_t_defined #endif # 96 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #ifndef __pid_t_defined typedef __pid_t pid_t; # define __pid_t_defined #endif # 101 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #if (defined __USE_SVID || defined __USE_XOPEN || defined __USE_XOPEN2K8) \ && !defined __id_t_defined typedef __id_t id_t; # define __id_t_defined #endif # 107 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #ifndef __ssize_t_defined typedef __ssize_t ssize_t; # define __ssize_t_defined #endif # 112 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #ifdef __USE_BSD # ifndef __daddr_t_defined typedef __daddr_t daddr_t; typedef __caddr_t caddr_t; # define __daddr_t_defined # endif # 119 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #endif # 120 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #if (defined __USE_SVID || defined __USE_XOPEN) && !defined __key_t_defined typedef __key_t key_t; # define __key_t_defined #endif # 125 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #if defined __USE_XOPEN || defined __USE_XOPEN2K8 # define __need_clock_t #endif # 129 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #define __need_time_t #define __need_timer_t #define __need_clockid_t #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 132 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 1 3 /* Copyright (C) 1991-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.23 Date and time */ #ifndef _TIME_H #if (! defined __need_time_t && !defined __need_clock_t && \ ! defined __need_timespec) # define _TIME_H 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_DECLS #endif # 32 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #ifdef _TIME_H /* Get size_t and NULL from . */ # define __need_size_t # define __need_NULL #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 37 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 38 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* This defines CLOCKS_PER_SEC, which is the number of processor clock ticks per second. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 41 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 42 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* This is the obsolete POSIX.1-1988 name for the same constant. */ # if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K # ifndef CLK_TCK # define CLK_TCK CLOCKS_PER_SEC # endif # 48 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # endif # 49 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #endif /* included. */ # 51 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #if !defined __clock_t_defined && (defined _TIME_H || defined __need_clock_t) # define __clock_t_defined 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 55 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 56 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Returned by `clock'. */ typedef __clock_t clock_t; __END_NAMESPACE_STD #if defined __USE_XOPEN || defined __USE_POSIX || defined __USE_MISC __USING_NAMESPACE_STD(clock_t) #endif # 64 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #endif /* clock_t not defined and or need clock_t. */ # 66 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __need_clock_t #if !defined __time_t_defined && (defined _TIME_H || defined __need_time_t) # define __time_t_defined 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 71 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 72 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Returned by `time'. */ typedef __time_t time_t; __END_NAMESPACE_STD #if defined __USE_POSIX || defined __USE_MISC || defined __USE_SVID __USING_NAMESPACE_STD(time_t) #endif # 80 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #endif /* time_t not defined and or need time_t. */ # 82 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __need_time_t #if !defined __clockid_t_defined && \ ((defined _TIME_H && defined __USE_POSIX199309) || defined __need_clockid_t) # define __clockid_t_defined 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 88 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 89 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Clock ID used in clock and timer functions. */ typedef __clockid_t clockid_t; #endif /* clockid_t not defined and or need clockid_t. */ # 94 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __clockid_time_t #if !defined __timer_t_defined && \ ((defined _TIME_H && defined __USE_POSIX199309) || defined __need_timer_t) # define __timer_t_defined 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 100 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 101 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Timer ID returned by `timer_create'. */ typedef __timer_t timer_t; #endif /* timer_t not defined and or need timer_t. */ # 106 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __need_timer_t #if (!defined __timespec_defined \ && ((defined _TIME_H \ && (defined __USE_POSIX199309 || defined __USE_MISC \ || defined __USE_ISOC11)) \ || defined __need_timespec)) # define __timespec_defined 1 #if 0 /* expanded by -frewrite-includes */ # include /* This defines __time_t for us. */ #endif /* expanded by -frewrite-includes */ # 116 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 117 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* POSIX.1b structure for a time value. This is like a `struct timeval' but has nanoseconds instead of microseconds. */ struct timespec { __time_t tv_sec; /* Seconds. */ __syscall_slong_t tv_nsec; /* Nanoseconds. */ }; #endif /* timespec not defined and or need timespec. */ # 127 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __need_timespec #ifdef _TIME_H __BEGIN_NAMESPACE_STD /* Used by other time functions. */ struct tm { int tm_sec; /* Seconds. [0-60] (1 leap second) */ int tm_min; /* Minutes. [0-59] */ int tm_hour; /* Hours. [0-23] */ int tm_mday; /* Day. [1-31] */ int tm_mon; /* Month. [0-11] */ int tm_year; /* Year - 1900. */ int tm_wday; /* Day of week. [0-6] */ int tm_yday; /* Days in year.[0-365] */ int tm_isdst; /* DST. [-1/0/1]*/ # ifdef __USE_BSD long int tm_gmtoff; /* Seconds east of UTC. */ const char *tm_zone; /* Timezone abbreviation. */ # else # 149 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 long int __tm_gmtoff; /* Seconds east of UTC. */ const char *__tm_zone; /* Timezone abbreviation. */ # endif # 152 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 }; __END_NAMESPACE_STD #if defined __USE_XOPEN || defined __USE_POSIX || defined __USE_MISC __USING_NAMESPACE_STD(tm) #endif # 157 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_POSIX199309 /* POSIX.1b structure for timer start values and intervals. */ struct itimerspec { struct timespec it_interval; struct timespec it_value; }; /* We can use a simple forward declaration. */ struct sigevent; # endif /* POSIX.1b */ # 171 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_XOPEN2K # ifndef __pid_t_defined typedef __pid_t pid_t; # define __pid_t_defined # endif # 177 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # endif # 178 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_ISOC11 /* Time base values for timespec_get. */ # define TIME_UTC 1 # endif # 184 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Time used by the program so far (user time + system time). The result / CLOCKS_PER_SECOND is program time in seconds. */ extern clock_t clock (void) __THROW; /* Return the current time and put it in *TIMER if TIMER is not NULL. */ extern time_t time (time_t *__timer) __THROW; /* Return the difference between TIME1 and TIME0. */ extern double difftime (time_t __time1, time_t __time0) __THROW __attribute__ ((__const__)); /* Return the `time_t' representation of TP and normalize TP. */ extern time_t mktime (struct tm *__tp) __THROW; /* Format TP into S according to FORMAT. Write no more than MAXSIZE characters and return the number of characters written, or 0 if it would exceed MAXSIZE. */ extern size_t strftime (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp) __THROW; __END_NAMESPACE_STD # ifdef __USE_XOPEN /* Parse S according to FORMAT and store binary time information in TP. The return value is a pointer to the first unparsed character in S. */ extern char *strptime (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp) __THROW; # endif # 217 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_XOPEN2K8 /* Similar to the two functions above but take the information from the provided locale and not the global locale. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 221 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 222 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 extern size_t strftime_l (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp, __locale_t __loc) __THROW; # endif # 228 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_GNU extern char *strptime_l (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp, __locale_t __loc) __THROW; # endif # 234 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Return the `struct tm' representation of *TIMER in Universal Coordinated Time (aka Greenwich Mean Time). */ extern struct tm *gmtime (const time_t *__timer) __THROW; /* Return the `struct tm' representation of *TIMER in the local timezone. */ extern struct tm *localtime (const time_t *__timer) __THROW; __END_NAMESPACE_STD # if defined __USE_POSIX || defined __USE_MISC /* Return the `struct tm' representation of *TIMER in UTC, using *TP to store the result. */ extern struct tm *gmtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) __THROW; /* Return the `struct tm' representation of *TIMER in local time, using *TP to store the result. */ extern struct tm *localtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) __THROW; # endif /* POSIX or misc */ # 257 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ extern char *asctime (const struct tm *__tp) __THROW; /* Equivalent to `asctime (localtime (timer))'. */ extern char *ctime (const time_t *__timer) __THROW; __END_NAMESPACE_STD # if defined __USE_POSIX || defined __USE_MISC /* Reentrant versions of the above functions. */ /* Return in BUF a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ extern char *asctime_r (const struct tm *__restrict __tp, char *__restrict __buf) __THROW; /* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */ extern char *ctime_r (const time_t *__restrict __timer, char *__restrict __buf) __THROW; # endif /* POSIX or misc */ # 279 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Defined in localtime.c. */ extern char *__tzname[2]; /* Current timezone names. */ extern int __daylight; /* If daylight-saving time is ever in use. */ extern long int __timezone; /* Seconds west of UTC. */ # ifdef __USE_POSIX /* Same as above. */ extern char *tzname[2]; /* Set time conversion information from the TZ environment variable. If TZ is not defined, a locale-dependent default is used. */ extern void tzset (void) __THROW; # endif # 295 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # if defined __USE_SVID || defined __USE_XOPEN extern int daylight; extern long int timezone; # endif # 300 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_SVID /* Set the system time to *WHEN. This call is restricted to the superuser. */ extern int stime (const time_t *__when) __THROW; # endif # 306 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Nonzero if YEAR is a leap year (every 4 years, except every 100th isn't, and every 400th is). */ # define __isleap(year) \ ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) # ifdef __USE_MISC /* Miscellaneous functions many Unices inherited from the public domain localtime package. These are included only for compatibility. */ /* Like `mktime', but for TP represents Universal Time, not local time. */ extern time_t timegm (struct tm *__tp) __THROW; /* Another name for `mktime'. */ extern time_t timelocal (struct tm *__tp) __THROW; /* Return the number of days in YEAR. */ extern int dysize (int __year) __THROW __attribute__ ((__const__)); # endif # 327 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_POSIX199309 /* Pause execution for a number of nanoseconds. This function is a cancellation point and therefore not marked with __THROW. */ extern int nanosleep (const struct timespec *__requested_time, struct timespec *__remaining); /* Get resolution of clock CLOCK_ID. */ extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __THROW; /* Get current value of clock CLOCK_ID and store it in TP. */ extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW; /* Set clock CLOCK_ID to value TP. */ extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp) __THROW; # ifdef __USE_XOPEN2K /* High-resolution sleep with the specified clock. This function is a cancellation point and therefore not marked with __THROW. */ extern int clock_nanosleep (clockid_t __clock_id, int __flags, const struct timespec *__req, struct timespec *__rem); /* Return clock ID for CPU-time clock. */ extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW; # endif # 360 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Create new per-process timer using CLOCK_ID. */ extern int timer_create (clockid_t __clock_id, struct sigevent *__restrict __evp, timer_t *__restrict __timerid) __THROW; /* Delete timer TIMERID. */ extern int timer_delete (timer_t __timerid) __THROW; /* Set timer TIMERID to VALUE, returning old value in OVALUE. */ extern int timer_settime (timer_t __timerid, int __flags, const struct itimerspec *__restrict __value, struct itimerspec *__restrict __ovalue) __THROW; /* Get current value of timer TIMERID and store it in VALUE. */ extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) __THROW; /* Get expiration overrun for timer TIMERID. */ extern int timer_getoverrun (timer_t __timerid) __THROW; # endif # 382 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_ISOC11 /* Set TS to calendar time based in time base BASE. */ extern int timespec_get (struct timespec *__ts, int __base) __THROW __nonnull ((1)); # endif # 389 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_XOPEN_EXTENDED /* Set to one of the following values to indicate an error. 1 the DATEMSK environment variable is null or undefined, 2 the template file cannot be opened for reading, 3 failed to get file status information, 4 the template file is not a regular file, 5 an error is encountered while reading the template file, 6 memory allication failed (not enough memory available), 7 there is no line in the template that matches the input, 8 invalid input specification Example: February 31 or a time is specified that can not be represented in a time_t (representing the time in seconds since 00:00:00 UTC, January 1, 1970) */ extern int getdate_err; /* Parse the given string as a date specification and return a value representing the value. The templates from the file identified by the environment variable DATEMSK are used. In case of an error `getdate_err' is set. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct tm *getdate (const char *__string); # endif # 414 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_GNU /* Since `getdate' is not reentrant because of the use of `getdate_err' and the static buffer to return the result in, we provide a thread-safe variant. The functionality is the same. The result is returned in the buffer pointed to by RESBUFP and in case of an error the return value is != 0 with the same values as given above for `getdate_err'. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int getdate_r (const char *__restrict __string, struct tm *__restrict __resbufp); # endif # 429 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __END_DECLS #endif /* included. */ # 433 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #endif /* not already included. */ # 435 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 133 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 2 3 #ifdef __USE_XOPEN # ifndef __useconds_t_defined typedef __useconds_t useconds_t; # define __useconds_t_defined # endif # 139 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 # ifndef __suseconds_t_defined typedef __suseconds_t suseconds_t; # define __suseconds_t_defined # endif # 143 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #endif # 144 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #define __need_size_t #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 146 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 # 1 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 1 3 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) /* Always define miscellaneous pieces when modules are available. */ #if !__has_feature(modules) #define __STDDEF_H #endif # 37 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 44 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_ptrdiff_t) #if !defined(_PTRDIFF_T) || __has_feature(modules) /* Always define ptrdiff_t when modules are available. */ #if !__has_feature(modules) #define _PTRDIFF_T #endif # 51 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 53 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 55 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_size_t) #if !defined(_SIZE_T) || __has_feature(modules) /* Always define size_t when modules are available. */ #if !__has_feature(modules) #define _SIZE_T #endif # 62 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ size_t; #endif # 64 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_size_t #endif /*defined(__need_size_t) */ # 66 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) /* Always define rsize_t when modules are available. */ #if !__has_feature(modules) #define _RSIZE_T #endif # 76 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ rsize_t; #endif # 78 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif /* defined(__need_STDDEF_H_misc) */ # 79 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_wchar_t) #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if !defined(_WCHAR_T) || __has_feature(modules) #if !__has_feature(modules) #define _WCHAR_T #if defined(_MSC_EXTENSIONS) #define _WCHAR_T_DEFINED #endif # 89 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 90 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WCHAR_TYPE__ wchar_t; #endif # 92 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 93 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 95 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_NULL) #undef NULL #ifdef __cplusplus # if !defined(__MINGW32__) && !defined(_MSC_VER) # define NULL __null # else # 102 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL 0 # endif # 104 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #else # 105 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL ((void*)0) #endif # 107 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #ifdef __cplusplus #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 112 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 113 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_NULL #endif /* defined(__need_NULL) */ # 115 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 118 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 119 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 120 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 123 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if defined(__need_wint_t) /* Always define wint_t when modules are available. */ #if !defined(_WINT_T) || __has_feature(modules) #if !__has_feature(modules) #define _WINT_T #endif # 132 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WINT_TYPE__ wint_t; #endif # 134 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wint_t #endif /* __need_wint_t */ # 136 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 138 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 147 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 2 3 #ifdef __USE_MISC /* Old compatibility names for C types. */ typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; #endif # 154 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 /* These size-specific names are used by some of the inet code. */ #if !__GNUC_PREREQ (2, 7) /* These types are defined by the ISO C99 header . */ # ifndef __int8_t_defined # define __int8_t_defined typedef char int8_t; typedef short int int16_t; typedef int int32_t; # if __WORDSIZE == 64 typedef long int int64_t; # elif __GLIBC_HAVE_LONG_LONG # 168 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 __extension__ typedef long long int int64_t; # endif # 170 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 # endif # 171 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 /* But these were defined by ISO C without the first `_'. */ typedef unsigned char u_int8_t; typedef unsigned short int u_int16_t; typedef unsigned int u_int32_t; # if __WORDSIZE == 64 typedef unsigned long int u_int64_t; # elif __GLIBC_HAVE_LONG_LONG # 179 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 __extension__ typedef unsigned long long int u_int64_t; # endif # 181 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 typedef int register_t; #else # 185 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 /* For GCC 2.7 and later, we can use specific type-size attributes. */ # define __intN_t(N, MODE) \ typedef int int##N##_t __attribute__ ((__mode__ (MODE))) # define __u_intN_t(N, MODE) \ typedef unsigned int u_int##N##_t __attribute__ ((__mode__ (MODE))) # ifndef __int8_t_defined # define __int8_t_defined __intN_t (8, __QI__); __intN_t (16, __HI__); __intN_t (32, __SI__); __intN_t (64, __DI__); # endif # 199 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 __u_intN_t (8, __QI__); __u_intN_t (16, __HI__); __u_intN_t (32, __SI__); __u_intN_t (64, __DI__); typedef int register_t __attribute__ ((__mode__ (__word__))); /* Some code from BIND tests this macro to see if the types above are defined. */ #endif # 211 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #define __BIT_TYPES_DEFINED__ 1 #ifdef __USE_BSD /* In BSD is expected to define BYTE_ORDER. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 216 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 # 217 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 /* It also defines `fd_set' and the FD_* macros for `select'. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 219 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/select.h" 1 3 /* `fd_set' type and related macros, and `select'/`pselect' declarations. Copyright (C) 1996-2003, 2009, 2011 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* POSIX 1003.1g: 6.2 Select from File Descriptor Sets */ #ifndef _SYS_SELECT_H #define _SYS_SELECT_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 24 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/select.h" 3 # 25 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/select.h" 3 /* Get definition of needed basic types. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/select.h" 3 # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/select.h" 3 /* Get __FD_* definitions. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 30 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/select.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/select.h" 1 3 /* Copyright (C) 1997, 1998, 2001, 2011 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_SELECT_H # error "Never use directly; include instead." #endif # 21 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/select.h" 3 /* We don't use `memset' because this would require a prototype and the array isn't too big. */ #define __FD_ZERO(s) \ do { \ unsigned int __i; \ fd_set *__arr = (s); \ for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) \ __FDS_BITS (__arr)[__i] = 0; \ } while (0) #define __FD_SET(d, s) \ ((void) (__FDS_BITS (s)[__FD_ELT(d)] |= __FD_MASK(d))) #define __FD_CLR(d, s) \ ((void) (__FDS_BITS (s)[__FD_ELT(d)] &= ~__FD_MASK(d))) #define __FD_ISSET(d, s) \ ((__FDS_BITS (s)[__FD_ELT (d)] & __FD_MASK (d)) != 0) # 31 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/select.h" 2 3 /* Get __sigset_t. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 33 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/select.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigset.h" 1 3 /* __sig_atomic_t, __sigset_t, and related definitions. Linux version. Copyright (C) 1991, 1992, 1994, 1996, 1997, 2007, 2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SIGSET_H_types # define _SIGSET_H_types 1 typedef int __sig_atomic_t; /* A `sigset_t' has a bit for each signal. */ # define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) typedef struct { unsigned long int __val[_SIGSET_NWORDS]; } __sigset_t; #endif # 34 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigset.h" 3 /* We only want to define these functions if was actually included; otherwise we were included just to define the types. Since we are namespace-clean, it wouldn't hurt to define extra macros. But trouble can be caused by functions being defined (e.g., any global register vars declared later will cause compilation errors). */ #if !defined _SIGSET_H_fns && defined _SIGNAL_H # define _SIGSET_H_fns 1 # ifndef _EXTERN_INLINE # define _EXTERN_INLINE __extern_inline # endif # 48 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigset.h" 3 /* Return a mask that includes the bit for SIG only. */ # define __sigmask(sig) \ (((unsigned long int) 1) << (((sig) - 1) % (8 * sizeof (unsigned long int)))) /* Return the word index for SIG. */ # define __sigword(sig) (((sig) - 1) / (8 * sizeof (unsigned long int))) # if defined __GNUC__ && __GNUC__ >= 2 # define __sigemptyset(set) \ (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ sigset_t *__set = (set); \ while (--__cnt >= 0) __set->__val[__cnt] = 0; \ 0; })) # define __sigfillset(set) \ (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ sigset_t *__set = (set); \ while (--__cnt >= 0) __set->__val[__cnt] = ~0UL; \ 0; })) # ifdef __USE_GNU /* The POSIX does not specify for handling the whole signal set in one command. This is often wanted and so we define three more functions here. */ # define __sigisemptyset(set) \ (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ const sigset_t *__set = (set); \ int __ret = __set->__val[--__cnt]; \ while (!__ret && --__cnt >= 0) \ __ret = __set->__val[__cnt]; \ __ret == 0; })) # define __sigandset(dest, left, right) \ (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ sigset_t *__dest = (dest); \ const sigset_t *__left = (left); \ const sigset_t *__right = (right); \ while (--__cnt >= 0) \ __dest->__val[__cnt] = (__left->__val[__cnt] \ & __right->__val[__cnt]); \ 0; })) # define __sigorset(dest, left, right) \ (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ sigset_t *__dest = (dest); \ const sigset_t *__left = (left); \ const sigset_t *__right = (right); \ while (--__cnt >= 0) \ __dest->__val[__cnt] = (__left->__val[__cnt] \ | __right->__val[__cnt]); \ 0; })) # endif # 98 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigset.h" 3 # endif # 99 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigset.h" 3 /* These functions needn't check for a bogus signal number -- error checking is done in the non __ versions. */ extern int __sigismember (const __sigset_t *, int); extern int __sigaddset (__sigset_t *, int); extern int __sigdelset (__sigset_t *, int); # ifdef __USE_EXTERN_INLINES # define __SIGSETFN(NAME, BODY, CONST) \ _EXTERN_INLINE int \ NAME (CONST __sigset_t *__set, int __sig) \ { \ unsigned long int __mask = __sigmask (__sig); \ unsigned long int __word = __sigword (__sig); \ return BODY; \ } __SIGSETFN (__sigismember, (__set->__val[__word] & __mask) ? 1 : 0, const) __SIGSETFN (__sigaddset, ((__set->__val[__word] |= __mask), 0), ) __SIGSETFN (__sigdelset, ((__set->__val[__word] &= ~__mask), 0), ) # undef __SIGSETFN # endif # 123 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigset.h" 3 #endif /* ! _SIGSET_H_fns. */ # 126 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigset.h" 3 # 34 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/select.h" 2 3 #ifndef __sigset_t_defined # define __sigset_t_defined typedef __sigset_t sigset_t; #endif # 39 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/select.h" 3 /* Get definition of timer specification structures. */ #define __need_time_t #define __need_timespec #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 43 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/select.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 1 3 /* Copyright (C) 1991-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.23 Date and time */ #ifndef _TIME_H #if (! defined __need_time_t && !defined __need_clock_t && \ ! defined __need_timespec) # define _TIME_H 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_DECLS #endif # 32 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #ifdef _TIME_H /* Get size_t and NULL from . */ # define __need_size_t # define __need_NULL #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 37 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 38 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* This defines CLOCKS_PER_SEC, which is the number of processor clock ticks per second. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 41 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 42 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* This is the obsolete POSIX.1-1988 name for the same constant. */ # if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K # ifndef CLK_TCK # define CLK_TCK CLOCKS_PER_SEC # endif # 48 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # endif # 49 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #endif /* included. */ # 51 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #if !defined __clock_t_defined && (defined _TIME_H || defined __need_clock_t) # define __clock_t_defined 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 55 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 56 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Returned by `clock'. */ typedef __clock_t clock_t; __END_NAMESPACE_STD #if defined __USE_XOPEN || defined __USE_POSIX || defined __USE_MISC __USING_NAMESPACE_STD(clock_t) #endif # 64 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #endif /* clock_t not defined and or need clock_t. */ # 66 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __need_clock_t #if !defined __time_t_defined && (defined _TIME_H || defined __need_time_t) # define __time_t_defined 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 71 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 72 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Returned by `time'. */ typedef __time_t time_t; __END_NAMESPACE_STD #if defined __USE_POSIX || defined __USE_MISC || defined __USE_SVID __USING_NAMESPACE_STD(time_t) #endif # 80 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #endif /* time_t not defined and or need time_t. */ # 82 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __need_time_t #if !defined __clockid_t_defined && \ ((defined _TIME_H && defined __USE_POSIX199309) || defined __need_clockid_t) # define __clockid_t_defined 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 88 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 89 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Clock ID used in clock and timer functions. */ typedef __clockid_t clockid_t; #endif /* clockid_t not defined and or need clockid_t. */ # 94 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __clockid_time_t #if !defined __timer_t_defined && \ ((defined _TIME_H && defined __USE_POSIX199309) || defined __need_timer_t) # define __timer_t_defined 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 100 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 101 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Timer ID returned by `timer_create'. */ typedef __timer_t timer_t; #endif /* timer_t not defined and or need timer_t. */ # 106 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __need_timer_t #if (!defined __timespec_defined \ && ((defined _TIME_H \ && (defined __USE_POSIX199309 || defined __USE_MISC \ || defined __USE_ISOC11)) \ || defined __need_timespec)) # define __timespec_defined 1 #if 0 /* expanded by -frewrite-includes */ # include /* This defines __time_t for us. */ #endif /* expanded by -frewrite-includes */ # 116 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 117 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* POSIX.1b structure for a time value. This is like a `struct timeval' but has nanoseconds instead of microseconds. */ struct timespec { __time_t tv_sec; /* Seconds. */ __syscall_slong_t tv_nsec; /* Nanoseconds. */ }; #endif /* timespec not defined and or need timespec. */ # 127 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __need_timespec #ifdef _TIME_H __BEGIN_NAMESPACE_STD /* Used by other time functions. */ struct tm { int tm_sec; /* Seconds. [0-60] (1 leap second) */ int tm_min; /* Minutes. [0-59] */ int tm_hour; /* Hours. [0-23] */ int tm_mday; /* Day. [1-31] */ int tm_mon; /* Month. [0-11] */ int tm_year; /* Year - 1900. */ int tm_wday; /* Day of week. [0-6] */ int tm_yday; /* Days in year.[0-365] */ int tm_isdst; /* DST. [-1/0/1]*/ # ifdef __USE_BSD long int tm_gmtoff; /* Seconds east of UTC. */ const char *tm_zone; /* Timezone abbreviation. */ # else # 149 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 long int __tm_gmtoff; /* Seconds east of UTC. */ const char *__tm_zone; /* Timezone abbreviation. */ # endif # 152 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 }; __END_NAMESPACE_STD #if defined __USE_XOPEN || defined __USE_POSIX || defined __USE_MISC __USING_NAMESPACE_STD(tm) #endif # 157 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_POSIX199309 /* POSIX.1b structure for timer start values and intervals. */ struct itimerspec { struct timespec it_interval; struct timespec it_value; }; /* We can use a simple forward declaration. */ struct sigevent; # endif /* POSIX.1b */ # 171 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_XOPEN2K # ifndef __pid_t_defined typedef __pid_t pid_t; # define __pid_t_defined # endif # 177 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # endif # 178 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_ISOC11 /* Time base values for timespec_get. */ # define TIME_UTC 1 # endif # 184 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Time used by the program so far (user time + system time). The result / CLOCKS_PER_SECOND is program time in seconds. */ extern clock_t clock (void) __THROW; /* Return the current time and put it in *TIMER if TIMER is not NULL. */ extern time_t time (time_t *__timer) __THROW; /* Return the difference between TIME1 and TIME0. */ extern double difftime (time_t __time1, time_t __time0) __THROW __attribute__ ((__const__)); /* Return the `time_t' representation of TP and normalize TP. */ extern time_t mktime (struct tm *__tp) __THROW; /* Format TP into S according to FORMAT. Write no more than MAXSIZE characters and return the number of characters written, or 0 if it would exceed MAXSIZE. */ extern size_t strftime (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp) __THROW; __END_NAMESPACE_STD # ifdef __USE_XOPEN /* Parse S according to FORMAT and store binary time information in TP. The return value is a pointer to the first unparsed character in S. */ extern char *strptime (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp) __THROW; # endif # 217 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_XOPEN2K8 /* Similar to the two functions above but take the information from the provided locale and not the global locale. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 221 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 222 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 extern size_t strftime_l (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp, __locale_t __loc) __THROW; # endif # 228 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_GNU extern char *strptime_l (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp, __locale_t __loc) __THROW; # endif # 234 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Return the `struct tm' representation of *TIMER in Universal Coordinated Time (aka Greenwich Mean Time). */ extern struct tm *gmtime (const time_t *__timer) __THROW; /* Return the `struct tm' representation of *TIMER in the local timezone. */ extern struct tm *localtime (const time_t *__timer) __THROW; __END_NAMESPACE_STD # if defined __USE_POSIX || defined __USE_MISC /* Return the `struct tm' representation of *TIMER in UTC, using *TP to store the result. */ extern struct tm *gmtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) __THROW; /* Return the `struct tm' representation of *TIMER in local time, using *TP to store the result. */ extern struct tm *localtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) __THROW; # endif /* POSIX or misc */ # 257 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ extern char *asctime (const struct tm *__tp) __THROW; /* Equivalent to `asctime (localtime (timer))'. */ extern char *ctime (const time_t *__timer) __THROW; __END_NAMESPACE_STD # if defined __USE_POSIX || defined __USE_MISC /* Reentrant versions of the above functions. */ /* Return in BUF a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ extern char *asctime_r (const struct tm *__restrict __tp, char *__restrict __buf) __THROW; /* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */ extern char *ctime_r (const time_t *__restrict __timer, char *__restrict __buf) __THROW; # endif /* POSIX or misc */ # 279 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Defined in localtime.c. */ extern char *__tzname[2]; /* Current timezone names. */ extern int __daylight; /* If daylight-saving time is ever in use. */ extern long int __timezone; /* Seconds west of UTC. */ # ifdef __USE_POSIX /* Same as above. */ extern char *tzname[2]; /* Set time conversion information from the TZ environment variable. If TZ is not defined, a locale-dependent default is used. */ extern void tzset (void) __THROW; # endif # 295 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # if defined __USE_SVID || defined __USE_XOPEN extern int daylight; extern long int timezone; # endif # 300 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_SVID /* Set the system time to *WHEN. This call is restricted to the superuser. */ extern int stime (const time_t *__when) __THROW; # endif # 306 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Nonzero if YEAR is a leap year (every 4 years, except every 100th isn't, and every 400th is). */ # define __isleap(year) \ ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) # ifdef __USE_MISC /* Miscellaneous functions many Unices inherited from the public domain localtime package. These are included only for compatibility. */ /* Like `mktime', but for TP represents Universal Time, not local time. */ extern time_t timegm (struct tm *__tp) __THROW; /* Another name for `mktime'. */ extern time_t timelocal (struct tm *__tp) __THROW; /* Return the number of days in YEAR. */ extern int dysize (int __year) __THROW __attribute__ ((__const__)); # endif # 327 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_POSIX199309 /* Pause execution for a number of nanoseconds. This function is a cancellation point and therefore not marked with __THROW. */ extern int nanosleep (const struct timespec *__requested_time, struct timespec *__remaining); /* Get resolution of clock CLOCK_ID. */ extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __THROW; /* Get current value of clock CLOCK_ID and store it in TP. */ extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW; /* Set clock CLOCK_ID to value TP. */ extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp) __THROW; # ifdef __USE_XOPEN2K /* High-resolution sleep with the specified clock. This function is a cancellation point and therefore not marked with __THROW. */ extern int clock_nanosleep (clockid_t __clock_id, int __flags, const struct timespec *__req, struct timespec *__rem); /* Return clock ID for CPU-time clock. */ extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW; # endif # 360 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Create new per-process timer using CLOCK_ID. */ extern int timer_create (clockid_t __clock_id, struct sigevent *__restrict __evp, timer_t *__restrict __timerid) __THROW; /* Delete timer TIMERID. */ extern int timer_delete (timer_t __timerid) __THROW; /* Set timer TIMERID to VALUE, returning old value in OVALUE. */ extern int timer_settime (timer_t __timerid, int __flags, const struct itimerspec *__restrict __value, struct itimerspec *__restrict __ovalue) __THROW; /* Get current value of timer TIMERID and store it in VALUE. */ extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) __THROW; /* Get expiration overrun for timer TIMERID. */ extern int timer_getoverrun (timer_t __timerid) __THROW; # endif # 382 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_ISOC11 /* Set TS to calendar time based in time base BASE. */ extern int timespec_get (struct timespec *__ts, int __base) __THROW __nonnull ((1)); # endif # 389 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_XOPEN_EXTENDED /* Set to one of the following values to indicate an error. 1 the DATEMSK environment variable is null or undefined, 2 the template file cannot be opened for reading, 3 failed to get file status information, 4 the template file is not a regular file, 5 an error is encountered while reading the template file, 6 memory allication failed (not enough memory available), 7 there is no line in the template that matches the input, 8 invalid input specification Example: February 31 or a time is specified that can not be represented in a time_t (representing the time in seconds since 00:00:00 UTC, January 1, 1970) */ extern int getdate_err; /* Parse the given string as a date specification and return a value representing the value. The templates from the file identified by the environment variable DATEMSK are used. In case of an error `getdate_err' is set. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct tm *getdate (const char *__string); # endif # 414 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_GNU /* Since `getdate' is not reentrant because of the use of `getdate_err' and the static buffer to return the result in, we provide a thread-safe variant. The functionality is the same. The result is returned in the buffer pointed to by RESBUFP and in case of an error the return value is != 0 with the same values as given above for `getdate_err'. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int getdate_r (const char *__restrict __string, struct tm *__restrict __resbufp); # endif # 429 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __END_DECLS #endif /* included. */ # 433 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #endif /* not already included. */ # 435 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 44 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/select.h" 2 3 #define __need_timeval #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 45 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/select.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 1 3 /* System-dependent timing definitions. Linux version. Copyright (C) 1996,1997,1999-2003,2010,2011,2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ #if defined __need_timeval || defined __USE_GNU # ifndef _STRUCT_TIMEVAL # define _STRUCT_TIMEVAL 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 /* A time value that is accurate to the nearest microsecond but also has a range of years. */ struct timeval { __time_t tv_sec; /* Seconds. */ __suseconds_t tv_usec; /* Microseconds. */ }; # endif /* struct timeval */ # 36 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 #endif # 37 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 #ifndef __need_timeval # ifndef _BITS_TIME_H # define _BITS_TIME_H 1 /* ISO/IEC 9899:1990 7.12.1: The macro `CLOCKS_PER_SEC' is the number per second of the value returned by the `clock' function. */ /* CAE XSH, Issue 4, Version 2: The value of CLOCKS_PER_SEC is required to be 1 million on all XSI-conformant systems. */ # define CLOCKS_PER_SEC 1000000l # if (!defined __STRICT_ANSI__ || defined __USE_POSIX) \ && !defined __USE_XOPEN2K /* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK presents the real value for clock ticks per second for the system. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 54 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 # 55 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 extern long int __sysconf (int); # define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */ # endif # 58 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 # ifdef __USE_POSIX199309 /* Identifier for system-wide realtime clock. */ # define CLOCK_REALTIME 0 /* Monotonic system-wide clock. */ # define CLOCK_MONOTONIC 1 /* High-resolution timer from the CPU. */ # define CLOCK_PROCESS_CPUTIME_ID 2 /* Thread-specific CPU-time clock. */ # define CLOCK_THREAD_CPUTIME_ID 3 /* Monotonic system-wide clock, not adjusted for frequency scaling. */ # define CLOCK_MONOTONIC_RAW 4 /* Identifier for system-wide realtime clock, updated only on ticks. */ # define CLOCK_REALTIME_COARSE 5 /* Monotonic system-wide clock, updated only on ticks. */ # define CLOCK_MONOTONIC_COARSE 6 /* Monotonic system-wide clock that includes time spent in suspension. */ # define CLOCK_BOOTTIME 7 /* Like CLOCK_REALTIME but also wakes suspended system. */ # define CLOCK_REALTIME_ALARM 8 /* Like CLOCK_BOOTTIME but also wakes suspended system. */ # define CLOCK_BOOTTIME_ALARM 9 /* Flag to indicate time is absolute. */ # define TIMER_ABSTIME 1 # endif # 84 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 # ifdef __USE_GNU #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 86 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 # 87 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 __BEGIN_DECLS /* Tune a POSIX clock. */ extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW; __END_DECLS # endif /* use GNU */ # 95 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 # endif /* bits/time.h */ # 97 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 #endif # 98 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 #undef __need_timeval # 46 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/select.h" 2 3 #ifndef __suseconds_t_defined typedef __suseconds_t suseconds_t; # define __suseconds_t_defined #endif # 51 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/select.h" 3 /* The fd_set member is required to be an array of longs. */ typedef long int __fd_mask; /* Some versions of define this macros. */ #undef __NFDBITS /* It's easier to assume 8-bit bytes than to get CHAR_BIT. */ #define __NFDBITS (8 * (int) sizeof (__fd_mask)) #define __FD_ELT(d) ((d) / __NFDBITS) #define __FD_MASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS)) /* fd_set for select and pselect. */ typedef struct { /* XPG4.2 requires this member name. Otherwise avoid the name from the global namespace. */ #ifdef __USE_XOPEN __fd_mask fds_bits[__FD_SETSIZE / __NFDBITS]; # define __FDS_BITS(set) ((set)->fds_bits) #else # 72 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/select.h" 3 __fd_mask __fds_bits[__FD_SETSIZE / __NFDBITS]; # define __FDS_BITS(set) ((set)->__fds_bits) #endif # 75 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/select.h" 3 } fd_set; /* Maximum number of file descriptors in `fd_set'. */ #define FD_SETSIZE __FD_SETSIZE #ifdef __USE_MISC /* Sometimes the fd_set member is assumed to have this type. */ typedef __fd_mask fd_mask; /* Number of bits per word of `fd_set' (some code assumes this is 32). */ # define NFDBITS __NFDBITS #endif # 87 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/select.h" 3 /* Access macros for `fd_set'. */ #define FD_SET(fd, fdsetp) __FD_SET (fd, fdsetp) #define FD_CLR(fd, fdsetp) __FD_CLR (fd, fdsetp) #define FD_ISSET(fd, fdsetp) __FD_ISSET (fd, fdsetp) #define FD_ZERO(fdsetp) __FD_ZERO (fdsetp) __BEGIN_DECLS /* Check the first NFDS descriptors each in READFDS (if not NULL) for read readiness, in WRITEFDS (if not NULL) for write readiness, and in EXCEPTFDS (if not NULL) for exceptional conditions. If TIMEOUT is not NULL, time out after waiting the interval specified therein. Returns the number of ready descriptors, or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern int select (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, struct timeval *__restrict __timeout); #ifdef __USE_XOPEN2K /* Same as above only that the TIMEOUT value is given with higher resolution and a sigmask which is been set temporarily. This version should be used. This function is a cancellation point and therefore not marked with __THROW. */ extern int pselect (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, const struct timespec *__restrict __timeout, const __sigset_t *__restrict __sigmask); #endif # 124 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/select.h" 3 /* Define some inlines helping to catch common problems. */ #if __USE_FORTIFY_LEVEL > 0 && defined __GNUC__ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 128 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/select.h" 3 # 129 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/select.h" 3 #endif # 130 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/select.h" 3 __END_DECLS #endif /* sys/select.h */ # 134 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/select.h" 3 # 220 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 2 3 /* BSD defines these symbols, so we follow. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 222 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/sysmacros.h" 1 3 /* Definitions of macros to access `dev_t' values. Copyright (C) 1996, 1997, 1999, 2003, 2004, 2007, 2011 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_SYSMACROS_H #define _SYS_SYSMACROS_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 23 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/sysmacros.h" 3 # 24 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/sysmacros.h" 3 /* If the compiler does not know long long it is out of luck. We are not going to hack weird hacks to support the dev_t representation they need. */ #ifdef __GLIBC_HAVE_LONG_LONG __BEGIN_DECLS __extension__ extern unsigned int gnu_dev_major (unsigned long long int __dev) __THROW __attribute_const__; __extension__ extern unsigned int gnu_dev_minor (unsigned long long int __dev) __THROW __attribute_const__; __extension__ extern unsigned long long int gnu_dev_makedev (unsigned int __major, unsigned int __minor) __THROW __attribute_const__; # if defined __GNUC__ && __GNUC__ >= 2 && defined __USE_EXTERN_INLINES __extension__ __extern_inline __attribute_const__ unsigned int __NTH (gnu_dev_major (unsigned long long int __dev)) { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ __extern_inline __attribute_const__ unsigned int __NTH (gnu_dev_minor (unsigned long long int __dev)) { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } __extension__ __extern_inline __attribute_const__ unsigned long long int __NTH (gnu_dev_makedev (unsigned int __major, unsigned int __minor)) { return ((__minor & 0xff) | ((__major & 0xfff) << 8) | (((unsigned long long int) (__minor & ~0xff)) << 12) | (((unsigned long long int) (__major & ~0xfff)) << 32)); } # endif # 63 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/sysmacros.h" 3 __END_DECLS /* Access the functions with their traditional names. */ # define major(dev) gnu_dev_major (dev) # define minor(dev) gnu_dev_minor (dev) # define makedev(maj, min) gnu_dev_makedev (maj, min) #endif # 70 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/sysmacros.h" 3 #endif /* sys/sysmacros.h */ # 72 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/sysmacros.h" 3 # 223 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 2 3 #endif /* Use BSD. */ # 224 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #if (defined __USE_UNIX98 || defined __USE_XOPEN2K8) \ && !defined __blksize_t_defined typedef __blksize_t blksize_t; # define __blksize_t_defined #endif # 231 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 /* Types from the Large File Support interface. */ #ifndef __USE_FILE_OFFSET64 # ifndef __blkcnt_t_defined typedef __blkcnt_t blkcnt_t; /* Type to count number of disk blocks. */ # define __blkcnt_t_defined # endif # 238 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 # ifndef __fsblkcnt_t_defined typedef __fsblkcnt_t fsblkcnt_t; /* Type to count file system blocks. */ # define __fsblkcnt_t_defined # endif # 242 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 # ifndef __fsfilcnt_t_defined typedef __fsfilcnt_t fsfilcnt_t; /* Type to count file system inodes. */ # define __fsfilcnt_t_defined # endif # 246 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #else # 247 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 # ifndef __blkcnt_t_defined typedef __blkcnt64_t blkcnt_t; /* Type to count number of disk blocks. */ # define __blkcnt_t_defined # endif # 251 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 # ifndef __fsblkcnt_t_defined typedef __fsblkcnt64_t fsblkcnt_t; /* Type to count file system blocks. */ # define __fsblkcnt_t_defined # endif # 255 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 # ifndef __fsfilcnt_t_defined typedef __fsfilcnt64_t fsfilcnt_t; /* Type to count file system inodes. */ # define __fsfilcnt_t_defined # endif # 259 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #endif # 260 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 #ifdef __USE_LARGEFILE64 typedef __blkcnt64_t blkcnt64_t; /* Type to count number of disk blocks. */ typedef __fsblkcnt64_t fsblkcnt64_t; /* Type to count file system blocks. */ typedef __fsfilcnt64_t fsfilcnt64_t; /* Type to count file system inodes. */ #endif # 266 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 /* Now add the thread types. */ #if defined __USE_POSIX199506 || defined __USE_UNIX98 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 270 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/pthreadtypes.h" 1 3 /* Machine-specific pthread type layouts. PowerPC version. Copyright (C) 2003-2007, 2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_PTHREADTYPES_H #define _BITS_PTHREADTYPES_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/pthreadtypes.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 1 3 /* Determine the wordsize from the preprocessor defines. */ #if defined __powerpc64__ # define __WORDSIZE 64 # define __WORDSIZE_TIME64_COMPAT32 1 #else # 7 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 # define __WORDSIZE 32 #endif # 9 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 #if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL /* Signal the glibc ABI didn't used to have a `long double'. The changes all the `long double' function variants to be redirects to the double functions. */ # define __LONG_DOUBLE_MATH_OPTIONAL 1 # ifndef __LONG_DOUBLE_128__ # define __NO_LONG_DOUBLE_MATH 1 # endif # 19 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 #endif # 20 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 # 23 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/pthreadtypes.h" 2 3 #if __WORDSIZE == 64 # define __SIZEOF_PTHREAD_ATTR_T 56 # define __SIZEOF_PTHREAD_MUTEX_T 40 # define __SIZEOF_PTHREAD_MUTEXATTR_T 4 # define __SIZEOF_PTHREAD_COND_T 48 # define __SIZEOF_PTHREAD_CONDATTR_T 4 # define __SIZEOF_PTHREAD_RWLOCK_T 56 # define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 # define __SIZEOF_PTHREAD_BARRIER_T 32 # define __SIZEOF_PTHREAD_BARRIERATTR_T 4 #else # 35 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/pthreadtypes.h" 3 # define __SIZEOF_PTHREAD_ATTR_T 36 # define __SIZEOF_PTHREAD_MUTEX_T 24 # define __SIZEOF_PTHREAD_MUTEXATTR_T 4 # define __SIZEOF_PTHREAD_COND_T 48 # define __SIZEOF_PTHREAD_CONDATTR_T 4 # define __SIZEOF_PTHREAD_RWLOCK_T 32 # define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 # define __SIZEOF_PTHREAD_BARRIER_T 20 # define __SIZEOF_PTHREAD_BARRIERATTR_T 4 #endif # 45 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/pthreadtypes.h" 3 /* Thread identifiers. The structure of the attribute type is deliberately not exposed. */ typedef unsigned long int pthread_t; union pthread_attr_t { char __size[__SIZEOF_PTHREAD_ATTR_T]; long int __align; }; #ifndef __have_pthread_attr_t typedef union pthread_attr_t pthread_attr_t; # define __have_pthread_attr_t 1 #endif # 61 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/pthreadtypes.h" 3 #if __WORDSIZE == 64 typedef struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __pthread_list_t; #else # 70 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/pthreadtypes.h" 3 typedef struct __pthread_internal_slist { struct __pthread_internal_slist *__next; } __pthread_slist_t; #endif # 75 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/pthreadtypes.h" 3 /* Data structures for mutex handling. The structure of the attribute type is deliberately not exposed. */ typedef union { struct __pthread_mutex_s { volatile int __lock; volatile unsigned int __count; volatile int __owner; #if __WORDSIZE == 64 unsigned int __nusers; #endif # 89 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/pthreadtypes.h" 3 /* KIND must stay at this position in the structure to maintain binary compatibility. */ int __kind; #if __WORDSIZE == 64 int __spins; __pthread_list_t __list; # define __PTHREAD_MUTEX_HAVE_PREV 1 #else # 97 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/pthreadtypes.h" 3 unsigned int __nusers; __extension__ union { int __spins; __pthread_slist_t __list; }; #endif # 104 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/pthreadtypes.h" 3 } __data; char __size[__SIZEOF_PTHREAD_MUTEX_T]; long int __align; } pthread_mutex_t; typedef union { char __size[__SIZEOF_PTHREAD_MUTEXATTR_T]; int __align; } pthread_mutexattr_t; /* Data structure for conditional variable handling. The structure of the attribute type is deliberately not exposed. */ typedef union { struct { volatile int __lock; unsigned int __futex; __extension__ unsigned long long int __total_seq; __extension__ unsigned long long int __wakeup_seq; __extension__ unsigned long long int __woken_seq; void *__mutex; unsigned int __nwaiters; unsigned int __broadcast_seq; } __data; char __size[__SIZEOF_PTHREAD_COND_T]; __extension__ long long int __align; } pthread_cond_t; typedef union { char __size[__SIZEOF_PTHREAD_CONDATTR_T]; int __align; } pthread_condattr_t; /* Keys for thread-specific data */ typedef unsigned int pthread_key_t; /* Once-only execution */ typedef int pthread_once_t; #if defined __USE_UNIX98 || defined __USE_XOPEN2K /* Data structure for read-write lock variable handling. The structure of the attribute type is deliberately not exposed. */ typedef union { # if __WORDSIZE == 64 struct { volatile int __lock; unsigned int __nr_readers; unsigned int __readers_wakeup; unsigned int __writer_wakeup; unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; int __writer; int __shared; unsigned long int __pad1; unsigned long int __pad2; /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ unsigned int __flags; } __data; # else # 173 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/pthreadtypes.h" 3 struct { int __lock; unsigned int __nr_readers; unsigned int __readers_wakeup; unsigned int __writer_wakeup; unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; unsigned char __pad1; unsigned char __pad2; unsigned char __shared; /* FLAGS must stay at this position in the structure to maintain binary compatibility. */ unsigned char __flags; int __writer; } __data; # endif # 190 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/pthreadtypes.h" 3 char __size[__SIZEOF_PTHREAD_RWLOCK_T]; long int __align; } pthread_rwlock_t; typedef union { char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T]; long int __align; } pthread_rwlockattr_t; #endif # 200 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/pthreadtypes.h" 3 #ifdef __USE_XOPEN2K /* POSIX spinlock data type. */ typedef volatile int pthread_spinlock_t; /* POSIX barriers data type. The structure of the type is deliberately not exposed. */ typedef union { char __size[__SIZEOF_PTHREAD_BARRIER_T]; long int __align; } pthread_barrier_t; typedef union { char __size[__SIZEOF_PTHREAD_BARRIERATTR_T]; int __align; } pthread_barrierattr_t; #endif # 221 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/pthreadtypes.h" 3 #endif /* bits/pthreadtypes.h */ # 224 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/pthreadtypes.h" 3 # 271 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 2 3 #endif # 272 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 __END_DECLS #endif /* sys/types.h */ # 276 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/types.h" 3 # 315 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 2 3 /* These are the functions that actually do things. The `random', `srandom', `initstate' and `setstate' functions are those from BSD Unices. The `rand' and `srand' functions are required by the ANSI standard. We provide both interfaces to the same random number generator. */ /* Return a random long integer between 0 and RAND_MAX inclusive. */ extern long int random (void) __THROW; /* Seed the random number generator with the given number. */ extern void srandom (unsigned int __seed) __THROW; /* Initialize the random number generator to use state buffer STATEBUF, of length STATELEN, and seed it with SEED. Optimal lengths are 8, 16, 32, 64, 128 and 256, the bigger the better; values less than 8 will cause an error and values greater than 256 will be rounded down. */ extern char *initstate (unsigned int __seed, char *__statebuf, size_t __statelen) __THROW __nonnull ((2)); /* Switch the random number generator to state buffer STATEBUF, which should have been previously initialized by `initstate'. */ extern char *setstate (char *__statebuf) __THROW __nonnull ((1)); # ifdef __USE_MISC /* Reentrant versions of the `random' family of functions. These functions all use the following data structure to contain state, rather than global state variables. */ struct random_data { int32_t *fptr; /* Front pointer. */ int32_t *rptr; /* Rear pointer. */ int32_t *state; /* Array of state values. */ int rand_type; /* Type of random number generator. */ int rand_deg; /* Degree of random number generator. */ int rand_sep; /* Distance between front and rear. */ int32_t *end_ptr; /* Pointer behind state table. */ }; extern int random_r (struct random_data *__restrict __buf, int32_t *__restrict __result) __THROW __nonnull ((1, 2)); extern int srandom_r (unsigned int __seed, struct random_data *__buf) __THROW __nonnull ((2)); extern int initstate_r (unsigned int __seed, char *__restrict __statebuf, size_t __statelen, struct random_data *__restrict __buf) __THROW __nonnull ((2, 4)); extern int setstate_r (char *__restrict __statebuf, struct random_data *__restrict __buf) __THROW __nonnull ((1, 2)); # endif /* Use misc. */ # 369 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #endif /* Use SVID || extended X/Open || BSD. */ # 370 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 __BEGIN_NAMESPACE_STD /* Return a random integer between 0 and RAND_MAX inclusive. */ extern int rand (void) __THROW; /* Seed the random number generator with the given number. */ extern void srand (unsigned int __seed) __THROW; __END_NAMESPACE_STD #ifdef __USE_POSIX /* Reentrant interface according to POSIX.1. */ extern int rand_r (unsigned int *__seed) __THROW; #endif # 383 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #if defined __USE_SVID || defined __USE_XOPEN /* System V style 48-bit random number generator functions. */ /* Return non-negative, double-precision floating-point value in [0.0,1.0). */ extern double drand48 (void) __THROW; extern double erand48 (unsigned short int __xsubi[3]) __THROW __nonnull ((1)); /* Return non-negative, long integer in [0,2^31). */ extern long int lrand48 (void) __THROW; extern long int nrand48 (unsigned short int __xsubi[3]) __THROW __nonnull ((1)); /* Return signed, long integers in [-2^31,2^31). */ extern long int mrand48 (void) __THROW; extern long int jrand48 (unsigned short int __xsubi[3]) __THROW __nonnull ((1)); /* Seed random number generator. */ extern void srand48 (long int __seedval) __THROW; extern unsigned short int *seed48 (unsigned short int __seed16v[3]) __THROW __nonnull ((1)); extern void lcong48 (unsigned short int __param[7]) __THROW __nonnull ((1)); # ifdef __USE_MISC /* Data structure for communication with thread safe versions. This type is to be regarded as opaque. It's only exported because users have to allocate objects of this type. */ struct drand48_data { unsigned short int __x[3]; /* Current state. */ unsigned short int __old_x[3]; /* Old state. */ unsigned short int __c; /* Additive const. in congruential formula. */ unsigned short int __init; /* Flag for initializing. */ unsigned long long int __a; /* Factor in congruential formula. */ }; /* Return non-negative, double-precision floating-point value in [0.0,1.0). */ extern int drand48_r (struct drand48_data *__restrict __buffer, double *__restrict __result) __THROW __nonnull ((1, 2)); extern int erand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, double *__restrict __result) __THROW __nonnull ((1, 2)); /* Return non-negative, long integer in [0,2^31). */ extern int lrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) __THROW __nonnull ((1, 2)); extern int nrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) __THROW __nonnull ((1, 2)); /* Return signed, long integers in [-2^31,2^31). */ extern int mrand48_r (struct drand48_data *__restrict __buffer, long int *__restrict __result) __THROW __nonnull ((1, 2)); extern int jrand48_r (unsigned short int __xsubi[3], struct drand48_data *__restrict __buffer, long int *__restrict __result) __THROW __nonnull ((1, 2)); /* Seed random number generator. */ extern int srand48_r (long int __seedval, struct drand48_data *__buffer) __THROW __nonnull ((2)); extern int seed48_r (unsigned short int __seed16v[3], struct drand48_data *__buffer) __THROW __nonnull ((1, 2)); extern int lcong48_r (unsigned short int __param[7], struct drand48_data *__buffer) __THROW __nonnull ((1, 2)); # endif /* Use misc. */ # 457 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #endif /* Use SVID or X/Open. */ # 458 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #endif /* don't just need malloc and calloc */ # 460 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #ifndef __malloc_and_calloc_defined # define __malloc_and_calloc_defined __BEGIN_NAMESPACE_STD /* Allocate SIZE bytes of memory. */ extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur; /* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */ extern void *calloc (size_t __nmemb, size_t __size) __THROW __attribute_malloc__ __wur; __END_NAMESPACE_STD #endif # 471 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #ifndef __need_malloc_and_calloc __BEGIN_NAMESPACE_STD /* Re-allocate the previously allocated block in PTR, making the new block SIZE bytes long. */ /* __attribute_malloc__ is not used, because if realloc returns the same pointer that was passed to it, aliasing needs to be allowed between objects pointed by the old and new pointers. */ extern void *realloc (void *__ptr, size_t __size) __THROW __attribute_warn_unused_result__; /* Free a block allocated by `malloc', `realloc' or `calloc'. */ extern void free (void *__ptr) __THROW; __END_NAMESPACE_STD #ifdef __USE_MISC /* Free a block. An alias for `free'. (Sun Unices). */ extern void cfree (void *__ptr) __THROW; #endif /* Use misc. */ # 489 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #if defined __USE_GNU || defined __USE_BSD || defined __USE_MISC #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 491 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/alloca.h" 1 3 /* Copyright (C) 1992, 1996, 1997, 1998, 1999 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _ALLOCA_H #define _ALLOCA_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 21 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/alloca.h" 3 # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/alloca.h" 3 #define __need_size_t #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 24 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/alloca.h" 3 # 1 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 1 3 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) /* Always define miscellaneous pieces when modules are available. */ #if !__has_feature(modules) #define __STDDEF_H #endif # 37 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 44 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_ptrdiff_t) #if !defined(_PTRDIFF_T) || __has_feature(modules) /* Always define ptrdiff_t when modules are available. */ #if !__has_feature(modules) #define _PTRDIFF_T #endif # 51 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 53 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 55 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_size_t) #if !defined(_SIZE_T) || __has_feature(modules) /* Always define size_t when modules are available. */ #if !__has_feature(modules) #define _SIZE_T #endif # 62 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ size_t; #endif # 64 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_size_t #endif /*defined(__need_size_t) */ # 66 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) /* Always define rsize_t when modules are available. */ #if !__has_feature(modules) #define _RSIZE_T #endif # 76 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ rsize_t; #endif # 78 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif /* defined(__need_STDDEF_H_misc) */ # 79 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_wchar_t) #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if !defined(_WCHAR_T) || __has_feature(modules) #if !__has_feature(modules) #define _WCHAR_T #if defined(_MSC_EXTENSIONS) #define _WCHAR_T_DEFINED #endif # 89 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 90 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WCHAR_TYPE__ wchar_t; #endif # 92 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 93 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 95 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_NULL) #undef NULL #ifdef __cplusplus # if !defined(__MINGW32__) && !defined(_MSC_VER) # define NULL __null # else # 102 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL 0 # endif # 104 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #else # 105 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL ((void*)0) #endif # 107 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #ifdef __cplusplus #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 112 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 113 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_NULL #endif /* defined(__need_NULL) */ # 115 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 118 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 119 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 120 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 123 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if defined(__need_wint_t) /* Always define wint_t when modules are available. */ #if !defined(_WINT_T) || __has_feature(modules) #if !__has_feature(modules) #define _WINT_T #endif # 132 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WINT_TYPE__ wint_t; #endif # 134 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wint_t #endif /* __need_wint_t */ # 136 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 138 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 25 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/alloca.h" 2 3 __BEGIN_DECLS /* Remove any previous definitions. */ #undef alloca /* Allocate a block that will be freed when the calling function exits. */ extern void *alloca (size_t __size) __THROW; #ifdef __GNUC__ # define alloca(size) __builtin_alloca (size) #endif /* GCC. */ # 37 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/alloca.h" 3 __END_DECLS #endif /* alloca.h */ # 41 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/alloca.h" 3 # 492 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 2 3 #endif /* Use GNU, BSD, or misc. */ # 493 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K) \ || defined __USE_BSD /* Allocate SIZE bytes on a page boundary. The storage cannot be freed. */ extern void *valloc (size_t __size) __THROW __attribute_malloc__ __wur; #endif # 499 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #ifdef __USE_XOPEN2K /* Allocate memory of SIZE bytes with an alignment of ALIGNMENT. */ extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) __THROW __nonnull ((1)) __wur; #endif # 505 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #ifdef __USE_ISOC11 /* ISO C variant of aligned allocation. */ extern void *aligned_alloc (size_t __alignment, size_t __size) __THROW __wur __attribute__ ((__malloc__, __alloc_size__ (2))); #endif # 511 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 __BEGIN_NAMESPACE_STD /* Abort execution and generate a core-dump. */ extern void abort (void) __THROW __attribute__ ((__noreturn__)); /* Register a function to be called when `exit' is called. */ extern int atexit (void (*__func) (void)) __THROW __nonnull ((1)); #if defined __USE_ISOC11 || defined __USE_ISOCXX11 /* Register a function to be called when `quick_exit' is called. */ # ifdef __cplusplus extern "C++" int at_quick_exit (void (*__func) (void)) __THROW __asm ("at_quick_exit") __nonnull ((1)); # else # 526 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 extern int at_quick_exit (void (*__func) (void)) __THROW __nonnull ((1)); # endif # 528 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #endif # 529 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 __END_NAMESPACE_STD #ifdef __USE_MISC /* Register a function to be called with the status given to `exit' and the given argument. */ extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg) __THROW __nonnull ((1)); #endif # 537 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 __BEGIN_NAMESPACE_STD /* Call all functions registered with `atexit' and `on_exit', in the reverse of the order in which they were registered, perform stdio cleanup, and terminate program execution with STATUS. */ extern void exit (int __status) __THROW __attribute__ ((__noreturn__)); #if defined __USE_ISOC11 || defined __USE_ISOCXX11 /* Call all functions registered with `at_quick_exit' in the reverse of the order in which they were registered and terminate program execution with STATUS. */ extern void quick_exit (int __status) __THROW __attribute__ ((__noreturn__)); #endif # 550 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 __END_NAMESPACE_STD #ifdef __USE_ISOC99 __BEGIN_NAMESPACE_C99 /* Terminate the program with STATUS without calling any of the functions registered with `atexit' or `on_exit'. */ extern void _Exit (int __status) __THROW __attribute__ ((__noreturn__)); __END_NAMESPACE_C99 #endif # 559 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 __BEGIN_NAMESPACE_STD /* Return the value of envariable NAME, or NULL if it doesn't exist. */ extern char *getenv (const char *__name) __THROW __nonnull ((1)) __wur; __END_NAMESPACE_STD #ifdef __USE_GNU /* This function is similar to the above but returns NULL if the programs is running with SUID or SGID enabled. */ extern char *secure_getenv (const char *__name) __THROW __nonnull ((1)) __wur; #endif # 572 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #if defined __USE_SVID || defined __USE_XOPEN /* The SVID says this is in , but this seems a better place. */ /* Put STRING, which is of the form "NAME=VALUE", in the environment. If there is no `=', remove NAME from the environment. */ extern int putenv (char *__string) __THROW __nonnull ((1)); #endif # 579 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #if defined __USE_BSD || defined __USE_XOPEN2K /* Set NAME to VALUE in the environment. If REPLACE is nonzero, overwrite an existing value. */ extern int setenv (const char *__name, const char *__value, int __replace) __THROW __nonnull ((2)); /* Remove the variable NAME from the environment. */ extern int unsetenv (const char *__name) __THROW __nonnull ((1)); #endif # 589 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #ifdef __USE_MISC /* The `clearenv' was planned to be added to POSIX.1 but probably never made it. Nevertheless the POSIX.9 standard (POSIX bindings for Fortran 77) requires this function. */ extern int clearenv (void) __THROW; #endif # 596 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #if defined __USE_MISC \ || (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8) /* Generate a unique temporary file name from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. Always returns TEMPLATE, it's either a temporary file name or a null string if it cannot get a unique file name. */ extern char *mktemp (char *__template) __THROW __nonnull ((1)); #endif # 607 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED \ || defined __USE_XOPEN2K8 /* Generate a unique temporary file name from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the filename unique. Returns a file descriptor open on the file for reading and writing, or -1 if it cannot create a uniquely-named file. This function is a possible cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int mkstemp (char *__template) __nonnull ((1)) __wur; # else # 621 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # ifdef __REDIRECT extern int __REDIRECT (mkstemp, (char *__template), mkstemp64) __nonnull ((1)) __wur; # else # 625 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # define mkstemp mkstemp64 # endif # 627 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # endif # 628 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # ifdef __USE_LARGEFILE64 extern int mkstemp64 (char *__template) __nonnull ((1)) __wur; # endif # 631 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #endif # 632 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #ifdef __USE_MISC /* Similar to mkstemp, but the template can have a suffix after the XXXXXX. The length of the suffix is specified in the second parameter. This function is a possible cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int mkstemps (char *__template, int __suffixlen) __nonnull ((1)) __wur; # else # 643 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # ifdef __REDIRECT extern int __REDIRECT (mkstemps, (char *__template, int __suffixlen), mkstemps64) __nonnull ((1)) __wur; # else # 647 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # define mkstemps mkstemps64 # endif # 649 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # endif # 650 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # ifdef __USE_LARGEFILE64 extern int mkstemps64 (char *__template, int __suffixlen) __nonnull ((1)) __wur; # endif # 654 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #endif # 655 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #if defined __USE_BSD || defined __USE_XOPEN2K8 /* Create a unique temporary directory from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the directory name unique. Returns TEMPLATE, or a null pointer if it cannot get a unique name. The directory is created mode 700. */ extern char *mkdtemp (char *__template) __THROW __nonnull ((1)) __wur; #endif # 664 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #ifdef __USE_GNU /* Generate a unique temporary file name from TEMPLATE similar to mkstemp. But allow the caller to pass additional flags which are used in the open call to create the file.. This function is a possible cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int mkostemp (char *__template, int __flags) __nonnull ((1)) __wur; # else # 675 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # ifdef __REDIRECT extern int __REDIRECT (mkostemp, (char *__template, int __flags), mkostemp64) __nonnull ((1)) __wur; # else # 679 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # define mkostemp mkostemp64 # endif # 681 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # endif # 682 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # ifdef __USE_LARGEFILE64 extern int mkostemp64 (char *__template, int __flags) __nonnull ((1)) __wur; # endif # 685 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 /* Similar to mkostemp, but the template can have a suffix after the XXXXXX. The length of the suffix is specified in the second parameter. This function is a possible cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int mkostemps (char *__template, int __suffixlen, int __flags) __nonnull ((1)) __wur; # else # 696 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # ifdef __REDIRECT extern int __REDIRECT (mkostemps, (char *__template, int __suffixlen, int __flags), mkostemps64) __nonnull ((1)) __wur; # else # 701 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # define mkostemps mkostemps64 # endif # 703 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # endif # 704 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # ifdef __USE_LARGEFILE64 extern int mkostemps64 (char *__template, int __suffixlen, int __flags) __nonnull ((1)) __wur; # endif # 708 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #endif # 709 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 __BEGIN_NAMESPACE_STD /* Execute the given line as a shell command. This function is a cancellation point and therefore not marked with __THROW. */ extern int system (const char *__command) __wur; __END_NAMESPACE_STD #ifdef __USE_GNU /* Return a malloc'd string containing the canonical absolute name of the existing named file. */ extern char *canonicalize_file_name (const char *__name) __THROW __nonnull ((1)) __wur; #endif # 726 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Return the canonical absolute name of file NAME. If RESOLVED is null, the result is malloc'd; otherwise, if the canonical name is PATH_MAX chars or more, returns null with `errno' set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars, returns the name in RESOLVED. */ extern char *realpath (const char *__restrict __name, char *__restrict __resolved) __THROW __wur; #endif # 736 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 /* Shorthand for type of comparison functions. */ #ifndef __COMPAR_FN_T # define __COMPAR_FN_T typedef int (*__compar_fn_t) (const void *, const void *); # ifdef __USE_GNU typedef __compar_fn_t comparison_fn_t; # endif # 746 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #endif # 747 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #ifdef __USE_GNU typedef int (*__compar_d_fn_t) (const void *, const void *, void *); #endif # 750 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 __BEGIN_NAMESPACE_STD /* Do a binary search for KEY in BASE, which consists of NMEMB elements of SIZE bytes each, using COMPAR to perform the comparisons. */ extern void *bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __nonnull ((1, 2, 5)) __wur; /* Sort NMEMB elements of BASE, of SIZE bytes each, using COMPAR to perform the comparisons. */ extern void qsort (void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __nonnull ((1, 4)); #ifdef __USE_GNU extern void qsort_r (void *__base, size_t __nmemb, size_t __size, __compar_d_fn_t __compar, void *__arg) __nonnull ((1, 4)); #endif # 767 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 /* Return the absolute value of X. */ extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur; extern long int labs (long int __x) __THROW __attribute__ ((__const__)) __wur; __END_NAMESPACE_STD #ifdef __USE_ISOC99 __extension__ extern long long int llabs (long long int __x) __THROW __attribute__ ((__const__)) __wur; #endif # 778 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 __BEGIN_NAMESPACE_STD /* Return the `div_t', `ldiv_t' or `lldiv_t' representation of the value of NUMER over DENOM. */ /* GCC may have built-ins for these someday. */ extern div_t div (int __numer, int __denom) __THROW __attribute__ ((__const__)) __wur; extern ldiv_t ldiv (long int __numer, long int __denom) __THROW __attribute__ ((__const__)) __wur; __END_NAMESPACE_STD #ifdef __USE_ISOC99 __BEGIN_NAMESPACE_C99 __extension__ extern lldiv_t lldiv (long long int __numer, long long int __denom) __THROW __attribute__ ((__const__)) __wur; __END_NAMESPACE_C99 #endif # 797 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8) \ || defined __USE_SVID /* Convert floating point numbers to strings. The returned values are valid only until another call to the same function. */ /* Convert VALUE to a string with NDIGIT digits and return a pointer to this. Set *DECPT with the position of the decimal character and *SIGN with the sign of the number. */ extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __THROW __nonnull ((3, 4)) __wur; /* Convert VALUE to a string rounded to NDIGIT decimal digits. Set *DECPT with the position of the decimal character and *SIGN with the sign of the number. */ extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __THROW __nonnull ((3, 4)) __wur; /* If possible convert VALUE to a string with NDIGIT significant digits. Otherwise use exponential representation. The resulting string will be written to BUF. */ extern char *gcvt (double __value, int __ndigit, char *__buf) __THROW __nonnull ((3)) __wur; # ifdef __USE_MISC /* Long double versions of above functions. */ extern char *qecvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __THROW __nonnull ((3, 4)) __wur; extern char *qfcvt (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign) __THROW __nonnull ((3, 4)) __wur; extern char *qgcvt (long double __value, int __ndigit, char *__buf) __THROW __nonnull ((3)) __wur; /* Reentrant version of the functions above which provide their own buffers. */ extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __THROW __nonnull ((3, 4, 5)); extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __THROW __nonnull ((3, 4, 5)); extern int qecvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __THROW __nonnull ((3, 4, 5)); extern int qfcvt_r (long double __value, int __ndigit, int *__restrict __decpt, int *__restrict __sign, char *__restrict __buf, size_t __len) __THROW __nonnull ((3, 4, 5)); # endif /* misc */ # 853 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #endif /* use MISC || use X/Open Unix */ # 854 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 __BEGIN_NAMESPACE_STD /* Return the length of the multibyte character in S, which is no longer than N. */ extern int mblen (const char *__s, size_t __n) __THROW __wur; /* Return the length of the given multibyte character, putting its `wchar_t' representation in *PWC. */ extern int mbtowc (wchar_t *__restrict __pwc, const char *__restrict __s, size_t __n) __THROW __wur; /* Put the multibyte character represented by WCHAR in S, returning its length. */ extern int wctomb (char *__s, wchar_t __wchar) __THROW __wur; /* Convert a multibyte string to a wide char string. */ extern size_t mbstowcs (wchar_t *__restrict __pwcs, const char *__restrict __s, size_t __n) __THROW; /* Convert a wide char string to multibyte string. */ extern size_t wcstombs (char *__restrict __s, const wchar_t *__restrict __pwcs, size_t __n) __THROW; __END_NAMESPACE_STD #ifdef __USE_SVID /* Determine whether the string value of RESPONSE matches the affirmation or negative response expression as specified by the LC_MESSAGES category in the program's current locale. Returns 1 if affirmative, 0 if negative, and -1 if not matching. */ extern int rpmatch (const char *__response) __THROW __nonnull ((1)) __wur; #endif # 886 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 /* Parse comma separated suboption from *OPTIONP and match against strings in TOKENS. If found return index and set *VALUEP to optional value introduced by an equal sign. If the suboption is not part of TOKENS return in *VALUEP beginning of unknown suboption. On exit *OPTIONP is set to the beginning of the next token or at the terminating NUL character. */ extern int getsubopt (char **__restrict __optionp, char *const *__restrict __tokens, char **__restrict __valuep) __THROW __nonnull ((1, 2, 3)) __wur; #endif # 900 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #ifdef __USE_XOPEN /* Setup DES tables according KEY. */ extern void setkey (const char *__key) __THROW __nonnull ((1)); #endif # 906 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 /* X/Open pseudo terminal handling. */ #ifdef __USE_XOPEN2KXSI /* Return a master pseudo-terminal handle. */ extern int posix_openpt (int __oflag) __wur; #endif # 914 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #ifdef __USE_XOPEN /* The next four functions all take a master pseudo-tty fd and perform an operation on the associated slave: */ /* Chown the slave to the calling user. */ extern int grantpt (int __fd) __THROW; /* Release an internal lock so the slave can be opened. Call after grantpt(). */ extern int unlockpt (int __fd) __THROW; /* Return the pathname of the pseudo terminal slave assoicated with the master FD is open on, or NULL on errors. The returned storage is good until the next call to this function. */ extern char *ptsname (int __fd) __THROW __wur; #endif # 931 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #ifdef __USE_GNU /* Store at most BUFLEN characters of the pathname of the slave pseudo terminal associated with the master FD is open on in BUF. Return 0 on success, otherwise an error number. */ extern int ptsname_r (int __fd, char *__buf, size_t __buflen) __THROW __nonnull ((2)); /* Open a master pseudo terminal and return its file descriptor. */ extern int getpt (void); #endif # 942 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #ifdef __USE_BSD /* Put the 1 minute, 5 minute and 15 minute load averages into the first NELEM elements of LOADAVG. Return the number written (never more than three, but may be less than NELEM), or -1 if an error occurred. */ extern int getloadavg (double __loadavg[], int __nelem) __THROW __nonnull ((1)); #endif # 950 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 951 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stdlib-float.h" 1 3 /* Floating-point inline functions for stdlib.h. Copyright (C) 2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _STDLIB_H # error "Never use directly; include instead." #endif # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stdlib-float.h" 3 #ifdef __USE_EXTERN_INLINES __BEGIN_NAMESPACE_STD __extern_inline double __NTH (atof (const char *__nptr)) { return strtod (__nptr, (char **) NULL); } __END_NAMESPACE_STD #endif /* Optimizing and Inlining. */ # 32 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stdlib-float.h" 3 # 952 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 2 3 /* Define some macros helping to catch buffer overflows. */ #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 955 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # 956 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #endif # 957 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #ifdef __LDBL_COMPAT #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 958 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # 959 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #endif # 960 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #endif /* don't just need malloc and calloc */ # 962 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 #undef __need_malloc_and_calloc __END_DECLS #endif /* stdlib.h */ # 967 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdlib.h" 3 # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 26 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 26 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 1 3 /* Copyright (C) 1991-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.21 String handling */ #ifndef _STRING_H #define _STRING_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 25 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 __BEGIN_DECLS /* Get size_t and NULL from . */ #define __need_size_t #define __need_NULL #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 32 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 # 1 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 1 3 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) /* Always define miscellaneous pieces when modules are available. */ #if !__has_feature(modules) #define __STDDEF_H #endif # 37 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 44 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_ptrdiff_t) #if !defined(_PTRDIFF_T) || __has_feature(modules) /* Always define ptrdiff_t when modules are available. */ #if !__has_feature(modules) #define _PTRDIFF_T #endif # 51 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 53 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 55 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_size_t) #if !defined(_SIZE_T) || __has_feature(modules) /* Always define size_t when modules are available. */ #if !__has_feature(modules) #define _SIZE_T #endif # 62 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ size_t; #endif # 64 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_size_t #endif /*defined(__need_size_t) */ # 66 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) /* Always define rsize_t when modules are available. */ #if !__has_feature(modules) #define _RSIZE_T #endif # 76 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ rsize_t; #endif # 78 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif /* defined(__need_STDDEF_H_misc) */ # 79 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_wchar_t) #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if !defined(_WCHAR_T) || __has_feature(modules) #if !__has_feature(modules) #define _WCHAR_T #if defined(_MSC_EXTENSIONS) #define _WCHAR_T_DEFINED #endif # 89 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 90 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WCHAR_TYPE__ wchar_t; #endif # 92 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 93 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 95 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_NULL) #undef NULL #ifdef __cplusplus # if !defined(__MINGW32__) && !defined(_MSC_VER) # define NULL __null # else # 102 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL 0 # endif # 104 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #else # 105 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL ((void*)0) #endif # 107 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #ifdef __cplusplus #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 112 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 113 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_NULL #endif /* defined(__need_NULL) */ # 115 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 118 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 119 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 120 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 123 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if defined(__need_wint_t) /* Always define wint_t when modules are available. */ #if !defined(_WINT_T) || __has_feature(modules) #if !__has_feature(modules) #define _WINT_T #endif # 132 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WINT_TYPE__ wint_t; #endif # 134 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wint_t #endif /* __need_wint_t */ # 136 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 138 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 33 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 2 3 /* Tell the caller that we provide correct C++ prototypes. */ #if defined __cplusplus && __GNUC_PREREQ (4, 4) # define __CORRECT_ISO_CPP_STRING_H_PROTO #endif # 38 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 __BEGIN_NAMESPACE_STD /* Copy N bytes of SRC to DEST. */ extern void *memcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); /* Copy N bytes of SRC to DEST, guaranteeing correct behavior for overlapping strings. */ extern void *memmove (void *__dest, const void *__src, size_t __n) __THROW __nonnull ((1, 2)); __END_NAMESPACE_STD /* Copy no more than N bytes of SRC to DEST, stopping when C is found. Return the position in DEST one byte past where C was copied, or NULL if C was not found in the first N bytes of SRC. */ #if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN extern void *memccpy (void *__restrict __dest, const void *__restrict __src, int __c, size_t __n) __THROW __nonnull ((1, 2)); #endif /* SVID. */ # 58 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 __BEGIN_NAMESPACE_STD /* Set N bytes of S to C. */ extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1)); /* Compare N bytes of S1 and S2. */ extern int memcmp (const void *__s1, const void *__s2, size_t __n) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Search N bytes of S for C. */ #ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" { extern void *memchr (void *__s, int __c, size_t __n) __THROW __asm ("memchr") __attribute_pure__ __nonnull ((1)); extern const void *memchr (const void *__s, int __c, size_t __n) __THROW __asm ("memchr") __attribute_pure__ __nonnull ((1)); # ifdef __OPTIMIZE__ __extern_always_inline void * memchr (void *__s, int __c, size_t __n) __THROW { return __builtin_memchr (__s, __c, __n); } __extern_always_inline const void * memchr (const void *__s, int __c, size_t __n) __THROW { return __builtin_memchr (__s, __c, __n); } # endif # 90 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 } #else # 92 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 extern void *memchr (const void *__s, int __c, size_t __n) __THROW __attribute_pure__ __nonnull ((1)); #endif # 95 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 __END_NAMESPACE_STD #ifdef __USE_GNU /* Search in S for C. This is similar to `memchr' but there is no length limit. */ # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" void *rawmemchr (void *__s, int __c) __THROW __asm ("rawmemchr") __attribute_pure__ __nonnull ((1)); extern "C++" const void *rawmemchr (const void *__s, int __c) __THROW __asm ("rawmemchr") __attribute_pure__ __nonnull ((1)); # else # 106 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 extern void *rawmemchr (const void *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); # endif # 109 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 /* Search N bytes of S for the final occurrence of C. */ # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" void *memrchr (void *__s, int __c, size_t __n) __THROW __asm ("memrchr") __attribute_pure__ __nonnull ((1)); extern "C++" const void *memrchr (const void *__s, int __c, size_t __n) __THROW __asm ("memrchr") __attribute_pure__ __nonnull ((1)); # else # 117 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 extern void *memrchr (const void *__s, int __c, size_t __n) __THROW __attribute_pure__ __nonnull ((1)); # endif # 120 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 #endif # 121 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 __BEGIN_NAMESPACE_STD /* Copy SRC to DEST. */ extern char *strcpy (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); /* Copy no more than N characters of SRC to DEST. */ extern char *strncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); /* Append SRC onto DEST. */ extern char *strcat (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); /* Append no more than N characters from SRC onto DEST. */ extern char *strncat (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); /* Compare S1 and S2. */ extern int strcmp (const char *__s1, const char *__s2) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Compare N characters of S1 and S2. */ extern int strncmp (const char *__s1, const char *__s2, size_t __n) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Compare the collated forms of S1 and S2. */ extern int strcoll (const char *__s1, const char *__s2) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Put a transformation of SRC into no more than N bytes of DEST. */ extern size_t strxfrm (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((2)); __END_NAMESPACE_STD #ifdef __USE_XOPEN2K8 /* The following functions are equivalent to the both above but they take the locale they use for the collation as an extra argument. This is not standardsized but something like will come. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 159 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/xlocale.h" 1 3 /* Definition of locale datatype. Copyright (C) 1997,2000,2002,2009,2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _XLOCALE_H #define _XLOCALE_H 1 /* Structure for reentrant locale using functions. This is an (almost) opaque type for the user level programs. The file and this data structure is not standardized. Don't rely on it. It can go away without warning. */ typedef struct __locale_struct { /* Note: LC_ALL is not a valid index into this array. */ struct __locale_data *__locales[13]; /* 13 = __LC_LAST. */ /* To increase the speed of this solution we add some special members. */ const unsigned short int *__ctype_b; const int *__ctype_tolower; const int *__ctype_toupper; /* Note: LC_ALL is not a valid index into this array. */ const char *__names[13]; } *__locale_t; /* POSIX 2008 makes locale_t official. */ typedef __locale_t locale_t; #endif /* xlocale.h */ # 45 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/xlocale.h" 3 # 160 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 2 3 /* Compare the collated forms of S1 and S2 using rules from L. */ extern int strcoll_l (const char *__s1, const char *__s2, __locale_t __l) __THROW __attribute_pure__ __nonnull ((1, 2, 3)); /* Put a transformation of SRC into no more than N bytes of DEST. */ extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n, __locale_t __l) __THROW __nonnull ((2, 4)); #endif # 168 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 #if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED \ || defined __USE_XOPEN2K8 /* Duplicate S, returning an identical malloc'd string. */ extern char *strdup (const char *__s) __THROW __attribute_malloc__ __nonnull ((1)); #endif # 175 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 /* Return a malloc'd copy of at most N bytes of STRING. The resultant string is terminated even if no null terminator appears before STRING[N]. */ #if defined __USE_XOPEN2K8 extern char *strndup (const char *__string, size_t __n) __THROW __attribute_malloc__ __nonnull ((1)); #endif # 183 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 #if defined __USE_GNU && defined __GNUC__ /* Duplicate S, returning an identical alloca'd string. */ # define strdupa(s) \ (__extension__ \ ({ \ const char *__old = (s); \ size_t __len = strlen (__old) + 1; \ char *__new = (char *) __builtin_alloca (__len); \ (char *) memcpy (__new, __old, __len); \ })) /* Return an alloca'd copy of at most N bytes of string. */ # define strndupa(s, n) \ (__extension__ \ ({ \ const char *__old = (s); \ size_t __len = strnlen (__old, (n)); \ char *__new = (char *) __builtin_alloca (__len + 1); \ __new[__len] = '\0'; \ (char *) memcpy (__new, __old, __len); \ })) #endif # 206 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 __BEGIN_NAMESPACE_STD /* Find the first occurrence of C in S. */ #ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" { extern char *strchr (char *__s, int __c) __THROW __asm ("strchr") __attribute_pure__ __nonnull ((1)); extern const char *strchr (const char *__s, int __c) __THROW __asm ("strchr") __attribute_pure__ __nonnull ((1)); # ifdef __OPTIMIZE__ __extern_always_inline char * strchr (char *__s, int __c) __THROW { return __builtin_strchr (__s, __c); } __extern_always_inline const char * strchr (const char *__s, int __c) __THROW { return __builtin_strchr (__s, __c); } # endif # 230 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 } #else # 232 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 extern char *strchr (const char *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); #endif # 235 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 /* Find the last occurrence of C in S. */ #ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" { extern char *strrchr (char *__s, int __c) __THROW __asm ("strrchr") __attribute_pure__ __nonnull ((1)); extern const char *strrchr (const char *__s, int __c) __THROW __asm ("strrchr") __attribute_pure__ __nonnull ((1)); # ifdef __OPTIMIZE__ __extern_always_inline char * strrchr (char *__s, int __c) __THROW { return __builtin_strrchr (__s, __c); } __extern_always_inline const char * strrchr (const char *__s, int __c) __THROW { return __builtin_strrchr (__s, __c); } # endif # 257 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 } #else # 259 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 extern char *strrchr (const char *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); #endif # 262 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 __END_NAMESPACE_STD #ifdef __USE_GNU /* This function is similar to `strchr'. But it returns a pointer to the closing NUL byte in case C is not found in S. */ # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" char *strchrnul (char *__s, int __c) __THROW __asm ("strchrnul") __attribute_pure__ __nonnull ((1)); extern "C++" const char *strchrnul (const char *__s, int __c) __THROW __asm ("strchrnul") __attribute_pure__ __nonnull ((1)); # else # 273 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 extern char *strchrnul (const char *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); # endif # 276 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 #endif # 277 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 __BEGIN_NAMESPACE_STD /* Return the length of the initial segment of S which consists entirely of characters not in REJECT. */ extern size_t strcspn (const char *__s, const char *__reject) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Return the length of the initial segment of S which consists entirely of characters in ACCEPT. */ extern size_t strspn (const char *__s, const char *__accept) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Find the first occurrence in S of any character in ACCEPT. */ #ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" { extern char *strpbrk (char *__s, const char *__accept) __THROW __asm ("strpbrk") __attribute_pure__ __nonnull ((1, 2)); extern const char *strpbrk (const char *__s, const char *__accept) __THROW __asm ("strpbrk") __attribute_pure__ __nonnull ((1, 2)); # ifdef __OPTIMIZE__ __extern_always_inline char * strpbrk (char *__s, const char *__accept) __THROW { return __builtin_strpbrk (__s, __accept); } __extern_always_inline const char * strpbrk (const char *__s, const char *__accept) __THROW { return __builtin_strpbrk (__s, __accept); } # endif # 309 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 } #else # 311 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 extern char *strpbrk (const char *__s, const char *__accept) __THROW __attribute_pure__ __nonnull ((1, 2)); #endif # 314 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 /* Find the first occurrence of NEEDLE in HAYSTACK. */ #ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" { extern char *strstr (char *__haystack, const char *__needle) __THROW __asm ("strstr") __attribute_pure__ __nonnull ((1, 2)); extern const char *strstr (const char *__haystack, const char *__needle) __THROW __asm ("strstr") __attribute_pure__ __nonnull ((1, 2)); # ifdef __OPTIMIZE__ __extern_always_inline char * strstr (char *__haystack, const char *__needle) __THROW { return __builtin_strstr (__haystack, __needle); } __extern_always_inline const char * strstr (const char *__haystack, const char *__needle) __THROW { return __builtin_strstr (__haystack, __needle); } # endif # 336 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 } #else # 338 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 extern char *strstr (const char *__haystack, const char *__needle) __THROW __attribute_pure__ __nonnull ((1, 2)); #endif # 341 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 /* Divide S into tokens separated by characters in DELIM. */ extern char *strtok (char *__restrict __s, const char *__restrict __delim) __THROW __nonnull ((2)); __END_NAMESPACE_STD /* Divide S into tokens separated by characters in DELIM. Information passed between calls are stored in SAVE_PTR. */ extern char *__strtok_r (char *__restrict __s, const char *__restrict __delim, char **__restrict __save_ptr) __THROW __nonnull ((2, 3)); #if defined __USE_POSIX || defined __USE_MISC extern char *strtok_r (char *__restrict __s, const char *__restrict __delim, char **__restrict __save_ptr) __THROW __nonnull ((2, 3)); #endif # 359 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 #ifdef __USE_GNU /* Similar to `strstr' but this function ignores the case of both strings. */ # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" char *strcasestr (char *__haystack, const char *__needle) __THROW __asm ("strcasestr") __attribute_pure__ __nonnull ((1, 2)); extern "C++" const char *strcasestr (const char *__haystack, const char *__needle) __THROW __asm ("strcasestr") __attribute_pure__ __nonnull ((1, 2)); # else # 369 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 extern char *strcasestr (const char *__haystack, const char *__needle) __THROW __attribute_pure__ __nonnull ((1, 2)); # endif # 372 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 #endif # 373 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 #ifdef __USE_GNU /* Find the first occurrence of NEEDLE in HAYSTACK. NEEDLE is NEEDLELEN bytes long; HAYSTACK is HAYSTACKLEN bytes long. */ extern void *memmem (const void *__haystack, size_t __haystacklen, const void *__needle, size_t __needlelen) __THROW __attribute_pure__ __nonnull ((1, 3)); /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ extern void *__mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); extern void *mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); #endif # 391 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 __BEGIN_NAMESPACE_STD /* Return the length of S. */ extern size_t strlen (const char *__s) __THROW __attribute_pure__ __nonnull ((1)); __END_NAMESPACE_STD #ifdef __USE_XOPEN2K8 /* Find the length of STRING, but scan at most MAXLEN characters. If no '\0' terminator is found in that many characters, return MAXLEN. */ extern size_t strnlen (const char *__string, size_t __maxlen) __THROW __attribute_pure__ __nonnull ((1)); #endif # 405 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 __BEGIN_NAMESPACE_STD /* Return a string describing the meaning of the `errno' code in ERRNUM. */ extern char *strerror (int __errnum) __THROW; __END_NAMESPACE_STD #if defined __USE_XOPEN2K || defined __USE_MISC /* Reentrant version of `strerror'. There are 2 flavors of `strerror_r', GNU which returns the string and may or may not use the supplied temporary buffer and POSIX one which fills the string into the buffer. To use the POSIX version, -D_XOPEN_SOURCE=600 or -D_POSIX_C_SOURCE=200112L without -D_GNU_SOURCE is needed, otherwise the GNU version is preferred. */ # if defined __USE_XOPEN2K && !defined __USE_GNU /* Fill BUF with a string describing the meaning of the `errno' code in ERRNUM. */ # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (strerror_r, (int __errnum, char *__buf, size_t __buflen), __xpg_strerror_r) __nonnull ((2)); # else # 427 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 extern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen) __THROW __nonnull ((2)); # define strerror_r __xpg_strerror_r # endif # 431 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 # else # 432 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 /* If a temporary buffer is required, at most BUFLEN bytes of BUF will be used. */ extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) __THROW __nonnull ((2)) __wur; # endif # 437 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 #endif # 438 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 #ifdef __USE_XOPEN2K8 /* Translate error number to string according to the locale L. */ extern char *strerror_l (int __errnum, __locale_t __l) __THROW; #endif # 443 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 /* We define this function always since `bzero' is sometimes needed when the namespace rules does not allow this. */ extern void __bzero (void *__s, size_t __n) __THROW __nonnull ((1)); #ifdef __USE_BSD /* Copy N bytes of SRC to DEST (like memmove, but args reversed). */ extern void bcopy (const void *__src, void *__dest, size_t __n) __THROW __nonnull ((1, 2)); /* Set N bytes of S to 0. */ extern void bzero (void *__s, size_t __n) __THROW __nonnull ((1)); /* Compare N bytes of S1 and S2 (same as memcmp). */ extern int bcmp (const void *__s1, const void *__s2, size_t __n) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Find the first occurrence of C in S (same as strchr). */ # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" { extern char *index (char *__s, int __c) __THROW __asm ("index") __attribute_pure__ __nonnull ((1)); extern const char *index (const char *__s, int __c) __THROW __asm ("index") __attribute_pure__ __nonnull ((1)); # if defined __OPTIMIZE__ && !defined __CORRECT_ISO_CPP_STRINGS_H_PROTO __extern_always_inline char * index (char *__s, int __c) __THROW { return __builtin_index (__s, __c); } __extern_always_inline const char * index (const char *__s, int __c) __THROW { return __builtin_index (__s, __c); } # endif # 483 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 } # else # 485 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 extern char *index (const char *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); # endif # 488 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 /* Find the last occurrence of C in S (same as strrchr). */ # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" { extern char *rindex (char *__s, int __c) __THROW __asm ("rindex") __attribute_pure__ __nonnull ((1)); extern const char *rindex (const char *__s, int __c) __THROW __asm ("rindex") __attribute_pure__ __nonnull ((1)); # if defined __OPTIMIZE__ && !defined __CORRECT_ISO_CPP_STRINGS_H_PROTO __extern_always_inline char * rindex (char *__s, int __c) __THROW { return __builtin_rindex (__s, __c); } __extern_always_inline const char * rindex (const char *__s, int __c) __THROW { return __builtin_rindex (__s, __c); } #endif # 511 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 } # else # 513 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 extern char *rindex (const char *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); # endif # 516 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 /* Return the position of the first bit set in I, or 0 if none are set. The least-significant bit is position 1, the most-significant 32. */ extern int ffs (int __i) __THROW __attribute__ ((__const__)); /* The following two functions are non-standard but necessary for non-32 bit platforms. */ # ifdef __USE_GNU extern int ffsl (long int __l) __THROW __attribute__ ((__const__)); # ifdef __GNUC__ __extension__ extern int ffsll (long long int __ll) __THROW __attribute__ ((__const__)); # endif # 529 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 # endif # 530 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 /* Compare S1 and S2, ignoring case. */ extern int strcasecmp (const char *__s1, const char *__s2) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Compare no more than N chars of S1 and S2, ignoring case. */ extern int strncasecmp (const char *__s1, const char *__s2, size_t __n) __THROW __attribute_pure__ __nonnull ((1, 2)); #endif /* Use BSD. */ # 539 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 #ifdef __USE_GNU /* Again versions of a few functions which use the given locale instead of the global one. */ extern int strcasecmp_l (const char *__s1, const char *__s2, __locale_t __loc) __THROW __attribute_pure__ __nonnull ((1, 2, 3)); extern int strncasecmp_l (const char *__s1, const char *__s2, size_t __n, __locale_t __loc) __THROW __attribute_pure__ __nonnull ((1, 2, 4)); #endif # 551 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 #ifdef __USE_BSD /* Return the next DELIM-delimited token from *STRINGP, terminating it with a '\0', and update *STRINGP to point past it. */ extern char *strsep (char **__restrict __stringp, const char *__restrict __delim) __THROW __nonnull ((1, 2)); #endif # 559 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 #ifdef __USE_XOPEN2K8 /* Return a string describing the meaning of the signal number in SIG. */ extern char *strsignal (int __sig) __THROW; /* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); extern char *stpcpy (char *__restrict __dest, const char *__restrict __src) __THROW __nonnull ((1, 2)); /* Copy no more than N characters of SRC to DEST, returning the address of the last character written into DEST. */ extern char *__stpncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); extern char *stpncpy (char *__restrict __dest, const char *__restrict __src, size_t __n) __THROW __nonnull ((1, 2)); #endif # 579 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 #ifdef __USE_GNU /* Compare S1 and S2 as strings holding name & indices/version numbers. */ extern int strverscmp (const char *__s1, const char *__s2) __THROW __attribute_pure__ __nonnull ((1, 2)); /* Sautee STRING briskly. */ extern char *strfry (char *__string) __THROW __nonnull ((1)); /* Frobnicate N bytes of S. */ extern void *memfrob (void *__s, size_t __n) __THROW __nonnull ((1)); # ifndef basename /* Return the file name within directory of FILENAME. We don't declare the function if the `basename' macro is available (defined in ) which makes the XPG version of this function available. */ # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" char *basename (char *__filename) __THROW __asm ("basename") __nonnull ((1)); extern "C++" const char *basename (const char *__filename) __THROW __asm ("basename") __nonnull ((1)); # else # 602 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 extern char *basename (const char *__filename) __THROW __nonnull ((1)); # endif # 604 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 # endif # 605 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 #endif # 606 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 #if defined __GNUC__ && __GNUC__ >= 2 # if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ \ && !defined __NO_INLINE__ && !defined __cplusplus /* When using GNU CC we provide some optimized versions of selected functions from this header. There are two kinds of optimizations: - machine-dependent optimizations, most probably using inline assembler code; these might be quite expensive since the code size can increase significantly. These optimizations are not used unless the symbol __USE_STRING_INLINES is defined before including this header. - machine-independent optimizations which do not increase the code size significantly and which optimize mainly situations where one or more arguments are compile-time constants. These optimizations are used always when the compiler is taught to optimize. One can inhibit all optimizations by defining __NO_STRING_INLINES. */ /* Get the machine-dependent optimizations (if any). */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 630 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string.h" 1 3 /* This file should provide inline versions of string functions. Surround GCC-specific parts with #ifdef __GNUC__, and use `__extern_inline'. This file should define __STRING_INLINES if functions are actually defined as inlines. */ #ifndef _BITS_STRING_H #define _BITS_STRING_H 1 #endif /* bits/string.h */ # 13 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string.h" 3 # 631 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 2 3 /* These are generic optimizations which do not add too much inline code. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 633 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 1 3 /* Machine-independant string function optimizations. Copyright (C) 1997-2004, 2007, 2008, 2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1997. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _STRING_H # error "Never use directly; include instead." #endif # 23 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 #if !defined __NO_STRING_INLINES && !defined __BOUNDED_POINTERS__ /* Unlike the definitions in the header the definitions contained here are not optimized down to assembler level. Those optimizations are not always a good idea since this means the code size increases a lot. Instead the definitions here optimize some functions in a way which do not dramatically increase the code size and which do not use assembler. The main trick is to use GCC's `__builtin_constant_p' function. Every function XXX which has a defined version in must be accompanied by a symbol _HAVE_STRING_ARCH_XXX to make sure we don't get redefinitions. We must use here macros instead of inline functions since the trick won't work with the latter. */ #ifndef __STRING_INLINE # ifdef __cplusplus # define __STRING_INLINE inline # else # 45 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # define __STRING_INLINE __extern_inline # endif # 47 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 #endif # 48 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 #if _STRING_ARCH_unaligned /* If we can do unaligned memory accesses we must know the endianess. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 51 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # 52 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 52 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # 53 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # if __BYTE_ORDER == __LITTLE_ENDIAN # define __STRING2_SMALL_GET16(src, idx) \ (((const unsigned char *) (const char *) (src))[idx + 1] << 8 \ | ((const unsigned char *) (const char *) (src))[idx]) # define __STRING2_SMALL_GET32(src, idx) \ (((((const unsigned char *) (const char *) (src))[idx + 3] << 8 \ | ((const unsigned char *) (const char *) (src))[idx + 2]) << 8 \ | ((const unsigned char *) (const char *) (src))[idx + 1]) << 8 \ | ((const unsigned char *) (const char *) (src))[idx]) # else # 64 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # define __STRING2_SMALL_GET16(src, idx) \ (((const unsigned char *) (const char *) (src))[idx] << 8 \ | ((const unsigned char *) (const char *) (src))[idx + 1]) # define __STRING2_SMALL_GET32(src, idx) \ (((((const unsigned char *) (const char *) (src))[idx] << 8 \ | ((const unsigned char *) (const char *) (src))[idx + 1]) << 8 \ | ((const unsigned char *) (const char *) (src))[idx + 2]) << 8 \ | ((const unsigned char *) (const char *) (src))[idx + 3]) # endif # 73 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 #else # 74 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 /* These are a few types we need for the optimizations if we cannot use unaligned memory accesses. */ # define __STRING2_COPY_TYPE(N) \ typedef struct { unsigned char __arr[N]; } \ __attribute__ ((__packed__)) __STRING2_COPY_ARR##N __STRING2_COPY_TYPE (2); __STRING2_COPY_TYPE (3); __STRING2_COPY_TYPE (4); __STRING2_COPY_TYPE (5); __STRING2_COPY_TYPE (6); __STRING2_COPY_TYPE (7); __STRING2_COPY_TYPE (8); # undef __STRING2_COPY_TYPE #endif # 88 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 /* Dereferencing a pointer arg to run sizeof on it fails for the void pointer case, so we use this instead. Note that __x is evaluated twice. */ #define __string2_1bptr_p(__x) \ ((size_t)(const void *)((__x) + 1) - (size_t)(const void *)(__x) == 1) /* Set N bytes of S to C. */ #if !defined _HAVE_STRING_ARCH_memset # if !__GNUC_PREREQ (3, 0) # if _STRING_ARCH_unaligned # define memset(s, c, n) \ (__extension__ (__builtin_constant_p (n) && (n) <= 16 \ ? ((n) == 1 \ ? __memset_1 (s, c) \ : __memset_gc (s, c, n)) \ : (__builtin_constant_p (c) && (c) == '\0' \ ? ({ void *__s = (s); __bzero (__s, n); __s; }) \ : memset (s, c, n)))) # define __memset_1(s, c) ({ void *__s = (s); \ *((__uint8_t *) __s) = (__uint8_t) c; __s; }) # define __memset_gc(s, c, n) \ ({ void *__s = (s); \ union { \ unsigned int __ui; \ unsigned short int __usi; \ unsigned char __uc; \ } *__u = __s; \ __uint8_t __c = (__uint8_t) (c); \ \ /* This `switch' statement will be removed at compile-time. */ \ switch ((unsigned int) (n)) \ { \ case 15: \ __u->__ui = __c * 0x01010101; \ __u = __extension__ ((void *) __u + 4); \ case 11: \ __u->__ui = __c * 0x01010101; \ __u = __extension__ ((void *) __u + 4); \ case 7: \ __u->__ui = __c * 0x01010101; \ __u = __extension__ ((void *) __u + 4); \ case 3: \ __u->__usi = (unsigned short int) __c * 0x0101; \ __u = __extension__ ((void *) __u + 2); \ __u->__uc = (unsigned char) __c; \ break; \ \ case 14: \ __u->__ui = __c * 0x01010101; \ __u = __extension__ ((void *) __u + 4); \ case 10: \ __u->__ui = __c * 0x01010101; \ __u = __extension__ ((void *) __u + 4); \ case 6: \ __u->__ui = __c * 0x01010101; \ __u = __extension__ ((void *) __u + 4); \ case 2: \ __u->__usi = (unsigned short int) __c * 0x0101; \ break; \ \ case 13: \ __u->__ui = __c * 0x01010101; \ __u = __extension__ ((void *) __u + 4); \ case 9: \ __u->__ui = __c * 0x01010101; \ __u = __extension__ ((void *) __u + 4); \ case 5: \ __u->__ui = __c * 0x01010101; \ __u = __extension__ ((void *) __u + 4); \ case 1: \ __u->__uc = (unsigned char) __c; \ break; \ \ case 16: \ __u->__ui = __c * 0x01010101; \ __u = __extension__ ((void *) __u + 4); \ case 12: \ __u->__ui = __c * 0x01010101; \ __u = __extension__ ((void *) __u + 4); \ case 8: \ __u->__ui = __c * 0x01010101; \ __u = __extension__ ((void *) __u + 4); \ case 4: \ __u->__ui = __c * 0x01010101; \ case 0: \ break; \ } \ \ __s; }) # else # 181 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # define memset(s, c, n) \ (__extension__ (__builtin_constant_p (c) && (c) == '\0' \ ? ({ void *__s = (s); __bzero (__s, n); __s; }) \ : memset (s, c, n))) # endif # 186 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # endif # 187 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 /* GCC < 3.0 optimizes memset(s, 0, n) but not bzero(s, n). The optimization is broken before EGCS 1.1. GCC 3.0+ has __builtin_bzero as well, but at least till GCC 3.4 if it decides to call the library function, it calls memset and not bzero. */ # if __GNUC_PREREQ (2, 91) # define __bzero(s, n) __builtin_memset (s, '\0', n) # endif # 196 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 #endif # 198 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 /* Copy N bytes from SRC to DEST, returning pointer to byte following the last copied. */ #ifdef __USE_GNU # if !defined _HAVE_STRING_ARCH_mempcpy || defined _FORCE_INLINES # ifndef _HAVE_STRING_ARCH_mempcpy # if __GNUC_PREREQ (3, 4) # define __mempcpy(dest, src, n) __builtin_mempcpy (dest, src, n) # elif __GNUC_PREREQ (3, 0) # 208 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # define __mempcpy(dest, src, n) \ (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ && __string2_1bptr_p (src) && n <= 8 \ ? __builtin_memcpy (dest, src, n) + (n) \ : __mempcpy (dest, src, n))) # else # 214 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # define __mempcpy(dest, src, n) \ (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ && __string2_1bptr_p (src) && n <= 8 \ ? __mempcpy_small (dest, __mempcpy_args (src), n) \ : __mempcpy (dest, src, n))) # endif # 220 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 /* In glibc we use this function frequently but for namespace reasons we have to use the name `__mempcpy'. */ # define mempcpy(dest, src, n) __mempcpy (dest, src, n) # endif # 224 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # if !__GNUC_PREREQ (3, 0) || defined _FORCE_INLINES # if _STRING_ARCH_unaligned # ifndef _FORCE_INLINES # define __mempcpy_args(src) \ ((const char *) (src))[0], ((const char *) (src))[2], \ ((const char *) (src))[4], ((const char *) (src))[6], \ __extension__ __STRING2_SMALL_GET16 (src, 0), \ __extension__ __STRING2_SMALL_GET16 (src, 4), \ __extension__ __STRING2_SMALL_GET32 (src, 0), \ __extension__ __STRING2_SMALL_GET32 (src, 4) # endif # 236 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 __STRING_INLINE void *__mempcpy_small (void *, char, char, char, char, __uint16_t, __uint16_t, __uint32_t, __uint32_t, size_t); __STRING_INLINE void * __mempcpy_small (void *__dest1, char __src0_1, char __src2_1, char __src4_1, char __src6_1, __uint16_t __src0_2, __uint16_t __src4_2, __uint32_t __src0_4, __uint32_t __src4_4, size_t __srclen) { union { __uint32_t __ui; __uint16_t __usi; unsigned char __uc; unsigned char __c; } *__u = __dest1; switch ((unsigned int) __srclen) { case 1: __u->__c = __src0_1; __u = __extension__ ((void *) __u + 1); break; case 2: __u->__usi = __src0_2; __u = __extension__ ((void *) __u + 2); break; case 3: __u->__usi = __src0_2; __u = __extension__ ((void *) __u + 2); __u->__c = __src2_1; __u = __extension__ ((void *) __u + 1); break; case 4: __u->__ui = __src0_4; __u = __extension__ ((void *) __u + 4); break; case 5: __u->__ui = __src0_4; __u = __extension__ ((void *) __u + 4); __u->__c = __src4_1; __u = __extension__ ((void *) __u + 1); break; case 6: __u->__ui = __src0_4; __u = __extension__ ((void *) __u + 4); __u->__usi = __src4_2; __u = __extension__ ((void *) __u + 2); break; case 7: __u->__ui = __src0_4; __u = __extension__ ((void *) __u + 4); __u->__usi = __src4_2; __u = __extension__ ((void *) __u + 2); __u->__c = __src6_1; __u = __extension__ ((void *) __u + 1); break; case 8: __u->__ui = __src0_4; __u = __extension__ ((void *) __u + 4); __u->__ui = __src4_4; __u = __extension__ ((void *) __u + 4); break; } return (void *) __u; } # else # 302 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # ifndef _FORCE_INLINES # define __mempcpy_args(src) \ ((const char *) (src))[0], \ __extension__ ((__STRING2_COPY_ARR2) \ { { ((const char *) (src))[0], ((const char *) (src))[1] } }), \ __extension__ ((__STRING2_COPY_ARR3) \ { { ((const char *) (src))[0], ((const char *) (src))[1], \ ((const char *) (src))[2] } }), \ __extension__ ((__STRING2_COPY_ARR4) \ { { ((const char *) (src))[0], ((const char *) (src))[1], \ ((const char *) (src))[2], ((const char *) (src))[3] } }), \ __extension__ ((__STRING2_COPY_ARR5) \ { { ((const char *) (src))[0], ((const char *) (src))[1], \ ((const char *) (src))[2], ((const char *) (src))[3], \ ((const char *) (src))[4] } }), \ __extension__ ((__STRING2_COPY_ARR6) \ { { ((const char *) (src))[0], ((const char *) (src))[1], \ ((const char *) (src))[2], ((const char *) (src))[3], \ ((const char *) (src))[4], ((const char *) (src))[5] } }), \ __extension__ ((__STRING2_COPY_ARR7) \ { { ((const char *) (src))[0], ((const char *) (src))[1], \ ((const char *) (src))[2], ((const char *) (src))[3], \ ((const char *) (src))[4], ((const char *) (src))[5], \ ((const char *) (src))[6] } }), \ __extension__ ((__STRING2_COPY_ARR8) \ { { ((const char *) (src))[0], ((const char *) (src))[1], \ ((const char *) (src))[2], ((const char *) (src))[3], \ ((const char *) (src))[4], ((const char *) (src))[5], \ ((const char *) (src))[6], ((const char *) (src))[7] } }) # endif # 332 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 __STRING_INLINE void *__mempcpy_small (void *, char, __STRING2_COPY_ARR2, __STRING2_COPY_ARR3, __STRING2_COPY_ARR4, __STRING2_COPY_ARR5, __STRING2_COPY_ARR6, __STRING2_COPY_ARR7, __STRING2_COPY_ARR8, size_t); __STRING_INLINE void * __mempcpy_small (void *__dest, char __src1, __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, __STRING2_COPY_ARR8 __src8, size_t __srclen) { union { char __c; __STRING2_COPY_ARR2 __sca2; __STRING2_COPY_ARR3 __sca3; __STRING2_COPY_ARR4 __sca4; __STRING2_COPY_ARR5 __sca5; __STRING2_COPY_ARR6 __sca6; __STRING2_COPY_ARR7 __sca7; __STRING2_COPY_ARR8 __sca8; } *__u = __dest; switch ((unsigned int) __srclen) { case 1: __u->__c = __src1; break; case 2: __extension__ __u->__sca2 = __src2; break; case 3: __extension__ __u->__sca3 = __src3; break; case 4: __extension__ __u->__sca4 = __src4; break; case 5: __extension__ __u->__sca5 = __src5; break; case 6: __extension__ __u->__sca6 = __src6; break; case 7: __extension__ __u->__sca7 = __src7; break; case 8: __extension__ __u->__sca8 = __src8; break; } return __extension__ ((void *) __u + __srclen); } # endif # 386 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # endif # 387 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # endif # 388 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 #endif # 389 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 /* Return pointer to C in S. */ #ifndef _HAVE_STRING_ARCH_strchr extern void *__rawmemchr (const void *__s, int __c); # if __GNUC_PREREQ (3, 2) # define strchr(s, c) \ (__extension__ (__builtin_constant_p (c) && !__builtin_constant_p (s) \ && (c) == '\0' \ ? (char *) __rawmemchr (s, c) \ : __builtin_strchr (s, c))) # else # 401 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # define strchr(s, c) \ (__extension__ (__builtin_constant_p (c) && (c) == '\0' \ ? (char *) __rawmemchr (s, c) \ : strchr (s, c))) # endif # 406 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 #endif # 407 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 /* Copy SRC to DEST. */ #if (!defined _HAVE_STRING_ARCH_strcpy && !__GNUC_PREREQ (3, 0)) \ || defined _FORCE_INLINES # if !defined _HAVE_STRING_ARCH_strcpy && !__GNUC_PREREQ (3, 0) # define strcpy(dest, src) \ (__extension__ (__builtin_constant_p (src) \ ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ ? __strcpy_small (dest, __strcpy_args (src), \ strlen (src) + 1) \ : (char *) memcpy (dest, src, strlen (src) + 1)) \ : strcpy (dest, src))) # endif # 421 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # if _STRING_ARCH_unaligned # ifndef _FORCE_INLINES # define __strcpy_args(src) \ __extension__ __STRING2_SMALL_GET16 (src, 0), \ __extension__ __STRING2_SMALL_GET16 (src, 4), \ __extension__ __STRING2_SMALL_GET32 (src, 0), \ __extension__ __STRING2_SMALL_GET32 (src, 4) # endif # 430 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 __STRING_INLINE char *__strcpy_small (char *, __uint16_t, __uint16_t, __uint32_t, __uint32_t, size_t); __STRING_INLINE char * __strcpy_small (char *__dest, __uint16_t __src0_2, __uint16_t __src4_2, __uint32_t __src0_4, __uint32_t __src4_4, size_t __srclen) { union { __uint32_t __ui; __uint16_t __usi; unsigned char __uc; } *__u = (void *) __dest; switch ((unsigned int) __srclen) { case 1: __u->__uc = '\0'; break; case 2: __u->__usi = __src0_2; break; case 3: __u->__usi = __src0_2; __u = __extension__ ((void *) __u + 2); __u->__uc = '\0'; break; case 4: __u->__ui = __src0_4; break; case 5: __u->__ui = __src0_4; __u = __extension__ ((void *) __u + 4); __u->__uc = '\0'; break; case 6: __u->__ui = __src0_4; __u = __extension__ ((void *) __u + 4); __u->__usi = __src4_2; break; case 7: __u->__ui = __src0_4; __u = __extension__ ((void *) __u + 4); __u->__usi = __src4_2; __u = __extension__ ((void *) __u + 2); __u->__uc = '\0'; break; case 8: __u->__ui = __src0_4; __u = __extension__ ((void *) __u + 4); __u->__ui = __src4_4; break; } return __dest; } # else # 485 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # ifndef _FORCE_INLINES # define __strcpy_args(src) \ __extension__ ((__STRING2_COPY_ARR2) \ { { ((const char *) (src))[0], '\0' } }), \ __extension__ ((__STRING2_COPY_ARR3) \ { { ((const char *) (src))[0], ((const char *) (src))[1], \ '\0' } }), \ __extension__ ((__STRING2_COPY_ARR4) \ { { ((const char *) (src))[0], ((const char *) (src))[1], \ ((const char *) (src))[2], '\0' } }), \ __extension__ ((__STRING2_COPY_ARR5) \ { { ((const char *) (src))[0], ((const char *) (src))[1], \ ((const char *) (src))[2], ((const char *) (src))[3], \ '\0' } }), \ __extension__ ((__STRING2_COPY_ARR6) \ { { ((const char *) (src))[0], ((const char *) (src))[1], \ ((const char *) (src))[2], ((const char *) (src))[3], \ ((const char *) (src))[4], '\0' } }), \ __extension__ ((__STRING2_COPY_ARR7) \ { { ((const char *) (src))[0], ((const char *) (src))[1], \ ((const char *) (src))[2], ((const char *) (src))[3], \ ((const char *) (src))[4], ((const char *) (src))[5], \ '\0' } }), \ __extension__ ((__STRING2_COPY_ARR8) \ { { ((const char *) (src))[0], ((const char *) (src))[1], \ ((const char *) (src))[2], ((const char *) (src))[3], \ ((const char *) (src))[4], ((const char *) (src))[5], \ ((const char *) (src))[6], '\0' } }) # endif # 514 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 __STRING_INLINE char *__strcpy_small (char *, __STRING2_COPY_ARR2, __STRING2_COPY_ARR3, __STRING2_COPY_ARR4, __STRING2_COPY_ARR5, __STRING2_COPY_ARR6, __STRING2_COPY_ARR7, __STRING2_COPY_ARR8, size_t); __STRING_INLINE char * __strcpy_small (char *__dest, __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, __STRING2_COPY_ARR8 __src8, size_t __srclen) { union { char __c; __STRING2_COPY_ARR2 __sca2; __STRING2_COPY_ARR3 __sca3; __STRING2_COPY_ARR4 __sca4; __STRING2_COPY_ARR5 __sca5; __STRING2_COPY_ARR6 __sca6; __STRING2_COPY_ARR7 __sca7; __STRING2_COPY_ARR8 __sca8; } *__u = (void *) __dest; switch ((unsigned int) __srclen) { case 1: __u->__c = '\0'; break; case 2: __extension__ __u->__sca2 = __src2; break; case 3: __extension__ __u->__sca3 = __src3; break; case 4: __extension__ __u->__sca4 = __src4; break; case 5: __extension__ __u->__sca5 = __src5; break; case 6: __extension__ __u->__sca6 = __src6; break; case 7: __extension__ __u->__sca7 = __src7; break; case 8: __extension__ __u->__sca8 = __src8; break; } return __dest; } # endif # 568 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 #endif # 569 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 /* Copy SRC to DEST, returning pointer to final NUL byte. */ #ifdef __USE_GNU # if !defined _HAVE_STRING_ARCH_stpcpy || defined _FORCE_INLINES # ifndef _HAVE_STRING_ARCH_stpcpy # if __GNUC_PREREQ (3, 4) # define __stpcpy(dest, src) __builtin_stpcpy (dest, src) # elif __GNUC_PREREQ (3, 0) # 578 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # define __stpcpy(dest, src) \ (__extension__ (__builtin_constant_p (src) \ ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ ? __builtin_strcpy (dest, src) + strlen (src) \ : ((char *) (__mempcpy) (dest, src, strlen (src) + 1) \ - 1)) \ : __stpcpy (dest, src))) # else # 586 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # define __stpcpy(dest, src) \ (__extension__ (__builtin_constant_p (src) \ ? (__string2_1bptr_p (src) && strlen (src) + 1 <= 8 \ ? __stpcpy_small (dest, __stpcpy_args (src), \ strlen (src) + 1) \ : ((char *) (__mempcpy) (dest, src, strlen (src) + 1) \ - 1)) \ : __stpcpy (dest, src))) # endif # 595 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 /* In glibc we use this function frequently but for namespace reasons we have to use the name `__stpcpy'. */ # define stpcpy(dest, src) __stpcpy (dest, src) # endif # 599 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # if !__GNUC_PREREQ (3, 0) || defined _FORCE_INLINES # if _STRING_ARCH_unaligned # ifndef _FORCE_INLINES # define __stpcpy_args(src) \ __extension__ __STRING2_SMALL_GET16 (src, 0), \ __extension__ __STRING2_SMALL_GET16 (src, 4), \ __extension__ __STRING2_SMALL_GET32 (src, 0), \ __extension__ __STRING2_SMALL_GET32 (src, 4) # endif # 609 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 __STRING_INLINE char *__stpcpy_small (char *, __uint16_t, __uint16_t, __uint32_t, __uint32_t, size_t); __STRING_INLINE char * __stpcpy_small (char *__dest, __uint16_t __src0_2, __uint16_t __src4_2, __uint32_t __src0_4, __uint32_t __src4_4, size_t __srclen) { union { unsigned int __ui; unsigned short int __usi; unsigned char __uc; char __c; } *__u = (void *) __dest; switch ((unsigned int) __srclen) { case 1: __u->__uc = '\0'; break; case 2: __u->__usi = __src0_2; __u = __extension__ ((void *) __u + 1); break; case 3: __u->__usi = __src0_2; __u = __extension__ ((void *) __u + 2); __u->__uc = '\0'; break; case 4: __u->__ui = __src0_4; __u = __extension__ ((void *) __u + 3); break; case 5: __u->__ui = __src0_4; __u = __extension__ ((void *) __u + 4); __u->__uc = '\0'; break; case 6: __u->__ui = __src0_4; __u = __extension__ ((void *) __u + 4); __u->__usi = __src4_2; __u = __extension__ ((void *) __u + 1); break; case 7: __u->__ui = __src0_4; __u = __extension__ ((void *) __u + 4); __u->__usi = __src4_2; __u = __extension__ ((void *) __u + 2); __u->__uc = '\0'; break; case 8: __u->__ui = __src0_4; __u = __extension__ ((void *) __u + 4); __u->__ui = __src4_4; __u = __extension__ ((void *) __u + 3); break; } return &__u->__c; } # else # 669 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # ifndef _FORCE_INLINES # define __stpcpy_args(src) \ __extension__ ((__STRING2_COPY_ARR2) \ { { ((const char *) (src))[0], '\0' } }), \ __extension__ ((__STRING2_COPY_ARR3) \ { { ((const char *) (src))[0], ((const char *) (src))[1], \ '\0' } }), \ __extension__ ((__STRING2_COPY_ARR4) \ { { ((const char *) (src))[0], ((const char *) (src))[1], \ ((const char *) (src))[2], '\0' } }), \ __extension__ ((__STRING2_COPY_ARR5) \ { { ((const char *) (src))[0], ((const char *) (src))[1], \ ((const char *) (src))[2], ((const char *) (src))[3], \ '\0' } }), \ __extension__ ((__STRING2_COPY_ARR6) \ { { ((const char *) (src))[0], ((const char *) (src))[1], \ ((const char *) (src))[2], ((const char *) (src))[3], \ ((const char *) (src))[4], '\0' } }), \ __extension__ ((__STRING2_COPY_ARR7) \ { { ((const char *) (src))[0], ((const char *) (src))[1], \ ((const char *) (src))[2], ((const char *) (src))[3], \ ((const char *) (src))[4], ((const char *) (src))[5], \ '\0' } }), \ __extension__ ((__STRING2_COPY_ARR8) \ { { ((const char *) (src))[0], ((const char *) (src))[1], \ ((const char *) (src))[2], ((const char *) (src))[3], \ ((const char *) (src))[4], ((const char *) (src))[5], \ ((const char *) (src))[6], '\0' } }) # endif # 698 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 __STRING_INLINE char *__stpcpy_small (char *, __STRING2_COPY_ARR2, __STRING2_COPY_ARR3, __STRING2_COPY_ARR4, __STRING2_COPY_ARR5, __STRING2_COPY_ARR6, __STRING2_COPY_ARR7, __STRING2_COPY_ARR8, size_t); __STRING_INLINE char * __stpcpy_small (char *__dest, __STRING2_COPY_ARR2 __src2, __STRING2_COPY_ARR3 __src3, __STRING2_COPY_ARR4 __src4, __STRING2_COPY_ARR5 __src5, __STRING2_COPY_ARR6 __src6, __STRING2_COPY_ARR7 __src7, __STRING2_COPY_ARR8 __src8, size_t __srclen) { union { char __c; __STRING2_COPY_ARR2 __sca2; __STRING2_COPY_ARR3 __sca3; __STRING2_COPY_ARR4 __sca4; __STRING2_COPY_ARR5 __sca5; __STRING2_COPY_ARR6 __sca6; __STRING2_COPY_ARR7 __sca7; __STRING2_COPY_ARR8 __sca8; } *__u = (void *) __dest; switch ((unsigned int) __srclen) { case 1: __u->__c = '\0'; break; case 2: __extension__ __u->__sca2 = __src2; break; case 3: __extension__ __u->__sca3 = __src3; break; case 4: __extension__ __u->__sca4 = __src4; break; case 5: __extension__ __u->__sca5 = __src5; break; case 6: __extension__ __u->__sca6 = __src6; break; case 7: __extension__ __u->__sca7 = __src7; break; case 8: __extension__ __u->__sca8 = __src8; break; } return __dest + __srclen - 1; } # endif # 752 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # endif # 753 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # endif # 754 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 #endif # 755 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 /* Copy no more than N characters of SRC to DEST. */ #ifndef _HAVE_STRING_ARCH_strncpy # if __GNUC_PREREQ (3, 2) # define strncpy(dest, src, n) __builtin_strncpy (dest, src, n) # else # 762 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # define strncpy(dest, src, n) \ (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ ? (strlen (src) + 1 >= ((size_t) (n)) \ ? (char *) memcpy (dest, src, n) \ : strncpy (dest, src, n)) \ : strncpy (dest, src, n))) # endif # 769 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 #endif # 770 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 /* Append no more than N characters from SRC onto DEST. */ #ifndef _HAVE_STRING_ARCH_strncat # ifdef _USE_STRING_ARCH_strchr # define strncat(dest, src, n) \ (__extension__ ({ char *__dest = (dest); \ __builtin_constant_p (src) && __builtin_constant_p (n) \ ? (strlen (src) < ((size_t) (n)) \ ? strcat (__dest, src) \ : (*((char *) __mempcpy (strchr (__dest, '\0'), \ src, n)) = '\0', __dest)) \ : strncat (dest, src, n); })) # elif __GNUC_PREREQ (3, 2) # 784 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # define strncat(dest, src, n) __builtin_strncat (dest, src, n) # else # 786 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # define strncat(dest, src, n) \ (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \ ? (strlen (src) < ((size_t) (n)) \ ? strcat (dest, src) \ : strncat (dest, src, n)) \ : strncat (dest, src, n))) # endif # 793 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 #endif # 794 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 /* Compare characters of S1 and S2. */ #ifndef _HAVE_STRING_ARCH_strcmp # if __GNUC_PREREQ (3, 2) # define strcmp(s1, s2) \ __extension__ \ ({ size_t __s1_len, __s2_len; \ (__builtin_constant_p (s1) && __builtin_constant_p (s2) \ && (__s1_len = strlen (s1), __s2_len = strlen (s2), \ (!__string2_1bptr_p (s1) || __s1_len >= 4) \ && (!__string2_1bptr_p (s2) || __s2_len >= 4)) \ ? __builtin_strcmp (s1, s2) \ : (__builtin_constant_p (s1) && __string2_1bptr_p (s1) \ && (__s1_len = strlen (s1), __s1_len < 4) \ ? (__builtin_constant_p (s2) && __string2_1bptr_p (s2) \ ? __builtin_strcmp (s1, s2) \ : __strcmp_cg (s1, s2, __s1_len)) \ : (__builtin_constant_p (s2) && __string2_1bptr_p (s2) \ && (__s2_len = strlen (s2), __s2_len < 4) \ ? (__builtin_constant_p (s1) && __string2_1bptr_p (s1) \ ? __builtin_strcmp (s1, s2) \ : __strcmp_gc (s1, s2, __s2_len)) \ : __builtin_strcmp (s1, s2)))); }) # else # 819 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # define strcmp(s1, s2) \ __extension__ \ ({ size_t __s1_len, __s2_len; \ (__builtin_constant_p (s1) && __builtin_constant_p (s2) \ && (__s1_len = strlen (s1), __s2_len = strlen (s2), \ (!__string2_1bptr_p (s1) || __s1_len >= 4) \ && (!__string2_1bptr_p (s2) || __s2_len >= 4)) \ ? memcmp ((const char *) (s1), (const char *) (s2), \ (__s1_len < __s2_len ? __s1_len : __s2_len) + 1) \ : (__builtin_constant_p (s1) && __string2_1bptr_p (s1) \ && (__s1_len = strlen (s1), __s1_len < 4) \ ? (__builtin_constant_p (s2) && __string2_1bptr_p (s2) \ ? __strcmp_cc (s1, s2, __s1_len) \ : __strcmp_cg (s1, s2, __s1_len)) \ : (__builtin_constant_p (s2) && __string2_1bptr_p (s2) \ && (__s2_len = strlen (s2), __s2_len < 4) \ ? (__builtin_constant_p (s1) && __string2_1bptr_p (s1) \ ? __strcmp_cc (s1, s2, __s2_len) \ : __strcmp_gc (s1, s2, __s2_len)) \ : strcmp (s1, s2)))); }) # endif # 840 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # define __strcmp_cc(s1, s2, l) \ (__extension__ ({ register int __result = \ (((const unsigned char *) (const char *) (s1))[0] \ - ((const unsigned char *) (const char *)(s2))[0]); \ if (l > 0 && __result == 0) \ { \ __result = (((const unsigned char *) \ (const char *) (s1))[1] \ - ((const unsigned char *) \ (const char *) (s2))[1]); \ if (l > 1 && __result == 0) \ { \ __result = \ (((const unsigned char *) \ (const char *) (s1))[2] \ - ((const unsigned char *) \ (const char *) (s2))[2]); \ if (l > 2 && __result == 0) \ __result = \ (((const unsigned char *) \ (const char *) (s1))[3] \ - ((const unsigned char *) \ (const char *) (s2))[3]); \ } \ } \ __result; })) # define __strcmp_cg(s1, s2, l1) \ (__extension__ ({ const unsigned char *__s2 = \ (const unsigned char *) (const char *) (s2); \ register int __result = \ (((const unsigned char *) (const char *) (s1))[0] \ - __s2[0]); \ if (l1 > 0 && __result == 0) \ { \ __result = (((const unsigned char *) \ (const char *) (s1))[1] - __s2[1]); \ if (l1 > 1 && __result == 0) \ { \ __result = (((const unsigned char *) \ (const char *) (s1))[2] - __s2[2]); \ if (l1 > 2 && __result == 0) \ __result = (((const unsigned char *) \ (const char *) (s1))[3] \ - __s2[3]); \ } \ } \ __result; })) # define __strcmp_gc(s1, s2, l2) \ (__extension__ ({ const unsigned char *__s1 = \ (const unsigned char *) (const char *) (s1); \ register int __result = \ __s1[0] - ((const unsigned char *) \ (const char *) (s2))[0]; \ if (l2 > 0 && __result == 0) \ { \ __result = (__s1[1] \ - ((const unsigned char *) \ (const char *) (s2))[1]); \ if (l2 > 1 && __result == 0) \ { \ __result = \ (__s1[2] - ((const unsigned char *) \ (const char *) (s2))[2]); \ if (l2 > 2 && __result == 0) \ __result = \ (__s1[3] \ - ((const unsigned char *) \ (const char *) (s2))[3]); \ } \ } \ __result; })) #endif # 915 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 /* Compare N characters of S1 and S2. */ #ifndef _HAVE_STRING_ARCH_strncmp # define strncmp(s1, s2, n) \ (__extension__ (__builtin_constant_p (n) \ && ((__builtin_constant_p (s1) \ && strlen (s1) < ((size_t) (n))) \ || (__builtin_constant_p (s2) \ && strlen (s2) < ((size_t) (n)))) \ ? strcmp (s1, s2) : strncmp (s1, s2, n))) #endif # 927 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 /* Return the length of the initial segment of S which consists entirely of characters not in REJECT. */ #if !defined _HAVE_STRING_ARCH_strcspn || defined _FORCE_INLINES # ifndef _HAVE_STRING_ARCH_strcspn # if __GNUC_PREREQ (3, 2) # define strcspn(s, reject) \ __extension__ \ ({ char __r0, __r1, __r2; \ (__builtin_constant_p (reject) && __string2_1bptr_p (reject) \ ? ((__builtin_constant_p (s) && __string2_1bptr_p (s)) \ ? __builtin_strcspn (s, reject) \ : ((__r0 = ((const char *) (reject))[0], __r0 == '\0') \ ? strlen (s) \ : ((__r1 = ((const char *) (reject))[1], __r1 == '\0') \ ? __strcspn_c1 (s, __r0) \ : ((__r2 = ((const char *) (reject))[2], __r2 == '\0') \ ? __strcspn_c2 (s, __r0, __r1) \ : (((const char *) (reject))[3] == '\0' \ ? __strcspn_c3 (s, __r0, __r1, __r2) \ : __builtin_strcspn (s, reject)))))) \ : __builtin_strcspn (s, reject)); }) # else # 951 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # define strcspn(s, reject) \ __extension__ \ ({ char __r0, __r1, __r2; \ (__builtin_constant_p (reject) && __string2_1bptr_p (reject) \ ? ((__r0 = ((const char *) (reject))[0], __r0 == '\0') \ ? strlen (s) \ : ((__r1 = ((const char *) (reject))[1], __r1 == '\0') \ ? __strcspn_c1 (s, __r0) \ : ((__r2 = ((const char *) (reject))[2], __r2 == '\0') \ ? __strcspn_c2 (s, __r0, __r1) \ : (((const char *) (reject))[3] == '\0' \ ? __strcspn_c3 (s, __r0, __r1, __r2) \ : strcspn (s, reject))))) \ : strcspn (s, reject)); }) # endif # 966 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # endif # 967 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 __STRING_INLINE size_t __strcspn_c1 (const char *__s, int __reject); __STRING_INLINE size_t __strcspn_c1 (const char *__s, int __reject) { register size_t __result = 0; while (__s[__result] != '\0' && __s[__result] != __reject) ++__result; return __result; } __STRING_INLINE size_t __strcspn_c2 (const char *__s, int __reject1, int __reject2); __STRING_INLINE size_t __strcspn_c2 (const char *__s, int __reject1, int __reject2) { register size_t __result = 0; while (__s[__result] != '\0' && __s[__result] != __reject1 && __s[__result] != __reject2) ++__result; return __result; } __STRING_INLINE size_t __strcspn_c3 (const char *__s, int __reject1, int __reject2, int __reject3); __STRING_INLINE size_t __strcspn_c3 (const char *__s, int __reject1, int __reject2, int __reject3) { register size_t __result = 0; while (__s[__result] != '\0' && __s[__result] != __reject1 && __s[__result] != __reject2 && __s[__result] != __reject3) ++__result; return __result; } #endif # 1003 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 /* Return the length of the initial segment of S which consists entirely of characters in ACCEPT. */ #if !defined _HAVE_STRING_ARCH_strspn || defined _FORCE_INLINES # ifndef _HAVE_STRING_ARCH_strspn # if __GNUC_PREREQ (3, 2) # define strspn(s, accept) \ __extension__ \ ({ char __a0, __a1, __a2; \ (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ ? ((__builtin_constant_p (s) && __string2_1bptr_p (s)) \ ? __builtin_strspn (s, accept) \ : ((__a0 = ((const char *) (accept))[0], __a0 == '\0') \ ? ((void) (s), (size_t) 0) \ : ((__a1 = ((const char *) (accept))[1], __a1 == '\0') \ ? __strspn_c1 (s, __a0) \ : ((__a2 = ((const char *) (accept))[2], __a2 == '\0') \ ? __strspn_c2 (s, __a0, __a1) \ : (((const char *) (accept))[3] == '\0' \ ? __strspn_c3 (s, __a0, __a1, __a2) \ : __builtin_strspn (s, accept)))))) \ : __builtin_strspn (s, accept)); }) # else # 1027 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # define strspn(s, accept) \ __extension__ \ ({ char __a0, __a1, __a2; \ (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ ? ((__a0 = ((const char *) (accept))[0], __a0 == '\0') \ ? ((void) (s), (size_t) 0) \ : ((__a1 = ((const char *) (accept))[1], __a1 == '\0') \ ? __strspn_c1 (s, __a0) \ : ((__a2 = ((const char *) (accept))[2], __a2 == '\0') \ ? __strspn_c2 (s, __a0, __a1) \ : (((const char *) (accept))[3] == '\0' \ ? __strspn_c3 (s, __a0, __a1, __a2) \ : strspn (s, accept))))) \ : strspn (s, accept)); }) # endif # 1042 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # endif # 1043 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 __STRING_INLINE size_t __strspn_c1 (const char *__s, int __accept); __STRING_INLINE size_t __strspn_c1 (const char *__s, int __accept) { register size_t __result = 0; /* Please note that __accept never can be '\0'. */ while (__s[__result] == __accept) ++__result; return __result; } __STRING_INLINE size_t __strspn_c2 (const char *__s, int __accept1, int __accept2); __STRING_INLINE size_t __strspn_c2 (const char *__s, int __accept1, int __accept2) { register size_t __result = 0; /* Please note that __accept1 and __accept2 never can be '\0'. */ while (__s[__result] == __accept1 || __s[__result] == __accept2) ++__result; return __result; } __STRING_INLINE size_t __strspn_c3 (const char *__s, int __accept1, int __accept2, int __accept3); __STRING_INLINE size_t __strspn_c3 (const char *__s, int __accept1, int __accept2, int __accept3) { register size_t __result = 0; /* Please note that __accept1 to __accept3 never can be '\0'. */ while (__s[__result] == __accept1 || __s[__result] == __accept2 || __s[__result] == __accept3) ++__result; return __result; } #endif # 1080 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 /* Find the first occurrence in S of any character in ACCEPT. */ #if !defined _HAVE_STRING_ARCH_strpbrk || defined _FORCE_INLINES # ifndef _HAVE_STRING_ARCH_strpbrk # if __GNUC_PREREQ (3, 2) # define strpbrk(s, accept) \ __extension__ \ ({ char __a0, __a1, __a2; \ (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ ? ((__builtin_constant_p (s) && __string2_1bptr_p (s)) \ ? __builtin_strpbrk (s, accept) \ : ((__a0 = ((const char *) (accept))[0], __a0 == '\0') \ ? ((void) (s), (char *) NULL) \ : ((__a1 = ((const char *) (accept))[1], __a1 == '\0') \ ? __builtin_strchr (s, __a0) \ : ((__a2 = ((const char *) (accept))[2], __a2 == '\0') \ ? __strpbrk_c2 (s, __a0, __a1) \ : (((const char *) (accept))[3] == '\0' \ ? __strpbrk_c3 (s, __a0, __a1, __a2) \ : __builtin_strpbrk (s, accept)))))) \ : __builtin_strpbrk (s, accept)); }) # else # 1103 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # define strpbrk(s, accept) \ __extension__ \ ({ char __a0, __a1, __a2; \ (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ ? ((__a0 = ((const char *) (accept))[0], __a0 == '\0') \ ? ((void) (s), (char *) NULL) \ : ((__a1 = ((const char *) (accept))[1], __a1 == '\0') \ ? strchr (s, __a0) \ : ((__a2 = ((const char *) (accept))[2], __a2 == '\0') \ ? __strpbrk_c2 (s, __a0, __a1) \ : (((const char *) (accept))[3] == '\0' \ ? __strpbrk_c3 (s, __a0, __a1, __a2) \ : strpbrk (s, accept))))) \ : strpbrk (s, accept)); }) # endif # 1118 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # endif # 1119 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 __STRING_INLINE char *__strpbrk_c2 (const char *__s, int __accept1, int __accept2); __STRING_INLINE char * __strpbrk_c2 (const char *__s, int __accept1, int __accept2) { /* Please note that __accept1 and __accept2 never can be '\0'. */ while (*__s != '\0' && *__s != __accept1 && *__s != __accept2) ++__s; return *__s == '\0' ? NULL : (char *) (size_t) __s; } __STRING_INLINE char *__strpbrk_c3 (const char *__s, int __accept1, int __accept2, int __accept3); __STRING_INLINE char * __strpbrk_c3 (const char *__s, int __accept1, int __accept2, int __accept3) { /* Please note that __accept1 to __accept3 never can be '\0'. */ while (*__s != '\0' && *__s != __accept1 && *__s != __accept2 && *__s != __accept3) ++__s; return *__s == '\0' ? NULL : (char *) (size_t) __s; } #endif # 1143 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 /* Find the first occurrence of NEEDLE in HAYSTACK. Newer gcc versions do this itself. */ #if !defined _HAVE_STRING_ARCH_strstr && !__GNUC_PREREQ (2, 97) # define strstr(haystack, needle) \ (__extension__ (__builtin_constant_p (needle) && __string2_1bptr_p (needle) \ ? (((const char *) (needle))[0] == '\0' \ ? (char *) (size_t) (haystack) \ : (((const char *) (needle))[1] == '\0' \ ? strchr (haystack, \ ((const char *) (needle))[0]) \ : strstr (haystack, needle))) \ : strstr (haystack, needle))) #endif # 1158 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 #if !defined _HAVE_STRING_ARCH_strtok_r || defined _FORCE_INLINES # ifndef _HAVE_STRING_ARCH_strtok_r # define __strtok_r(s, sep, nextp) \ (__extension__ (__builtin_constant_p (sep) && __string2_1bptr_p (sep) \ && ((const char *) (sep))[0] != '\0' \ && ((const char *) (sep))[1] == '\0' \ ? __strtok_r_1c (s, ((const char *) (sep))[0], nextp) \ : __strtok_r (s, sep, nextp))) # endif # 1169 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 __STRING_INLINE char *__strtok_r_1c (char *__s, char __sep, char **__nextp); __STRING_INLINE char * __strtok_r_1c (char *__s, char __sep, char **__nextp) { char *__result; if (__s == NULL) __s = *__nextp; while (*__s == __sep) ++__s; __result = NULL; if (*__s != '\0') { __result = __s++; while (*__s != '\0') if (*__s++ == __sep) { __s[-1] = '\0'; break; } } *__nextp = __s; return __result; } # if defined __USE_POSIX || defined __USE_MISC # define strtok_r(s, sep, nextp) __strtok_r (s, sep, nextp) # endif # 1196 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 #endif # 1197 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 #if !defined _HAVE_STRING_ARCH_strsep || defined _FORCE_INLINES # ifndef _HAVE_STRING_ARCH_strsep extern char *__strsep_g (char **__stringp, const char *__delim); # define __strsep(s, reject) \ __extension__ \ ({ char __r0, __r1, __r2; \ (__builtin_constant_p (reject) && __string2_1bptr_p (reject) \ && (__r0 = ((const char *) (reject))[0], \ ((const char *) (reject))[0] != '\0') \ ? ((__r1 = ((const char *) (reject))[1], \ ((const char *) (reject))[1] == '\0') \ ? __strsep_1c (s, __r0) \ : ((__r2 = ((const char *) (reject))[2], __r2 == '\0') \ ? __strsep_2c (s, __r0, __r1) \ : (((const char *) (reject))[3] == '\0' \ ? __strsep_3c (s, __r0, __r1, __r2) \ : __strsep_g (s, reject)))) \ : __strsep_g (s, reject)); }) # endif # 1219 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 __STRING_INLINE char *__strsep_1c (char **__s, char __reject); __STRING_INLINE char * __strsep_1c (char **__s, char __reject) { register char *__retval = *__s; if (__retval != NULL && (*__s = strchr (__retval, __reject)) != NULL) *(*__s)++ = '\0'; return __retval; } __STRING_INLINE char *__strsep_2c (char **__s, char __reject1, char __reject2); __STRING_INLINE char * __strsep_2c (char **__s, char __reject1, char __reject2) { register char *__retval = *__s; if (__retval != NULL) { register char *__cp = __retval; while (1) { if (*__cp == '\0') { __cp = NULL; break; } if (*__cp == __reject1 || *__cp == __reject2) { *__cp++ = '\0'; break; } ++__cp; } *__s = __cp; } return __retval; } __STRING_INLINE char *__strsep_3c (char **__s, char __reject1, char __reject2, char __reject3); __STRING_INLINE char * __strsep_3c (char **__s, char __reject1, char __reject2, char __reject3) { register char *__retval = *__s; if (__retval != NULL) { register char *__cp = __retval; while (1) { if (*__cp == '\0') { __cp = NULL; break; } if (*__cp == __reject1 || *__cp == __reject2 || *__cp == __reject3) { *__cp++ = '\0'; break; } ++__cp; } *__s = __cp; } return __retval; } # ifdef __USE_BSD # define strsep(s, reject) __strsep (s, reject) # endif # 1287 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 #endif # 1288 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 /* We need the memory allocation functions for inline strdup(). Referring to stdlib.h (even minimally) is not allowed in any of the tight standards compliant modes. */ #ifdef __USE_MISC # if !defined _HAVE_STRING_ARCH_strdup || !defined _HAVE_STRING_ARCH_strndup # define __need_malloc_and_calloc #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 1296 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # 1297 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # endif # 1298 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # ifndef _HAVE_STRING_ARCH_strdup #ifndef __C99_COMPOUND_LITERAL extern char *__strdup (const char *__string) __THROW __attribute_malloc__; # define __strdup(s) \ (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \ ? (((const char *) (s))[0] == '\0' \ ? (char *) calloc ((size_t) 1, (size_t) 1) \ : ({ size_t __len = strlen (s) + 1; \ char *__retval = (char *) malloc (__len); \ if (__retval != NULL) \ __retval = (char *) memcpy (__retval, s, __len); \ __retval; })) \ : __strdup (s))) #endif # 1313 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED # define strdup(s) __strdup (s) # endif # 1316 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # endif # 1317 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # ifndef _HAVE_STRING_ARCH_strndup extern char *__strndup (const char *__string, size_t __n) __THROW __attribute_malloc__; # define __strndup(s, n) \ (__extension__ (__builtin_constant_p (s) && __string2_1bptr_p (s) \ ? (((const char *) (s))[0] == '\0' \ ? (char *) calloc ((size_t) 1, (size_t) 1) \ : ({ size_t __len = strlen (s) + 1; \ size_t __n = (n); \ char *__retval; \ if (__n < __len) \ __len = __n + 1; \ __retval = (char *) malloc (__len); \ if (__retval != NULL) \ { \ __retval[__len - 1] = '\0'; \ __retval = (char *) memcpy (__retval, s, \ __len - 1); \ } \ __retval; })) \ : __strndup (s, n))) # ifdef __USE_GNU # define strndup(s, n) __strndup (s, n) # endif # 1344 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # endif # 1345 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 #endif /* Use misc. or use GNU. */ # 1347 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 #ifndef _FORCE_INLINES # undef __STRING_INLINE #endif # 1351 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 #endif /* No string inlines. */ # 1353 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/string2.h" 3 # 634 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 2 3 # endif # 635 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 # if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function /* Functions with security checks. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 638 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 # 639 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 # endif # 640 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 #endif # 641 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 __END_DECLS #endif /* string.h */ # 645 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/string.h" 3 # 27 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #else # 28 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #ifdef HAVE_STDLIB_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 29 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 30 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 31 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #ifdef HAVE_STDARG_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 32 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 33 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 34 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #ifdef HAVE_STRING_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 36 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 37 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 38 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #ifdef HAVE_LIMITS_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 40 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 1 3 /* Copyright (C) 1991, 1992, 1996, 1997, 1998, 1999, 2000, 2005 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types */ #ifndef _LIBC_LIMITS_H_ #define _LIBC_LIMITS_H_ 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 /* Maximum length of any multibyte character in any locale. We define this value here since the gcc header does not define the correct value. */ #define MB_LEN_MAX 16 /* If we are not using GNU CC we have to define all the symbols ourself. Otherwise use gcc's definitions (see below). */ #if !defined __GNUC__ || __GNUC__ < 2 /* We only protect from multiple inclusion here, because all the other #include's protect themselves, and in GCC 2 we may #include_next through multiple copies of this file before we get to GCC's. */ # ifndef _LIMITS_H # define _LIMITS_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 45 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 46 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 /* We don't have #include_next. Define ANSI for standard 32-bit words. */ /* These assume 8-bit `char's, 16-bit `short int's, and 32-bit `int's and `long int's. */ /* Number of bits in a `char'. */ # define CHAR_BIT 8 /* Minimum and maximum values a `signed char' can hold. */ # define SCHAR_MIN (-128) # define SCHAR_MAX 127 /* Maximum value an `unsigned char' can hold. (Minimum is 0.) */ # define UCHAR_MAX 255 /* Minimum and maximum values a `char' can hold. */ # ifdef __CHAR_UNSIGNED__ # define CHAR_MIN 0 # define CHAR_MAX UCHAR_MAX # else # 68 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # define CHAR_MIN SCHAR_MIN # define CHAR_MAX SCHAR_MAX # endif # 71 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 /* Minimum and maximum values a `signed short int' can hold. */ # define SHRT_MIN (-32768) # define SHRT_MAX 32767 /* Maximum value an `unsigned short int' can hold. (Minimum is 0.) */ # define USHRT_MAX 65535 /* Minimum and maximum values a `signed int' can hold. */ # define INT_MIN (-INT_MAX - 1) # define INT_MAX 2147483647 /* Maximum value an `unsigned int' can hold. (Minimum is 0.) */ # define UINT_MAX 4294967295U /* Minimum and maximum values a `signed long int' can hold. */ # if __WORDSIZE == 64 # define LONG_MAX 9223372036854775807L # else # 90 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # define LONG_MAX 2147483647L # endif # 92 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # define LONG_MIN (-LONG_MAX - 1L) /* Maximum value an `unsigned long int' can hold. (Minimum is 0.) */ # if __WORDSIZE == 64 # define ULONG_MAX 18446744073709551615UL # else # 98 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # define ULONG_MAX 4294967295UL # endif # 100 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # ifdef __USE_ISOC99 /* Minimum and maximum values a `signed long long int' can hold. */ # define LLONG_MAX 9223372036854775807LL # define LLONG_MIN (-LLONG_MAX - 1LL) /* Maximum value an `unsigned long long int' can hold. (Minimum is 0.) */ # define ULLONG_MAX 18446744073709551615ULL # endif /* ISO C99 */ # 111 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # endif /* limits.h */ # 113 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif /* GCC 2. */ # 114 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif /* !_LIBC_LIMITS_H_ */ # 116 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 /* Get the compiler's limits.h, which defines almost all the ISO constants. We put this #include_next outside the double inclusion check because it should be possible to include this file more than once and still get the definitions from gcc's header. */ #if defined __GNUC__ && !defined _GCC_LIMITS_H_ /* `_GCC_LIMITS_H_' is what GCC's file defines. */ #if 0 /* expanded by -frewrite-includes */ # include_next #endif /* expanded by -frewrite-includes */ # 124 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 1 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/limits.h" 1 3 /*===---- limits.h - Standard header for integer sizes --------------------===*\ * * Copyright (c) 2009 Chris Lattner * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * \*===----------------------------------------------------------------------===*/ #ifndef __CLANG_LIMITS_H #define __CLANG_LIMITS_H /* The system's limits.h may, in turn, try to #include_next GCC's limits.h. Avert this #include_next madness. */ #if defined __GNUC__ && !defined _GCC_LIMITS_H_ #define _GCC_LIMITS_H_ #endif # 33 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/limits.h" 3 /* System headers include a number of constants from POSIX in . Include it if we're hosted. */ #if __STDC_HOSTED__ && (1)/*__has_include_next()*/ #if 0 /* expanded by -frewrite-includes */ #include_next #endif /* expanded by -frewrite-includes */ # 37 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/limits.h" 3 # 38 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/limits.h" 3 #endif # 39 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/limits.h" 3 /* Many system headers try to "help us out" by defining these. No really, we know how big each datatype is. */ #undef SCHAR_MIN #undef SCHAR_MAX #undef UCHAR_MAX #undef SHRT_MIN #undef SHRT_MAX #undef USHRT_MAX #undef INT_MIN #undef INT_MAX #undef UINT_MAX #undef LONG_MIN #undef LONG_MAX #undef ULONG_MAX #undef CHAR_BIT #undef CHAR_MIN #undef CHAR_MAX /* C90/99 5.2.4.2.1 */ #define SCHAR_MAX __SCHAR_MAX__ #define SHRT_MAX __SHRT_MAX__ #define INT_MAX __INT_MAX__ #define LONG_MAX __LONG_MAX__ #define SCHAR_MIN (-__SCHAR_MAX__-1) #define SHRT_MIN (-__SHRT_MAX__ -1) #define INT_MIN (-__INT_MAX__ -1) #define LONG_MIN (-__LONG_MAX__ -1L) #define UCHAR_MAX (__SCHAR_MAX__*2 +1) #define USHRT_MAX (__SHRT_MAX__ *2 +1) #define UINT_MAX (__INT_MAX__ *2U +1U) #define ULONG_MAX (__LONG_MAX__ *2UL+1UL) #ifndef MB_LEN_MAX #define MB_LEN_MAX 1 #endif # 78 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/limits.h" 3 #define CHAR_BIT __CHAR_BIT__ #ifdef __CHAR_UNSIGNED__ /* -funsigned-char */ #define CHAR_MIN 0 #define CHAR_MAX UCHAR_MAX #else # 85 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/limits.h" 3 #define CHAR_MIN SCHAR_MIN #define CHAR_MAX __SCHAR_MAX__ #endif # 88 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/limits.h" 3 /* C99 5.2.4.2.1: Added long long. C++11 18.3.3.2: same contents as the Standard C Library header . */ #if __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L #undef LLONG_MIN #undef LLONG_MAX #undef ULLONG_MAX #define LLONG_MAX __LONG_LONG_MAX__ #define LLONG_MIN (-__LONG_LONG_MAX__-1LL) #define ULLONG_MAX (__LONG_LONG_MAX__*2ULL+1ULL) #endif # 102 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/limits.h" 3 /* LONG_LONG_MIN/LONG_LONG_MAX/ULONG_LONG_MAX are a GNU extension. It's too bad that we don't have something like #pragma poison that could be used to deprecate a macro - the code should just use LLONG_MAX and friends. */ #if defined(__GNU_LIBRARY__) ? defined(__USE_GNU) : !defined(__STRICT_ANSI__) #undef LONG_LONG_MIN #undef LONG_LONG_MAX #undef ULONG_LONG_MAX #define LONG_LONG_MAX __LONG_LONG_MAX__ #define LONG_LONG_MIN (-__LONG_LONG_MAX__-1LL) #define ULONG_LONG_MAX (__LONG_LONG_MAX__*2ULL+1ULL) #endif # 117 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/limits.h" 3 #endif /* __CLANG_LIMITS_H */ # 119 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/limits.h" 3 # 125 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 2 3 #endif # 126 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 /* The files in some gcc versions don't define LLONG_MIN, LLONG_MAX, and ULLONG_MAX. Instead only the values gcc defined for ages are available. */ #if defined __USE_ISOC99 && defined __GNUC__ # ifndef LLONG_MIN # define LLONG_MIN (-LLONG_MAX-1) # endif # 134 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # ifndef LLONG_MAX # define LLONG_MAX __LONG_LONG_MAX__ # endif # 137 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # ifndef ULLONG_MAX # define ULLONG_MAX (LLONG_MAX * 2ULL + 1) # endif # 140 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif # 141 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #ifdef __USE_POSIX /* POSIX adds things to . */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 144 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix1_lim.h" 1 3 /* Copyright (C) 1991-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 2.9.2 Minimum Values Added to * * Never include this file directly; use instead. */ #ifndef _BITS_POSIX1_LIM_H #define _BITS_POSIX1_LIM_H 1 /* These are the standard-mandated minimum values. */ /* Minimum number of operations in one list I/O call. */ #define _POSIX_AIO_LISTIO_MAX 2 /* Minimal number of outstanding asynchronous I/O operations. */ #define _POSIX_AIO_MAX 1 /* Maximum length of arguments to `execve', including environment. */ #define _POSIX_ARG_MAX 4096 /* Maximum simultaneous processes per real user ID. */ #ifdef __USE_XOPEN2K # define _POSIX_CHILD_MAX 25 #else # 43 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix1_lim.h" 3 # define _POSIX_CHILD_MAX 6 #endif # 45 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix1_lim.h" 3 /* Minimal number of timer expiration overruns. */ #define _POSIX_DELAYTIMER_MAX 32 /* Maximum length of a host name (not including the terminating null) as returned from the GETHOSTNAME function. */ #define _POSIX_HOST_NAME_MAX 255 /* Maximum link count of a file. */ #define _POSIX_LINK_MAX 8 /* Maximum length of login name. */ #define _POSIX_LOGIN_NAME_MAX 9 /* Number of bytes in a terminal canonical input queue. */ #define _POSIX_MAX_CANON 255 /* Number of bytes for which space will be available in a terminal input queue. */ #define _POSIX_MAX_INPUT 255 /* Maximum number of message queues open for a process. */ #define _POSIX_MQ_OPEN_MAX 8 /* Maximum number of supported message priorities. */ #define _POSIX_MQ_PRIO_MAX 32 /* Number of bytes in a filename. */ #define _POSIX_NAME_MAX 14 /* Number of simultaneous supplementary group IDs per process. */ #ifdef __USE_XOPEN2K # define _POSIX_NGROUPS_MAX 8 #else # 79 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix1_lim.h" 3 # define _POSIX_NGROUPS_MAX 0 #endif # 81 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix1_lim.h" 3 /* Number of files one process can have open at once. */ #ifdef __USE_XOPEN2K # define _POSIX_OPEN_MAX 20 #else # 86 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix1_lim.h" 3 # define _POSIX_OPEN_MAX 16 #endif # 88 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix1_lim.h" 3 #if !defined __USE_XOPEN2K || defined __USE_GNU /* Number of descriptors that a process may examine with `pselect' or `select'. */ # define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX #endif # 94 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix1_lim.h" 3 /* Number of bytes in a pathname. */ #define _POSIX_PATH_MAX 256 /* Number of bytes than can be written atomically to a pipe. */ #define _POSIX_PIPE_BUF 512 /* The number of repeated occurrences of a BRE permitted by the REGEXEC and REGCOMP functions when using the interval notation. */ #define _POSIX_RE_DUP_MAX 255 /* Minimal number of realtime signals reserved for the application. */ #define _POSIX_RTSIG_MAX 8 /* Number of semaphores a process can have. */ #define _POSIX_SEM_NSEMS_MAX 256 /* Maximal value of a semaphore. */ #define _POSIX_SEM_VALUE_MAX 32767 /* Number of pending realtime signals. */ #define _POSIX_SIGQUEUE_MAX 32 /* Largest value of a `ssize_t'. */ #define _POSIX_SSIZE_MAX 32767 /* Number of streams a process can have open at once. */ #define _POSIX_STREAM_MAX 8 /* The number of bytes in a symbolic link. */ #define _POSIX_SYMLINK_MAX 255 /* The number of symbolic links that can be traversed in the resolution of a pathname in the absence of a loop. */ #define _POSIX_SYMLOOP_MAX 8 /* Number of timer for a process. */ #define _POSIX_TIMER_MAX 32 /* Maximum number of characters in a tty name. */ #define _POSIX_TTY_NAME_MAX 9 /* Maximum length of a timezone name (element of `tzname'). */ #ifdef __USE_XOPEN2K # define _POSIX_TZNAME_MAX 6 #else # 140 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix1_lim.h" 3 # define _POSIX_TZNAME_MAX 3 #endif # 142 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix1_lim.h" 3 #if !defined __USE_XOPEN2K || defined __USE_GNU /* Maximum number of connections that can be queued on a socket. */ # define _POSIX_QLIMIT 1 /* Maximum number of bytes that can be buffered on a socket for send or receive. */ # define _POSIX_HIWAT _POSIX_PIPE_BUF /* Maximum number of elements in an `iovec' array. */ # define _POSIX_UIO_MAXIOV 16 #endif # 154 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix1_lim.h" 3 /* Maximum clock resolution in nanoseconds. */ #define _POSIX_CLOCKRES_MIN 20000000 /* Get the implementation-specific values for the above. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 160 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix1_lim.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/local_lim.h" 1 3 /* Minimum guaranteed maximum values for system limits. Linux/PPC version. Copyright (C) 1993-1998,2000,2002-2004,2006,2008 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; see the file COPYING.LIB. If not, see . */ /* The kernel header pollutes the namespace with the NR_OPEN symbol and defines LINK_MAX although filesystems have different maxima. A similar thing is true for OPEN_MAX: the limit can be changed at runtime and therefore the macro must not be defined. Remove this after including the header if necessary. */ #ifndef NR_OPEN # define __undef_NR_OPEN #endif # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/local_lim.h" 3 #ifndef LINK_MAX # define __undef_LINK_MAX #endif # 31 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/local_lim.h" 3 #ifndef OPEN_MAX # define __undef_OPEN_MAX #endif # 34 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/local_lim.h" 3 #ifndef ARG_MAX # define __undef_ARG_MAX #endif # 37 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/local_lim.h" 3 /* The kernel sources contain a file with all the needed information. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/local_lim.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/limits.h" 1 3 #ifndef _LINUX_LIMITS_H #define _LINUX_LIMITS_H #define NR_OPEN 1024 #define NGROUPS_MAX 65536 /* supplemental group IDs are available */ #define ARG_MAX 131072 /* # bytes of args + environ for exec() */ #define LINK_MAX 127 /* # links a file may have */ #define MAX_CANON 255 /* size of the canonical input queue */ #define MAX_INPUT 255 /* size of the type-ahead buffer */ #define NAME_MAX 255 /* # chars in a file name */ #define PATH_MAX 4096 /* # chars in a path name including nul */ #define PIPE_BUF 4096 /* # bytes in atomic write to a pipe */ #define XATTR_NAME_MAX 255 /* # chars in an extended attribute name */ #define XATTR_SIZE_MAX 65536 /* size of an extended attribute value (64k) */ #define XATTR_LIST_MAX 65536 /* size of extended attribute namelist (64k) */ #define RTSIG_MAX 32 #endif # 21 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/limits.h" 3 # 40 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/local_lim.h" 2 3 /* Have to remove NR_OPEN? */ #ifdef __undef_NR_OPEN # undef NR_OPEN # undef __undef_NR_OPEN #endif # 46 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/local_lim.h" 3 /* Have to remove LINK_MAX? */ #ifdef __undef_LINK_MAX # undef LINK_MAX # undef __undef_LINK_MAX #endif # 51 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/local_lim.h" 3 /* Have to remove OPEN_MAX? */ #ifdef __undef_OPEN_MAX # undef OPEN_MAX # undef __undef_OPEN_MAX #endif # 56 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/local_lim.h" 3 /* Have to remove ARG_MAX? */ #ifdef __undef_ARG_MAX # undef ARG_MAX # undef __undef_ARG_MAX #endif # 61 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/local_lim.h" 3 /* The number of data keys per process. */ #define _POSIX_THREAD_KEYS_MAX 128 /* This is the value this implementation supports. */ #define PTHREAD_KEYS_MAX 1024 /* Controlling the iterations of destructors for thread-specific data. */ #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4 /* Number of iterations this implementation does. */ #define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS /* The number of threads per process. */ #define _POSIX_THREAD_THREADS_MAX 64 /* We have no predefined limit on the number of threads. */ #undef PTHREAD_THREADS_MAX /* Maximum amount by which a process can descrease its asynchronous I/O priority level. */ #define AIO_PRIO_DELTA_MAX 20 /* Minimum size for a thread. At least two pages for systems with 64k pages. */ #define PTHREAD_STACK_MIN 131072 /* Maximum number of timer expiration overruns. */ #define DELAYTIMER_MAX 2147483647 /* Maximum tty name length. */ #define TTY_NAME_MAX 32 /* Maximum login name length. This is arbitrary. */ #define LOGIN_NAME_MAX 256 /* Maximum host name length. */ #define HOST_NAME_MAX 64 /* Maximum message queue priority level. */ #define MQ_PRIO_MAX 32768 /* Maximum value the semaphore can have. */ #define SEM_VALUE_MAX (2147483647) # 161 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix1_lim.h" 2 3 #ifndef SSIZE_MAX # define SSIZE_MAX LONG_MAX #endif # 166 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix1_lim.h" 3 /* This value is a guaranteed minimum maximum. The current maximum can be got from `sysconf'. */ #ifndef NGROUPS_MAX # define NGROUPS_MAX 8 #endif # 174 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix1_lim.h" 3 #endif /* bits/posix1_lim.h */ # 176 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix1_lim.h" 3 # 145 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 2 3 #endif # 146 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #ifdef __USE_POSIX2 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 148 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix2_lim.h" 1 3 /* Copyright (C) 1991, 1996, 1999, 2000, 2001 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * Never include this file directly; include instead. */ #ifndef _BITS_POSIX2_LIM_H #define _BITS_POSIX2_LIM_H 1 /* The maximum `ibase' and `obase' values allowed by the `bc' utility. */ #define _POSIX2_BC_BASE_MAX 99 /* The maximum number of elements allowed in an array by the `bc' utility. */ #define _POSIX2_BC_DIM_MAX 2048 /* The maximum `scale' value allowed by the `bc' utility. */ #define _POSIX2_BC_SCALE_MAX 99 /* The maximum length of a string constant accepted by the `bc' utility. */ #define _POSIX2_BC_STRING_MAX 1000 /* The maximum number of weights that can be assigned to an entry of the LC_COLLATE `order' keyword in the locale definition file. */ #define _POSIX2_COLL_WEIGHTS_MAX 2 /* The maximum number of expressions that can be nested within parentheses by the `expr' utility. */ #define _POSIX2_EXPR_NEST_MAX 32 /* The maximum length, in bytes, of an input line. */ #define _POSIX2_LINE_MAX 2048 /* The maximum number of repeated occurrences of a regular expression permitted when using the interval notation `\{M,N\}'. */ #define _POSIX2_RE_DUP_MAX 255 /* The maximum number of bytes in a character class name. We have no fixed limit, 2048 is a high number. */ #define _POSIX2_CHARCLASS_NAME_MAX 14 /* These values are implementation-specific, and may vary within the implementation. Their precise values can be obtained from sysconf. */ #ifndef BC_BASE_MAX #define BC_BASE_MAX _POSIX2_BC_BASE_MAX #endif # 65 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix2_lim.h" 3 #ifndef BC_DIM_MAX #define BC_DIM_MAX _POSIX2_BC_DIM_MAX #endif # 68 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix2_lim.h" 3 #ifndef BC_SCALE_MAX #define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX #endif # 71 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix2_lim.h" 3 #ifndef BC_STRING_MAX #define BC_STRING_MAX _POSIX2_BC_STRING_MAX #endif # 74 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix2_lim.h" 3 #ifndef COLL_WEIGHTS_MAX #define COLL_WEIGHTS_MAX 255 #endif # 77 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix2_lim.h" 3 #ifndef EXPR_NEST_MAX #define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX #endif # 80 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix2_lim.h" 3 #ifndef LINE_MAX #define LINE_MAX _POSIX2_LINE_MAX #endif # 83 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix2_lim.h" 3 #ifndef CHARCLASS_NAME_MAX #define CHARCLASS_NAME_MAX 2048 #endif # 86 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix2_lim.h" 3 /* This value is defined like this in regex.h. */ #define RE_DUP_MAX (0x7fff) #endif /* bits/posix2_lim.h */ # 91 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix2_lim.h" 3 # 149 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 2 3 #endif # 150 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #ifdef __USE_XOPEN #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 152 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 153 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif # 154 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 41 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #endif # 42 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #ifdef HAVE_SYS_TYPES_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 44 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 45 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 46 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" /* for MAXHOSTNAMELEN under Linux and OSX */ #ifdef HAVE_SYS_PARAM_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 49 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 1 3 /* Compatibility header for old-style Unix parameters and limits. Copyright (C) 1995-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_PARAM_H #define _SYS_PARAM_H 1 #define __need_NULL #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 23 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 3 # 1 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 1 3 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) /* Always define miscellaneous pieces when modules are available. */ #if !__has_feature(modules) #define __STDDEF_H #endif # 37 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 44 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_ptrdiff_t) #if !defined(_PTRDIFF_T) || __has_feature(modules) /* Always define ptrdiff_t when modules are available. */ #if !__has_feature(modules) #define _PTRDIFF_T #endif # 51 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 53 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 55 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_size_t) #if !defined(_SIZE_T) || __has_feature(modules) /* Always define size_t when modules are available. */ #if !__has_feature(modules) #define _SIZE_T #endif # 62 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ size_t; #endif # 64 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_size_t #endif /*defined(__need_size_t) */ # 66 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) /* Always define rsize_t when modules are available. */ #if !__has_feature(modules) #define _RSIZE_T #endif # 76 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ rsize_t; #endif # 78 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif /* defined(__need_STDDEF_H_misc) */ # 79 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_wchar_t) #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if !defined(_WCHAR_T) || __has_feature(modules) #if !__has_feature(modules) #define _WCHAR_T #if defined(_MSC_EXTENSIONS) #define _WCHAR_T_DEFINED #endif # 89 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 90 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WCHAR_TYPE__ wchar_t; #endif # 92 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 93 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 95 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_NULL) #undef NULL #ifdef __cplusplus # if !defined(__MINGW32__) && !defined(_MSC_VER) # define NULL __null # else # 102 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL 0 # endif # 104 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #else # 105 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL ((void*)0) #endif # 107 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #ifdef __cplusplus #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 112 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 113 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_NULL #endif /* defined(__need_NULL) */ # 115 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 118 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 119 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 120 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 123 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if defined(__need_wint_t) /* Always define wint_t when modules are available. */ #if !defined(_WINT_T) || __has_feature(modules) #if !__has_feature(modules) #define _WINT_T #endif # 132 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WINT_TYPE__ wint_t; #endif # 134 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wint_t #endif /* __need_wint_t */ # 136 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 138 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 24 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 25 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 3 # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 1 3 /* Copyright (C) 1991, 1992, 1996, 1997, 1998, 1999, 2000, 2005 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types */ #ifndef _LIBC_LIMITS_H_ #define _LIBC_LIMITS_H_ 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 /* Maximum length of any multibyte character in any locale. We define this value here since the gcc header does not define the correct value. */ #define MB_LEN_MAX 16 /* If we are not using GNU CC we have to define all the symbols ourself. Otherwise use gcc's definitions (see below). */ #if !defined __GNUC__ || __GNUC__ < 2 /* We only protect from multiple inclusion here, because all the other #include's protect themselves, and in GCC 2 we may #include_next through multiple copies of this file before we get to GCC's. */ # ifndef _LIMITS_H # define _LIMITS_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 45 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 46 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 /* We don't have #include_next. Define ANSI for standard 32-bit words. */ /* These assume 8-bit `char's, 16-bit `short int's, and 32-bit `int's and `long int's. */ /* Number of bits in a `char'. */ # define CHAR_BIT 8 /* Minimum and maximum values a `signed char' can hold. */ # define SCHAR_MIN (-128) # define SCHAR_MAX 127 /* Maximum value an `unsigned char' can hold. (Minimum is 0.) */ # define UCHAR_MAX 255 /* Minimum and maximum values a `char' can hold. */ # ifdef __CHAR_UNSIGNED__ # define CHAR_MIN 0 # define CHAR_MAX UCHAR_MAX # else # 68 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # define CHAR_MIN SCHAR_MIN # define CHAR_MAX SCHAR_MAX # endif # 71 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 /* Minimum and maximum values a `signed short int' can hold. */ # define SHRT_MIN (-32768) # define SHRT_MAX 32767 /* Maximum value an `unsigned short int' can hold. (Minimum is 0.) */ # define USHRT_MAX 65535 /* Minimum and maximum values a `signed int' can hold. */ # define INT_MIN (-INT_MAX - 1) # define INT_MAX 2147483647 /* Maximum value an `unsigned int' can hold. (Minimum is 0.) */ # define UINT_MAX 4294967295U /* Minimum and maximum values a `signed long int' can hold. */ # if __WORDSIZE == 64 # define LONG_MAX 9223372036854775807L # else # 90 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # define LONG_MAX 2147483647L # endif # 92 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # define LONG_MIN (-LONG_MAX - 1L) /* Maximum value an `unsigned long int' can hold. (Minimum is 0.) */ # if __WORDSIZE == 64 # define ULONG_MAX 18446744073709551615UL # else # 98 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # define ULONG_MAX 4294967295UL # endif # 100 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # ifdef __USE_ISOC99 /* Minimum and maximum values a `signed long long int' can hold. */ # define LLONG_MAX 9223372036854775807LL # define LLONG_MIN (-LLONG_MAX - 1LL) /* Maximum value an `unsigned long long int' can hold. (Minimum is 0.) */ # define ULLONG_MAX 18446744073709551615ULL # endif /* ISO C99 */ # 111 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # endif /* limits.h */ # 113 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif /* GCC 2. */ # 114 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif /* !_LIBC_LIMITS_H_ */ # 116 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 /* Get the compiler's limits.h, which defines almost all the ISO constants. We put this #include_next outside the double inclusion check because it should be possible to include this file more than once and still get the definitions from gcc's header. */ #if defined __GNUC__ && !defined _GCC_LIMITS_H_ /* `_GCC_LIMITS_H_' is what GCC's file defines. */ #if 0 /* expanded by -frewrite-includes */ # include_next #endif /* expanded by -frewrite-includes */ # 124 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 125 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif # 126 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 /* The files in some gcc versions don't define LLONG_MIN, LLONG_MAX, and ULLONG_MAX. Instead only the values gcc defined for ages are available. */ #if defined __USE_ISOC99 && defined __GNUC__ # ifndef LLONG_MIN # define LLONG_MIN (-LLONG_MAX-1) # endif # 134 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # ifndef LLONG_MAX # define LLONG_MAX __LONG_LONG_MAX__ # endif # 137 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # ifndef ULLONG_MAX # define ULLONG_MAX (LLONG_MAX * 2ULL + 1) # endif # 140 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif # 141 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #ifdef __USE_POSIX /* POSIX adds things to . */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 144 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 145 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif # 146 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #ifdef __USE_POSIX2 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 148 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 149 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif # 150 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #ifdef __USE_XOPEN #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 152 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 153 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif # 154 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include /* Define BYTE_ORDER et al. */ #endif /* expanded by -frewrite-includes */ # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 3 # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 3 #if 0 /* expanded by -frewrite-includes */ #include /* Define NSIG. */ #endif /* expanded by -frewrite-includes */ # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 1 3 /* Copyright (C) 1991-2004,2007,2009,2010,2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.14 Signal handling */ #ifndef _SIGNAL_H #if !defined __need_sig_atomic_t && !defined __need_sigset_t # define _SIGNAL_H #endif # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 29 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 __BEGIN_DECLS #if 0 /* expanded by -frewrite-includes */ #include /* __sigset_t, __sig_atomic_t. */ #endif /* expanded by -frewrite-includes */ # 32 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigset.h" 1 3 /* __sig_atomic_t, __sigset_t, and related definitions. Linux version. Copyright (C) 1991, 1992, 1994, 1996, 1997, 2007, 2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SIGSET_H_types # define _SIGSET_H_types 1 typedef int __sig_atomic_t; /* A `sigset_t' has a bit for each signal. */ # define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int))) typedef struct { unsigned long int __val[_SIGSET_NWORDS]; } __sigset_t; #endif # 34 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigset.h" 3 /* We only want to define these functions if was actually included; otherwise we were included just to define the types. Since we are namespace-clean, it wouldn't hurt to define extra macros. But trouble can be caused by functions being defined (e.g., any global register vars declared later will cause compilation errors). */ #if !defined _SIGSET_H_fns && defined _SIGNAL_H # define _SIGSET_H_fns 1 # ifndef _EXTERN_INLINE # define _EXTERN_INLINE __extern_inline # endif # 48 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigset.h" 3 /* Return a mask that includes the bit for SIG only. */ # define __sigmask(sig) \ (((unsigned long int) 1) << (((sig) - 1) % (8 * sizeof (unsigned long int)))) /* Return the word index for SIG. */ # define __sigword(sig) (((sig) - 1) / (8 * sizeof (unsigned long int))) # if defined __GNUC__ && __GNUC__ >= 2 # define __sigemptyset(set) \ (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ sigset_t *__set = (set); \ while (--__cnt >= 0) __set->__val[__cnt] = 0; \ 0; })) # define __sigfillset(set) \ (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ sigset_t *__set = (set); \ while (--__cnt >= 0) __set->__val[__cnt] = ~0UL; \ 0; })) # ifdef __USE_GNU /* The POSIX does not specify for handling the whole signal set in one command. This is often wanted and so we define three more functions here. */ # define __sigisemptyset(set) \ (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ const sigset_t *__set = (set); \ int __ret = __set->__val[--__cnt]; \ while (!__ret && --__cnt >= 0) \ __ret = __set->__val[__cnt]; \ __ret == 0; })) # define __sigandset(dest, left, right) \ (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ sigset_t *__dest = (dest); \ const sigset_t *__left = (left); \ const sigset_t *__right = (right); \ while (--__cnt >= 0) \ __dest->__val[__cnt] = (__left->__val[__cnt] \ & __right->__val[__cnt]); \ 0; })) # define __sigorset(dest, left, right) \ (__extension__ ({ int __cnt = _SIGSET_NWORDS; \ sigset_t *__dest = (dest); \ const sigset_t *__left = (left); \ const sigset_t *__right = (right); \ while (--__cnt >= 0) \ __dest->__val[__cnt] = (__left->__val[__cnt] \ | __right->__val[__cnt]); \ 0; })) # endif # 98 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigset.h" 3 # endif # 99 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigset.h" 3 /* These functions needn't check for a bogus signal number -- error checking is done in the non __ versions. */ extern int __sigismember (const __sigset_t *, int); extern int __sigaddset (__sigset_t *, int); extern int __sigdelset (__sigset_t *, int); # ifdef __USE_EXTERN_INLINES # define __SIGSETFN(NAME, BODY, CONST) \ _EXTERN_INLINE int \ NAME (CONST __sigset_t *__set, int __sig) \ { \ unsigned long int __mask = __sigmask (__sig); \ unsigned long int __word = __sigword (__sig); \ return BODY; \ } __SIGSETFN (__sigismember, (__set->__val[__word] & __mask) ? 1 : 0, const) __SIGSETFN (__sigaddset, ((__set->__val[__word] |= __mask), 0), ) __SIGSETFN (__sigdelset, ((__set->__val[__word] &= ~__mask), 0), ) # undef __SIGSETFN # endif # 123 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigset.h" 3 #endif /* ! _SIGSET_H_fns. */ # 126 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigset.h" 3 # 33 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 2 3 /* An integral type that can be modified atomically, without the possibility of a signal arriving in the middle of the operation. */ #if defined __need_sig_atomic_t || defined _SIGNAL_H # ifndef __sig_atomic_t_defined # define __sig_atomic_t_defined __BEGIN_NAMESPACE_STD typedef __sig_atomic_t sig_atomic_t; __END_NAMESPACE_STD # endif # 43 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # undef __need_sig_atomic_t #endif # 45 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #if defined __need_sigset_t || (defined _SIGNAL_H && defined __USE_POSIX) # ifndef __sigset_t_defined # define __sigset_t_defined typedef __sigset_t sigset_t; # endif # 51 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # undef __need_sigset_t #endif # 53 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #ifdef _SIGNAL_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 56 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 57 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 57 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/signum.h" 1 3 /* Signal number definitions. Linux version. Copyright (C) 1995,1996,1997,1998,1999,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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifdef _SIGNAL_H /* Fake signal functions. */ #define SIG_ERR ((__sighandler_t) -1) /* Error return. */ #define SIG_DFL ((__sighandler_t) 0) /* Default action. */ #define SIG_IGN ((__sighandler_t) 1) /* Ignore signal. */ #ifdef __USE_UNIX98 # define SIG_HOLD ((__sighandler_t) 2) /* Add signal to hold mask. */ #endif # 29 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/signum.h" 3 /* Signals. */ #define SIGHUP 1 /* Hangup (POSIX). */ #define SIGINT 2 /* Interrupt (ANSI). */ #define SIGQUIT 3 /* Quit (POSIX). */ #define SIGILL 4 /* Illegal instruction (ANSI). */ #define SIGTRAP 5 /* Trace trap (POSIX). */ #define SIGABRT 6 /* Abort (ANSI). */ #define SIGIOT 6 /* IOT trap (4.2 BSD). */ #define SIGBUS 7 /* BUS error (4.2 BSD). */ #define SIGFPE 8 /* Floating-point exception (ANSI). */ #define SIGKILL 9 /* Kill, unblockable (POSIX). */ #define SIGUSR1 10 /* User-defined signal 1 (POSIX). */ #define SIGSEGV 11 /* Segmentation violation (ANSI). */ #define SIGUSR2 12 /* User-defined signal 2 (POSIX). */ #define SIGPIPE 13 /* Broken pipe (POSIX). */ #define SIGALRM 14 /* Alarm clock (POSIX). */ #define SIGTERM 15 /* Termination (ANSI). */ #define SIGSTKFLT 16 /* Stack fault. */ #define SIGCLD SIGCHLD /* Same as SIGCHLD (System V). */ #define SIGCHLD 17 /* Child status has changed (POSIX). */ #define SIGCONT 18 /* Continue (POSIX). */ #define SIGSTOP 19 /* Stop, unblockable (POSIX). */ #define SIGTSTP 20 /* Keyboard stop (POSIX). */ #define SIGTTIN 21 /* Background read from tty (POSIX). */ #define SIGTTOU 22 /* Background write to tty (POSIX). */ #define SIGURG 23 /* Urgent condition on socket (4.2 BSD). */ #define SIGXCPU 24 /* CPU limit exceeded (4.2 BSD). */ #define SIGXFSZ 25 /* File size limit exceeded (4.2 BSD). */ #define SIGVTALRM 26 /* Virtual alarm clock (4.2 BSD). */ #define SIGPROF 27 /* Profiling alarm clock (4.2 BSD). */ #define SIGWINCH 28 /* Window size change (4.3 BSD, Sun). */ #define SIGPOLL SIGIO /* Pollable event occurred (System V). */ #define SIGIO 29 /* I/O now possible (4.2 BSD). */ #define SIGPWR 30 /* Power failure restart (System V). */ #define SIGSYS 31 /* Bad system call. */ #define SIGUNUSED 31 #define _NSIG 65 /* Biggest signal number + 1 (including real-time signals). */ #define SIGRTMIN (__libc_current_sigrtmin ()) #define SIGRTMAX (__libc_current_sigrtmax ()) /* These are the hard limits of the kernel. These values should not be used directly at user level. */ #define __SIGRTMIN 32 #define __SIGRTMAX (_NSIG - 1) #endif /* included. */ # 80 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/signum.h" 3 # 58 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 2 3 #if defined __USE_XOPEN || defined __USE_XOPEN2K # ifndef __pid_t_defined typedef __pid_t pid_t; # define __pid_t_defined #endif # 64 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #ifdef __USE_XOPEN # endif # 66 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # ifndef __uid_t_defined typedef __uid_t uid_t; # define __uid_t_defined # endif # 70 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #endif /* Unix98 */ # 71 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #ifdef __USE_POSIX199309 /* We need `struct timespec' later on. */ # define __need_timespec #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 75 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 1 3 /* Copyright (C) 1991-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.23 Date and time */ #ifndef _TIME_H #if (! defined __need_time_t && !defined __need_clock_t && \ ! defined __need_timespec) # define _TIME_H 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_DECLS #endif # 32 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #ifdef _TIME_H /* Get size_t and NULL from . */ # define __need_size_t # define __need_NULL #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 37 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 38 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* This defines CLOCKS_PER_SEC, which is the number of processor clock ticks per second. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 41 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 42 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* This is the obsolete POSIX.1-1988 name for the same constant. */ # if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K # ifndef CLK_TCK # define CLK_TCK CLOCKS_PER_SEC # endif # 48 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # endif # 49 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #endif /* included. */ # 51 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #if !defined __clock_t_defined && (defined _TIME_H || defined __need_clock_t) # define __clock_t_defined 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 55 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 56 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Returned by `clock'. */ typedef __clock_t clock_t; __END_NAMESPACE_STD #if defined __USE_XOPEN || defined __USE_POSIX || defined __USE_MISC __USING_NAMESPACE_STD(clock_t) #endif # 64 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #endif /* clock_t not defined and or need clock_t. */ # 66 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __need_clock_t #if !defined __time_t_defined && (defined _TIME_H || defined __need_time_t) # define __time_t_defined 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 71 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 72 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Returned by `time'. */ typedef __time_t time_t; __END_NAMESPACE_STD #if defined __USE_POSIX || defined __USE_MISC || defined __USE_SVID __USING_NAMESPACE_STD(time_t) #endif # 80 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #endif /* time_t not defined and or need time_t. */ # 82 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __need_time_t #if !defined __clockid_t_defined && \ ((defined _TIME_H && defined __USE_POSIX199309) || defined __need_clockid_t) # define __clockid_t_defined 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 88 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 89 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Clock ID used in clock and timer functions. */ typedef __clockid_t clockid_t; #endif /* clockid_t not defined and or need clockid_t. */ # 94 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __clockid_time_t #if !defined __timer_t_defined && \ ((defined _TIME_H && defined __USE_POSIX199309) || defined __need_timer_t) # define __timer_t_defined 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 100 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 101 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Timer ID returned by `timer_create'. */ typedef __timer_t timer_t; #endif /* timer_t not defined and or need timer_t. */ # 106 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __need_timer_t #if (!defined __timespec_defined \ && ((defined _TIME_H \ && (defined __USE_POSIX199309 || defined __USE_MISC \ || defined __USE_ISOC11)) \ || defined __need_timespec)) # define __timespec_defined 1 #if 0 /* expanded by -frewrite-includes */ # include /* This defines __time_t for us. */ #endif /* expanded by -frewrite-includes */ # 116 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 117 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* POSIX.1b structure for a time value. This is like a `struct timeval' but has nanoseconds instead of microseconds. */ struct timespec { __time_t tv_sec; /* Seconds. */ __syscall_slong_t tv_nsec; /* Nanoseconds. */ }; #endif /* timespec not defined and or need timespec. */ # 127 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __need_timespec #ifdef _TIME_H __BEGIN_NAMESPACE_STD /* Used by other time functions. */ struct tm { int tm_sec; /* Seconds. [0-60] (1 leap second) */ int tm_min; /* Minutes. [0-59] */ int tm_hour; /* Hours. [0-23] */ int tm_mday; /* Day. [1-31] */ int tm_mon; /* Month. [0-11] */ int tm_year; /* Year - 1900. */ int tm_wday; /* Day of week. [0-6] */ int tm_yday; /* Days in year.[0-365] */ int tm_isdst; /* DST. [-1/0/1]*/ # ifdef __USE_BSD long int tm_gmtoff; /* Seconds east of UTC. */ const char *tm_zone; /* Timezone abbreviation. */ # else # 149 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 long int __tm_gmtoff; /* Seconds east of UTC. */ const char *__tm_zone; /* Timezone abbreviation. */ # endif # 152 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 }; __END_NAMESPACE_STD #if defined __USE_XOPEN || defined __USE_POSIX || defined __USE_MISC __USING_NAMESPACE_STD(tm) #endif # 157 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_POSIX199309 /* POSIX.1b structure for timer start values and intervals. */ struct itimerspec { struct timespec it_interval; struct timespec it_value; }; /* We can use a simple forward declaration. */ struct sigevent; # endif /* POSIX.1b */ # 171 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_XOPEN2K # ifndef __pid_t_defined typedef __pid_t pid_t; # define __pid_t_defined # endif # 177 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # endif # 178 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_ISOC11 /* Time base values for timespec_get. */ # define TIME_UTC 1 # endif # 184 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Time used by the program so far (user time + system time). The result / CLOCKS_PER_SECOND is program time in seconds. */ extern clock_t clock (void) __THROW; /* Return the current time and put it in *TIMER if TIMER is not NULL. */ extern time_t time (time_t *__timer) __THROW; /* Return the difference between TIME1 and TIME0. */ extern double difftime (time_t __time1, time_t __time0) __THROW __attribute__ ((__const__)); /* Return the `time_t' representation of TP and normalize TP. */ extern time_t mktime (struct tm *__tp) __THROW; /* Format TP into S according to FORMAT. Write no more than MAXSIZE characters and return the number of characters written, or 0 if it would exceed MAXSIZE. */ extern size_t strftime (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp) __THROW; __END_NAMESPACE_STD # ifdef __USE_XOPEN /* Parse S according to FORMAT and store binary time information in TP. The return value is a pointer to the first unparsed character in S. */ extern char *strptime (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp) __THROW; # endif # 217 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_XOPEN2K8 /* Similar to the two functions above but take the information from the provided locale and not the global locale. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 221 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 222 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 extern size_t strftime_l (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp, __locale_t __loc) __THROW; # endif # 228 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_GNU extern char *strptime_l (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp, __locale_t __loc) __THROW; # endif # 234 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Return the `struct tm' representation of *TIMER in Universal Coordinated Time (aka Greenwich Mean Time). */ extern struct tm *gmtime (const time_t *__timer) __THROW; /* Return the `struct tm' representation of *TIMER in the local timezone. */ extern struct tm *localtime (const time_t *__timer) __THROW; __END_NAMESPACE_STD # if defined __USE_POSIX || defined __USE_MISC /* Return the `struct tm' representation of *TIMER in UTC, using *TP to store the result. */ extern struct tm *gmtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) __THROW; /* Return the `struct tm' representation of *TIMER in local time, using *TP to store the result. */ extern struct tm *localtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) __THROW; # endif /* POSIX or misc */ # 257 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ extern char *asctime (const struct tm *__tp) __THROW; /* Equivalent to `asctime (localtime (timer))'. */ extern char *ctime (const time_t *__timer) __THROW; __END_NAMESPACE_STD # if defined __USE_POSIX || defined __USE_MISC /* Reentrant versions of the above functions. */ /* Return in BUF a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ extern char *asctime_r (const struct tm *__restrict __tp, char *__restrict __buf) __THROW; /* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */ extern char *ctime_r (const time_t *__restrict __timer, char *__restrict __buf) __THROW; # endif /* POSIX or misc */ # 279 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Defined in localtime.c. */ extern char *__tzname[2]; /* Current timezone names. */ extern int __daylight; /* If daylight-saving time is ever in use. */ extern long int __timezone; /* Seconds west of UTC. */ # ifdef __USE_POSIX /* Same as above. */ extern char *tzname[2]; /* Set time conversion information from the TZ environment variable. If TZ is not defined, a locale-dependent default is used. */ extern void tzset (void) __THROW; # endif # 295 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # if defined __USE_SVID || defined __USE_XOPEN extern int daylight; extern long int timezone; # endif # 300 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_SVID /* Set the system time to *WHEN. This call is restricted to the superuser. */ extern int stime (const time_t *__when) __THROW; # endif # 306 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Nonzero if YEAR is a leap year (every 4 years, except every 100th isn't, and every 400th is). */ # define __isleap(year) \ ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) # ifdef __USE_MISC /* Miscellaneous functions many Unices inherited from the public domain localtime package. These are included only for compatibility. */ /* Like `mktime', but for TP represents Universal Time, not local time. */ extern time_t timegm (struct tm *__tp) __THROW; /* Another name for `mktime'. */ extern time_t timelocal (struct tm *__tp) __THROW; /* Return the number of days in YEAR. */ extern int dysize (int __year) __THROW __attribute__ ((__const__)); # endif # 327 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_POSIX199309 /* Pause execution for a number of nanoseconds. This function is a cancellation point and therefore not marked with __THROW. */ extern int nanosleep (const struct timespec *__requested_time, struct timespec *__remaining); /* Get resolution of clock CLOCK_ID. */ extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __THROW; /* Get current value of clock CLOCK_ID and store it in TP. */ extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW; /* Set clock CLOCK_ID to value TP. */ extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp) __THROW; # ifdef __USE_XOPEN2K /* High-resolution sleep with the specified clock. This function is a cancellation point and therefore not marked with __THROW. */ extern int clock_nanosleep (clockid_t __clock_id, int __flags, const struct timespec *__req, struct timespec *__rem); /* Return clock ID for CPU-time clock. */ extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW; # endif # 360 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Create new per-process timer using CLOCK_ID. */ extern int timer_create (clockid_t __clock_id, struct sigevent *__restrict __evp, timer_t *__restrict __timerid) __THROW; /* Delete timer TIMERID. */ extern int timer_delete (timer_t __timerid) __THROW; /* Set timer TIMERID to VALUE, returning old value in OVALUE. */ extern int timer_settime (timer_t __timerid, int __flags, const struct itimerspec *__restrict __value, struct itimerspec *__restrict __ovalue) __THROW; /* Get current value of timer TIMERID and store it in VALUE. */ extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) __THROW; /* Get expiration overrun for timer TIMERID. */ extern int timer_getoverrun (timer_t __timerid) __THROW; # endif # 382 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_ISOC11 /* Set TS to calendar time based in time base BASE. */ extern int timespec_get (struct timespec *__ts, int __base) __THROW __nonnull ((1)); # endif # 389 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_XOPEN_EXTENDED /* Set to one of the following values to indicate an error. 1 the DATEMSK environment variable is null or undefined, 2 the template file cannot be opened for reading, 3 failed to get file status information, 4 the template file is not a regular file, 5 an error is encountered while reading the template file, 6 memory allication failed (not enough memory available), 7 there is no line in the template that matches the input, 8 invalid input specification Example: February 31 or a time is specified that can not be represented in a time_t (representing the time in seconds since 00:00:00 UTC, January 1, 1970) */ extern int getdate_err; /* Parse the given string as a date specification and return a value representing the value. The templates from the file identified by the environment variable DATEMSK are used. In case of an error `getdate_err' is set. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct tm *getdate (const char *__string); # endif # 414 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_GNU /* Since `getdate' is not reentrant because of the use of `getdate_err' and the static buffer to return the result in, we provide a thread-safe variant. The functionality is the same. The result is returned in the buffer pointed to by RESBUFP and in case of an error the return value is != 0 with the same values as given above for `getdate_err'. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int getdate_r (const char *__restrict __string, struct tm *__restrict __resbufp); # endif # 429 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __END_DECLS #endif /* included. */ # 433 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #endif /* not already included. */ # 435 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 76 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 2 3 #endif # 77 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED /* Get the `siginfo_t' type plus the needed symbols. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 80 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/siginfo.h" 1 3 /* siginfo_t, sigevent and constants. Linux version. Copyright (C) 1997-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if !defined _SIGNAL_H && !defined __need_siginfo_t \ && !defined __need_sigevent_t # error "Never include this file directly. Use instead" #endif # 23 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/siginfo.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 24 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/siginfo.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 1 3 /* Determine the wordsize from the preprocessor defines. */ #if defined __powerpc64__ # define __WORDSIZE 64 # define __WORDSIZE_TIME64_COMPAT32 1 #else # 7 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 # define __WORDSIZE 32 #endif # 9 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 #if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL /* Signal the glibc ABI didn't used to have a `long double'. The changes all the `long double' function variants to be redirects to the double functions. */ # define __LONG_DOUBLE_MATH_OPTIONAL 1 # ifndef __LONG_DOUBLE_128__ # define __NO_LONG_DOUBLE_MATH 1 # endif # 19 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 #endif # 20 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 # 25 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/siginfo.h" 2 3 #if (!defined __have_sigval_t \ && (defined _SIGNAL_H || defined __need_siginfo_t \ || defined __need_sigevent_t)) # define __have_sigval_t 1 /* Type for data associated with a signal. */ typedef union sigval { int sival_int; void *sival_ptr; } sigval_t; #endif # 38 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/siginfo.h" 3 #if (!defined __have_siginfo_t \ && (defined _SIGNAL_H || defined __need_siginfo_t)) # define __have_siginfo_t 1 # define __SI_MAX_SIZE 128 # if __WORDSIZE == 64 # define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4) # else # 47 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/siginfo.h" 3 # define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 3) # endif # 49 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/siginfo.h" 3 typedef struct { int si_signo; /* Signal number. */ int si_errno; /* If non-zero, an errno value associated with this signal, as defined in . */ int si_code; /* Signal code. */ union { int _pad[__SI_PAD_SIZE]; /* kill(). */ struct { __pid_t si_pid; /* Sending process ID. */ __uid_t si_uid; /* Real user ID of sending process. */ } _kill; /* POSIX.1b timers. */ struct { int si_tid; /* Timer ID. */ int si_overrun; /* Overrun count. */ sigval_t si_sigval; /* Signal value. */ } _timer; /* POSIX.1b signals. */ struct { __pid_t si_pid; /* Sending process ID. */ __uid_t si_uid; /* Real user ID of sending process. */ sigval_t si_sigval; /* Signal value. */ } _rt; /* SIGCHLD. */ struct { __pid_t si_pid; /* Which child. */ __uid_t si_uid; /* Real user ID of sending process. */ int si_status; /* Exit value or signal. */ __clock_t si_utime; __clock_t si_stime; } _sigchld; /* SIGILL, SIGFPE, SIGSEGV, SIGBUS. */ struct { void *si_addr; /* Faulting insn/memory ref. */ } _sigfault; /* SIGPOLL. */ struct { long int si_band; /* Band event for SIGPOLL. */ int si_fd; } _sigpoll; /* SIGSYS. */ struct { void *_call_addr; /* Calling user insn. */ int _syscall; /* Triggering system call number. */ unsigned int _arch; /* AUDIT_ARCH_* of syscall. */ } _sigsys; } _sifields; } siginfo_t; /* X/Open requires some more fields with fixed names. */ # define si_pid _sifields._kill.si_pid # define si_uid _sifields._kill.si_uid # define si_timerid _sifields._timer.si_tid # define si_overrun _sifields._timer.si_overrun # define si_status _sifields._sigchld.si_status # define si_utime _sifields._sigchld.si_utime # define si_stime _sifields._sigchld.si_stime # define si_value _sifields._rt.si_sigval # define si_int _sifields._rt.si_sigval.sival_int # define si_ptr _sifields._rt.si_sigval.sival_ptr # define si_addr _sifields._sigfault.si_addr # define si_band _sifields._sigpoll.si_band # define si_fd _sifields._sigpoll.si_fd # define si_call_addr _sifields._sigsys._call_addr # define si_syscall _sifields._sigsys._syscall # define si_arch _sifields._sigsys._arch /* Values for `si_code'. Positive values are reserved for kernel-generated signals. */ enum { SI_ASYNCNL = -60, /* Sent by asynch name lookup completion. */ # define SI_ASYNCNL SI_ASYNCNL SI_TKILL = -6, /* Sent by tkill. */ # define SI_TKILL SI_TKILL SI_SIGIO, /* Sent by queued SIGIO. */ # define SI_SIGIO SI_SIGIO SI_ASYNCIO, /* Sent by AIO completion. */ # define SI_ASYNCIO SI_ASYNCIO SI_MESGQ, /* Sent by real time mesq state change. */ # define SI_MESGQ SI_MESGQ SI_TIMER, /* Sent by timer expiration. */ # define SI_TIMER SI_TIMER SI_QUEUE, /* Sent by sigqueue. */ # define SI_QUEUE SI_QUEUE SI_USER, /* Sent by kill, sigsend. */ # define SI_USER SI_USER SI_KERNEL = 0x80 /* Send by kernel. */ #define SI_KERNEL SI_KERNEL }; /* `si_code' values for SIGILL signal. */ enum { ILL_ILLOPC = 1, /* Illegal opcode. */ # define ILL_ILLOPC ILL_ILLOPC ILL_ILLOPN, /* Illegal operand. */ # define ILL_ILLOPN ILL_ILLOPN ILL_ILLADR, /* Illegal addressing mode. */ # define ILL_ILLADR ILL_ILLADR ILL_ILLTRP, /* Illegal trap. */ # define ILL_ILLTRP ILL_ILLTRP ILL_PRVOPC, /* Privileged opcode. */ # define ILL_PRVOPC ILL_PRVOPC ILL_PRVREG, /* Privileged register. */ # define ILL_PRVREG ILL_PRVREG ILL_COPROC, /* Coprocessor error. */ # define ILL_COPROC ILL_COPROC ILL_BADSTK /* Internal stack error. */ # define ILL_BADSTK ILL_BADSTK }; /* `si_code' values for SIGFPE signal. */ enum { FPE_INTDIV = 1, /* Integer divide by zero. */ # define FPE_INTDIV FPE_INTDIV FPE_INTOVF, /* Integer overflow. */ # define FPE_INTOVF FPE_INTOVF FPE_FLTDIV, /* Floating point divide by zero. */ # define FPE_FLTDIV FPE_FLTDIV FPE_FLTOVF, /* Floating point overflow. */ # define FPE_FLTOVF FPE_FLTOVF FPE_FLTUND, /* Floating point underflow. */ # define FPE_FLTUND FPE_FLTUND FPE_FLTRES, /* Floating point inexact result. */ # define FPE_FLTRES FPE_FLTRES FPE_FLTINV, /* Floating point invalid operation. */ # define FPE_FLTINV FPE_FLTINV FPE_FLTSUB /* Subscript out of range. */ # define FPE_FLTSUB FPE_FLTSUB }; /* `si_code' values for SIGSEGV signal. */ enum { SEGV_MAPERR = 1, /* Address not mapped to object. */ # define SEGV_MAPERR SEGV_MAPERR SEGV_ACCERR /* Invalid permissions for mapped object. */ # define SEGV_ACCERR SEGV_ACCERR }; /* `si_code' values for SIGBUS signal. */ enum { BUS_ADRALN = 1, /* Invalid address alignment. */ # define BUS_ADRALN BUS_ADRALN BUS_ADRERR, /* Non-existant physical address. */ # define BUS_ADRERR BUS_ADRERR BUS_OBJERR /* Object specific hardware error. */ # define BUS_OBJERR BUS_OBJERR }; /* `si_code' values for SIGTRAP signal. */ enum { TRAP_BRKPT = 1, /* Process breakpoint. */ # define TRAP_BRKPT TRAP_BRKPT TRAP_TRACE /* Process trace trap. */ # define TRAP_TRACE TRAP_TRACE }; /* `si_code' values for SIGCHLD signal. */ enum { CLD_EXITED = 1, /* Child has exited. */ # define CLD_EXITED CLD_EXITED CLD_KILLED, /* Child was killed. */ # define CLD_KILLED CLD_KILLED CLD_DUMPED, /* Child terminated abnormally. */ # define CLD_DUMPED CLD_DUMPED CLD_TRAPPED, /* Traced child has trapped. */ # define CLD_TRAPPED CLD_TRAPPED CLD_STOPPED, /* Child has stopped. */ # define CLD_STOPPED CLD_STOPPED CLD_CONTINUED /* Stopped child has continued. */ # define CLD_CONTINUED CLD_CONTINUED }; /* `si_code' values for SIGPOLL signal. */ enum { POLL_IN = 1, /* Data input available. */ # define POLL_IN POLL_IN POLL_OUT, /* Output buffers available. */ # define POLL_OUT POLL_OUT POLL_MSG, /* Input message available. */ # define POLL_MSG POLL_MSG POLL_ERR, /* I/O error. */ # define POLL_ERR POLL_ERR POLL_PRI, /* High priority input available. */ # define POLL_PRI POLL_PRI POLL_HUP /* Device disconnected. */ # define POLL_HUP POLL_HUP }; # undef __need_siginfo_t #endif /* !have siginfo_t && (have _SIGNAL_H || need siginfo_t). */ # 269 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/siginfo.h" 3 #if (defined _SIGNAL_H || defined __need_sigevent_t) \ && !defined __have_sigevent_t # define __have_sigevent_t 1 /* Structure to transport application-defined values with signals. */ # define __SIGEV_MAX_SIZE 64 # if __WORDSIZE == 64 # define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4) # else # 280 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/siginfo.h" 3 # define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 3) # endif # 282 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/siginfo.h" 3 /* Forward declaration. */ # ifndef __have_pthread_attr_t typedef union pthread_attr_t pthread_attr_t; # define __have_pthread_attr_t 1 # endif # 288 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/siginfo.h" 3 typedef struct sigevent { sigval_t sigev_value; int sigev_signo; int sigev_notify; union { int _pad[__SIGEV_PAD_SIZE]; /* When SIGEV_SIGNAL and SIGEV_THREAD_ID set, LWP ID of the thread to receive the signal. */ __pid_t _tid; struct { void (*_function) (sigval_t); /* Function to start. */ pthread_attr_t *_attribute; /* Thread attributes. */ } _sigev_thread; } _sigev_un; } sigevent_t; /* POSIX names to access some of the members. */ # define sigev_notify_function _sigev_un._sigev_thread._function # define sigev_notify_attributes _sigev_un._sigev_thread._attribute /* `sigev_notify' values. */ enum { SIGEV_SIGNAL = 0, /* Notify via signal. */ # define SIGEV_SIGNAL SIGEV_SIGNAL SIGEV_NONE, /* Other notification: meaningless. */ # define SIGEV_NONE SIGEV_NONE SIGEV_THREAD, /* Deliver via thread creation. */ # define SIGEV_THREAD SIGEV_THREAD SIGEV_THREAD_ID = 4 /* Send signal to specific thread. */ #define SIGEV_THREAD_ID SIGEV_THREAD_ID }; #endif /* have _SIGNAL_H. */ # 330 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/siginfo.h" 3 # 81 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 2 3 #endif # 82 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* Type of a signal handler. */ typedef void (*__sighandler_t) (int); /* The X/Open definition of `signal' specifies the SVID semantic. Use the additional function `sysv_signal' when X/Open compatibility is requested. */ extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) __THROW; #ifdef __USE_GNU extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) __THROW; #endif # 96 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* Set the handler for the signal SIG to HANDLER, returning the old handler, or SIG_ERR on error. By default `signal' has the BSD semantic. */ __BEGIN_NAMESPACE_STD #ifdef __USE_BSD extern __sighandler_t signal (int __sig, __sighandler_t __handler) __THROW; #else # 105 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* Make sure the used `signal' implementation is the SVID version. */ # ifdef __REDIRECT_NTH extern __sighandler_t __REDIRECT_NTH (signal, (int __sig, __sighandler_t __handler), __sysv_signal); # else # 111 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # define signal __sysv_signal # endif # 113 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #endif # 114 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 __END_NAMESPACE_STD #ifdef __USE_XOPEN /* The X/Open definition of `signal' conflicts with the BSD version. So they defined another function `bsd_signal'. */ extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler) __THROW; #endif # 122 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* Send signal SIG to process number PID. If PID is zero, send SIG to all processes in the current process's process group. If PID is < -1, send SIG to all processes in process group - PID. */ #ifdef __USE_POSIX extern int kill (__pid_t __pid, int __sig) __THROW; #endif /* Use POSIX. */ # 129 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Send SIG to all processes in process group PGRP. If PGRP is zero, send SIG to all processes in the current process's process group. */ extern int killpg (__pid_t __pgrp, int __sig) __THROW; #endif /* Use BSD || X/Open Unix. */ # 136 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 __BEGIN_NAMESPACE_STD /* Raise signal SIG, i.e., send SIG to yourself. */ extern int raise (int __sig) __THROW; __END_NAMESPACE_STD #ifdef __USE_SVID /* SVID names for the same things. */ extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) __THROW; extern int gsignal (int __sig) __THROW; #endif /* Use SVID. */ # 148 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #if defined __USE_MISC || defined __USE_XOPEN2K /* Print a message describing the meaning of the given signal number. */ extern void psignal (int __sig, const char *__s); #endif /* Use misc or POSIX 2008. */ # 153 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #ifdef __USE_XOPEN2K /* Print a message describing the meaning of the given signal information. */ extern void psiginfo (const siginfo_t *__pinfo, const char *__s); #endif /* POSIX 2008. */ # 158 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* The `sigpause' function has two different interfaces. The original BSD definition defines the argument as a mask of the signal, while the more modern interface in X/Open defines it as the signal number. We go with the BSD version unless the user explicitly selects the X/Open version. This function is a cancellation point and therefore not marked with __THROW. */ extern int __sigpause (int __sig_or_mask, int __is_sig); #ifdef __FAVOR_BSD /* Set the mask of blocked signals to MASK, wait for a signal to arrive, and then restore the mask. */ extern int sigpause (int __mask) __THROW __attribute_deprecated__; #else # 176 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # ifdef __USE_XOPEN # ifdef __GNUC__ extern int sigpause (int __sig) __asm__ ("__xpg_sigpause"); # else # 180 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* Remove a signal from the signal mask and suspend the process. */ # define sigpause(sig) __sigpause ((sig), 1) # endif # 183 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # endif # 184 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #endif # 185 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #ifdef __USE_BSD /* None of the following functions should be used anymore. They are here only for compatibility. A single word (`int') is not guaranteed to be enough to hold a complete signal mask and therefore these functions simply do not work in many situations. Use `sigprocmask' instead. */ /* Compute mask for signal SIG. */ # define sigmask(sig) __sigmask(sig) /* Block signals in MASK, returning the old mask. */ extern int sigblock (int __mask) __THROW __attribute_deprecated__; /* Set the mask of blocked signals to MASK, returning the old mask. */ extern int sigsetmask (int __mask) __THROW __attribute_deprecated__; /* Return currently selected signal mask. */ extern int siggetmask (void) __THROW __attribute_deprecated__; #endif /* Use BSD. */ # 205 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #ifdef __USE_MISC # define NSIG _NSIG #endif # 210 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #ifdef __USE_GNU typedef __sighandler_t sighandler_t; #endif # 214 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* 4.4 BSD uses the name `sig_t' for this. */ #ifdef __USE_BSD typedef __sighandler_t sig_t; #endif # 219 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #ifdef __USE_POSIX /* Clear all signals from SET. */ extern int sigemptyset (sigset_t *__set) __THROW __nonnull ((1)); /* Set all signals in SET. */ extern int sigfillset (sigset_t *__set) __THROW __nonnull ((1)); /* Add SIGNO to SET. */ extern int sigaddset (sigset_t *__set, int __signo) __THROW __nonnull ((1)); /* Remove SIGNO from SET. */ extern int sigdelset (sigset_t *__set, int __signo) __THROW __nonnull ((1)); /* Return 1 if SIGNO is in SET, 0 if not. */ extern int sigismember (const sigset_t *__set, int __signo) __THROW __nonnull ((1)); # ifdef __USE_GNU /* Return non-empty value is SET is not empty. */ extern int sigisemptyset (const sigset_t *__set) __THROW __nonnull ((1)); /* Build new signal set by combining the two inputs set using logical AND. */ extern int sigandset (sigset_t *__set, const sigset_t *__left, const sigset_t *__right) __THROW __nonnull ((1, 2, 3)); /* Build new signal set by combining the two inputs set using logical OR. */ extern int sigorset (sigset_t *__set, const sigset_t *__left, const sigset_t *__right) __THROW __nonnull ((1, 2, 3)); # endif /* GNU */ # 250 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* Get the system-specific definitions of `struct sigaction' and the `SA_*' and `SIG_*'. constants. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 253 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigaction.h" 1 3 /* The proper definitions for Linux's sigaction. Copyright (C) 1993-1999, 2000, 2010 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SIGNAL_H # error "Never include directly; use instead." #endif # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigaction.h" 3 /* Structure describing the action to be taken when a signal arrives. */ struct sigaction { /* Signal handler. */ #ifdef __USE_POSIX199309 union { /* Used if SA_SIGINFO is not set. */ __sighandler_t sa_handler; /* Used if SA_SIGINFO is set. */ void (*sa_sigaction) (int, siginfo_t *, void *); } __sigaction_handler; # define sa_handler __sigaction_handler.sa_handler # define sa_sigaction __sigaction_handler.sa_sigaction #else # 39 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigaction.h" 3 __sighandler_t sa_handler; #endif # 41 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigaction.h" 3 /* Additional set of signals to be blocked. */ __sigset_t sa_mask; /* Special flags. */ int sa_flags; /* Restore handler. */ void (*sa_restorer) (void); }; /* Bits in `sa_flags'. */ #define SA_NOCLDSTOP 1 /* Don't send SIGCHLD when children stop. */ #define SA_NOCLDWAIT 2 /* Don't create zombie on child death. */ #define SA_SIGINFO 4 /* Invoke signal-catching function with three arguments instead of one. */ #if defined __USE_UNIX98 || defined __USE_MISC # define SA_ONSTACK 0x08000000 /* Use signal stack by using `sa_restorer'. */ #endif # 60 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigaction.h" 3 #if defined __USE_UNIX98 || defined __USE_MISC || defined __USE_XOPEN2K8 # define SA_RESTART 0x10000000 /* Restart syscall on signal return. */ # define SA_NODEFER 0x40000000 /* Don't automatically block the signal when its handler is being executed. */ # define SA_RESETHAND 0x80000000 /* Reset to SIG_DFL on entry to handler. */ #endif # 66 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigaction.h" 3 #ifdef __USE_MISC # define SA_INTERRUPT 0x20000000 /* Historical no-op. */ /* Some aliases for the SA_ constants. */ # define SA_NOMASK SA_NODEFER # define SA_ONESHOT SA_RESETHAND # define SA_STACK SA_ONSTACK #endif # 74 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigaction.h" 3 /* Values for the HOW argument to `sigprocmask'. */ #define SIG_BLOCK 0 /* Block signals. */ #define SIG_UNBLOCK 1 /* Unblock signals. */ #define SIG_SETMASK 2 /* Set the set of blocked signals. */ # 254 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 2 3 /* Get and/or change the set of blocked signals. */ extern int sigprocmask (int __how, const sigset_t *__restrict __set, sigset_t *__restrict __oset) __THROW; /* Change the set of blocked signals to SET, wait until a signal arrives, and restore the set of blocked signals. This function is a cancellation point and therefore not marked with __THROW. */ extern int sigsuspend (const sigset_t *__set) __nonnull ((1)); /* Get and/or set the action for signal SIG. */ extern int sigaction (int __sig, const struct sigaction *__restrict __act, struct sigaction *__restrict __oact) __THROW; /* Put in SET all signals that are blocked and waiting to be delivered. */ extern int sigpending (sigset_t *__set) __THROW __nonnull ((1)); /* Select any of pending signals from SET or wait for any to arrive. This function is a cancellation point and therefore not marked with __THROW. */ extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig) __nonnull ((1, 2)); # ifdef __USE_POSIX199309 /* Select any of pending signals from SET and place information in INFO. This function is a cancellation point and therefore not marked with __THROW. */ extern int sigwaitinfo (const sigset_t *__restrict __set, siginfo_t *__restrict __info) __nonnull ((1)); /* Select any of pending signals from SET and place information in INFO. Wait the time specified by TIMEOUT if no signal is pending. This function is a cancellation point and therefore not marked with __THROW. */ extern int sigtimedwait (const sigset_t *__restrict __set, siginfo_t *__restrict __info, const struct timespec *__restrict __timeout) __nonnull ((1)); /* Send signal SIG to the process PID. Associate data in VAL with the signal. */ extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val) __THROW; # endif /* Use POSIX 199306. */ # 304 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #endif /* Use POSIX. */ # 306 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #ifdef __USE_BSD /* Names of the signals. This variable exists only for compatibility. Use `strsignal' instead (see ). */ extern const char *const _sys_siglist[_NSIG]; extern const char *const sys_siglist[_NSIG]; /* Structure passed to `sigvec'. */ struct sigvec { __sighandler_t sv_handler; /* Signal handler. */ int sv_mask; /* Mask of signals to be blocked. */ int sv_flags; /* Flags (see below). */ # define sv_onstack sv_flags /* 4.2 BSD compatibility. */ }; /* Bits in `sv_flags'. */ # define SV_ONSTACK (1 << 0)/* Take the signal on the signal stack. */ # define SV_INTERRUPT (1 << 1)/* Do not restart system calls. */ # define SV_RESETHAND (1 << 2)/* Reset handler to SIG_DFL on receipt. */ /* If VEC is non-NULL, set the handler for SIG to the `sv_handler' member of VEC. The signals in `sv_mask' will be blocked while the handler runs. If the SV_RESETHAND bit is set in `sv_flags', the handler for SIG will be reset to SIG_DFL before `sv_handler' is entered. If OVEC is non-NULL, it is filled in with the old information for SIG. */ extern int sigvec (int __sig, const struct sigvec *__vec, struct sigvec *__ovec) __THROW; /* Get machine-dependent `struct sigcontext' and signal subcodes. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 340 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigcontext.h" 1 3 /* Copyright (C) 1996, 1997, 1998, 2011 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H # error "Never use directly; include instead." #endif # 21 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigcontext.h" 3 #ifndef sigcontext_struct /* Kernel headers before 2.1.1 define a struct sigcontext_struct, but we need sigcontext. */ # define sigcontext_struct sigcontext #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigcontext.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/sigcontext.h" 1 3 #ifndef _ASM_POWERPC_SIGCONTEXT_H #define _ASM_POWERPC_SIGCONTEXT_H /* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 11 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/sigcontext.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/ptrace.h" 1 3 #ifndef _ASM_POWERPC_PTRACE_H #define _ASM_POWERPC_PTRACE_H /* * Copyright (C) 2001 PPC64 Team, IBM Corp * * This struct defines the way the registers are stored on the * kernel stack during a system call or other kernel entry. * * this should only contain __volatile__ regs * since we can keep non-volatile in the thread_struct * should set this up when only volatiles are saved * by intr code. * * Since this is going on the stack, *CARE MUST BE TAKEN* to insure * that the overall structure is a multiple of 16 bytes in length. * * Note that the offsets of the fields in this struct correspond with * the PT_* values below. This simplifies arch/powerpc/kernel/ptrace.c. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #ifndef __ASSEMBLY__ struct pt_regs { unsigned long gpr[32]; unsigned long nip; unsigned long msr; unsigned long orig_gpr3; /* Used for restarting system calls */ unsigned long ctr; unsigned long link; unsigned long xer; unsigned long ccr; #ifdef __powerpc64__ unsigned long softe; /* Soft enabled/disabled */ #else # 41 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/ptrace.h" 3 unsigned long mq; /* 601 only (not used at present) */ /* Used on APUS to hold IPL value. */ #endif # 44 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/ptrace.h" 3 unsigned long trap; /* Reason for being here */ /* N.B. for critical exceptions on 4xx, the dar and dsisr fields are overloaded to hold srr0 and srr1. */ unsigned long dar; /* Fault registers */ unsigned long dsisr; /* on 4xx/Book-E used for ESR */ unsigned long result; /* Result of a system call */ }; #endif /* __ASSEMBLY__ */ # 53 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/ptrace.h" 3 /* * Offsets used by 'ptrace' system call interface. * These can't be changed without breaking binary compatibility * with MkLinux, etc. */ #define PT_R0 0 #define PT_R1 1 #define PT_R2 2 #define PT_R3 3 #define PT_R4 4 #define PT_R5 5 #define PT_R6 6 #define PT_R7 7 #define PT_R8 8 #define PT_R9 9 #define PT_R10 10 #define PT_R11 11 #define PT_R12 12 #define PT_R13 13 #define PT_R14 14 #define PT_R15 15 #define PT_R16 16 #define PT_R17 17 #define PT_R18 18 #define PT_R19 19 #define PT_R20 20 #define PT_R21 21 #define PT_R22 22 #define PT_R23 23 #define PT_R24 24 #define PT_R25 25 #define PT_R26 26 #define PT_R27 27 #define PT_R28 28 #define PT_R29 29 #define PT_R30 30 #define PT_R31 31 #define PT_NIP 32 #define PT_MSR 33 #define PT_ORIG_R3 34 #define PT_CTR 35 #define PT_LNK 36 #define PT_XER 37 #define PT_CCR 38 #ifndef __powerpc64__ #define PT_MQ 39 #else # 103 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/ptrace.h" 3 #define PT_SOFTE 39 #endif # 105 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/ptrace.h" 3 #define PT_TRAP 40 #define PT_DAR 41 #define PT_DSISR 42 #define PT_RESULT 43 #define PT_REGS_COUNT 44 #define PT_FPR0 48 /* each FP reg occupies 2 slots in this space */ #ifndef __powerpc64__ #define PT_FPR31 (PT_FPR0 + 2*31) #define PT_FPSCR (PT_FPR0 + 2*32 + 1) #else /* __powerpc64__ */ # 119 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/ptrace.h" 3 #define PT_FPSCR (PT_FPR0 + 32) /* each FP reg occupies 1 slot in 64-bit space */ #define PT_VR0 82 /* each Vector reg occupies 2 slots in 64-bit */ #define PT_VSCR (PT_VR0 + 32*2 + 1) #define PT_VRSAVE (PT_VR0 + 33*2) /* * Only store first 32 VSRs here. The second 32 VSRs in VR0-31 */ #define PT_VSR0 150 /* each VSR reg occupies 2 slots in 64-bit */ #define PT_VSR31 (PT_VSR0 + 2*31) #endif /* __powerpc64__ */ # 134 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/ptrace.h" 3 /* * Get/set all the altivec registers vr0..vr31, vscr, vrsave, in one go. * The transfer totals 34 quadword. Quadwords 0-31 contain the * corresponding vector registers. Quadword 32 contains the vscr as the * last word (offset 12) within that quadword. Quadword 33 contains the * vrsave as the first word (offset 0) within the quadword. * * This definition of the VMX state is compatible with the current PPC32 * ptrace interface. This allows signal handling and ptrace to use the same * structures. This also simplifies the implementation of a bi-arch * (combined (32- and 64-bit) gdb. */ #define PTRACE_GETVRREGS 18 #define PTRACE_SETVRREGS 19 /* Get/set all the upper 32-bits of the SPE registers, accumulator, and * spefscr, in one go */ #define PTRACE_GETEVRREGS 20 #define PTRACE_SETEVRREGS 21 /* Get the first 32 128bit VSX registers */ #define PTRACE_GETVSRREGS 27 #define PTRACE_SETVSRREGS 28 /* * Get or set a debug register. The first 16 are DABR registers and the * second 16 are IABR registers. */ #define PTRACE_GET_DEBUGREG 25 #define PTRACE_SET_DEBUGREG 26 /* (new) PTRACE requests using the same numbers as x86 and the same * argument ordering. Additionally, they support more registers too */ #define PTRACE_GETREGS 12 #define PTRACE_SETREGS 13 #define PTRACE_GETFPREGS 14 #define PTRACE_SETFPREGS 15 #define PTRACE_GETREGS64 22 #define PTRACE_SETREGS64 23 /* (old) PTRACE requests with inverted arguments */ #define PPC_PTRACE_GETREGS 0x99 /* Get GPRs 0 - 31 */ #define PPC_PTRACE_SETREGS 0x98 /* Set GPRs 0 - 31 */ #define PPC_PTRACE_GETFPREGS 0x97 /* Get FPRs 0 - 31 */ #define PPC_PTRACE_SETFPREGS 0x96 /* Set FPRs 0 - 31 */ /* Calls to trace a 64bit program from a 32bit program */ #define PPC_PTRACE_PEEKTEXT_3264 0x95 #define PPC_PTRACE_PEEKDATA_3264 0x94 #define PPC_PTRACE_POKETEXT_3264 0x93 #define PPC_PTRACE_POKEDATA_3264 0x92 #define PPC_PTRACE_PEEKUSR_3264 0x91 #define PPC_PTRACE_POKEUSR_3264 0x90 #define PTRACE_SINGLEBLOCK 0x100 /* resume execution until next branch */ #endif /* _ASM_POWERPC_PTRACE_H */ # 193 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/ptrace.h" 3 # 12 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/sigcontext.h" 2 3 #ifdef __powerpc64__ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 13 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/sigcontext.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/elf.h" 1 3 #ifndef _ASM_POWERPC_ELF_H #define _ASM_POWERPC_ELF_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 5 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/elf.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/types.h" 1 3 #ifndef _LINUX_TYPES_H #define _LINUX_TYPES_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 4 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/types.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/types.h" 1 3 #ifndef _ASM_POWERPC_TYPES_H #define _ASM_POWERPC_TYPES_H /* * This is here because we used to use l64 for 64bit powerpc * and we don't want to impact user mode with our change to ll64 * in the kernel. */ #if defined(__powerpc64__) && !defined(__KERNEL__) #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 10 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/types.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm-generic/int-l64.h" 1 3 /* * asm-generic/int-l64.h * * Integer declarations for architectures which use "long" * for 64-bit types. */ #ifndef _ASM_GENERIC_INT_L64_H #define _ASM_GENERIC_INT_L64_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 11 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm-generic/int-l64.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/bitsperlong.h" 1 3 #ifndef __ASM_POWERPC_BITSPERLONG_H #define __ASM_POWERPC_BITSPERLONG_H #if defined(__powerpc64__) # define __BITS_PER_LONG 64 #else # 7 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/bitsperlong.h" 3 # define __BITS_PER_LONG 32 #endif # 9 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/bitsperlong.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 10 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/bitsperlong.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm-generic/bitsperlong.h" 1 3 #ifndef __ASM_GENERIC_BITS_PER_LONG #define __ASM_GENERIC_BITS_PER_LONG /* * There seems to be no way of detecting this automatically from user * space, so 64 bit architectures should override this in their * bitsperlong.h. In particular, an architecture that supports * both 32 and 64 bit user space must not rely on CONFIG_64BIT * to decide it, but rather check a compiler provided macro. */ #ifndef __BITS_PER_LONG #define __BITS_PER_LONG 32 #endif # 14 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm-generic/bitsperlong.h" 3 #endif /* __ASM_GENERIC_BITS_PER_LONG */ # 16 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm-generic/bitsperlong.h" 3 # 11 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/bitsperlong.h" 2 3 #endif /* __ASM_POWERPC_BITSPERLONG_H */ # 13 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/bitsperlong.h" 3 # 12 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm-generic/int-l64.h" 2 3 #ifndef __ASSEMBLY__ /* * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the * header files exported to user space */ typedef __signed__ char __s8; typedef unsigned char __u8; typedef __signed__ short __s16; typedef unsigned short __u16; typedef __signed__ int __s32; typedef unsigned int __u32; typedef __signed__ long __s64; typedef unsigned long __u64; #endif /* __ASSEMBLY__ */ # 32 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm-generic/int-l64.h" 3 #endif /* _ASM_GENERIC_INT_L64_H */ # 35 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm-generic/int-l64.h" 3 # 11 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/types.h" 2 3 #else # 12 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/types.h" 3 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 12 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/types.h" 3 # 13 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/types.h" 3 #endif # 14 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/types.h" 3 #ifndef __ASSEMBLY__ /* * This file is never included by application software unless * explicitly requested (e.g., via linux/types.h) in which case the * application is Linux specific so (user-) name space pollution is * not a major issue. However, for interoperability, libraries still * need to be careful to avoid a name clashes. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #ifdef __powerpc64__ typedef unsigned int umode_t; #else # 33 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/types.h" 3 typedef unsigned short umode_t; #endif # 35 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/types.h" 3 typedef struct { __u32 u[4]; } __attribute__((aligned(16))) __vector128; #endif /* __ASSEMBLY__ */ # 41 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/types.h" 3 #endif /* _ASM_POWERPC_TYPES_H */ # 44 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/types.h" 3 # 5 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/types.h" 2 3 #ifndef __ASSEMBLY__ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 8 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/types.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/posix_types.h" 1 3 #ifndef _LINUX_POSIX_TYPES_H #define _LINUX_POSIX_TYPES_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 4 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/posix_types.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/stddef.h" 1 3 #ifndef _LINUX_STDDEF_H #define _LINUX_STDDEF_H #undef NULL #if defined(__cplusplus) #define NULL 0 #else # 10 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/stddef.h" 3 #define NULL ((void *)0) #endif # 12 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/stddef.h" 3 #endif # 15 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/stddef.h" 3 # 5 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/posix_types.h" 2 3 /* * This allows for 1024 file descriptors: if NR_OPEN is ever grown * beyond that you'll have to change this too. But 1024 fd's seem to be * enough even for such "real" unices like OSF/1, so hopefully this is * one limit that doesn't have to be changed [again]. * * Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in * (and thus ) - but this is a more logical * place for them. Solved by having dummy defines in . */ /* * Those macros may have been defined in . But we always * use the ones here. */ #undef __NFDBITS #define __NFDBITS (8 * sizeof(unsigned long)) #undef __FD_SETSIZE #define __FD_SETSIZE 1024 #undef __FDSET_LONGS #define __FDSET_LONGS (__FD_SETSIZE/__NFDBITS) #undef __FDELT #define __FDELT(d) ((d) / __NFDBITS) #undef __FDMASK #define __FDMASK(d) (1UL << ((d) % __NFDBITS)) typedef struct { unsigned long fds_bits [__FDSET_LONGS]; } __kernel_fd_set; /* Type of a signal handler. */ typedef void (*__kernel_sighandler_t)(int); /* Type of a SYSV IPC key. */ typedef int __kernel_key_t; typedef int __kernel_mqd_t; #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 47 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/posix_types.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/posix_types.h" 1 3 #ifndef _ASM_POWERPC_POSIX_TYPES_H #define _ASM_POWERPC_POSIX_TYPES_H /* * This file is generally used by user-level software, so you need to * be a little careful about namespace pollution etc. Also, we cannot * assume GCC is being used. */ typedef unsigned long __kernel_ino_t; typedef unsigned int __kernel_mode_t; typedef long __kernel_off_t; typedef int __kernel_pid_t; typedef unsigned int __kernel_uid_t; typedef unsigned int __kernel_gid_t; typedef long __kernel_ptrdiff_t; typedef long __kernel_time_t; typedef long __kernel_clock_t; typedef int __kernel_timer_t; typedef int __kernel_clockid_t; typedef long __kernel_suseconds_t; typedef int __kernel_daddr_t; typedef char * __kernel_caddr_t; typedef unsigned short __kernel_uid16_t; typedef unsigned short __kernel_gid16_t; typedef unsigned int __kernel_uid32_t; typedef unsigned int __kernel_gid32_t; typedef unsigned int __kernel_old_uid_t; typedef unsigned int __kernel_old_gid_t; #ifdef __powerpc64__ typedef unsigned long __kernel_nlink_t; typedef int __kernel_ipc_pid_t; typedef unsigned long __kernel_size_t; typedef long __kernel_ssize_t; typedef unsigned long __kernel_old_dev_t; #else # 38 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/posix_types.h" 3 typedef unsigned short __kernel_nlink_t; typedef short __kernel_ipc_pid_t; typedef unsigned int __kernel_size_t; typedef int __kernel_ssize_t; typedef unsigned int __kernel_old_dev_t; #endif # 44 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/posix_types.h" 3 #ifdef __powerpc64__ typedef long long __kernel_loff_t; #else # 48 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/posix_types.h" 3 #ifdef __GNUC__ typedef long long __kernel_loff_t; #endif # 51 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/posix_types.h" 3 #endif # 52 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/posix_types.h" 3 typedef struct { int val[2]; } __kernel_fsid_t; #ifndef __GNUC__ #define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d)) #define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) #define __FD_ISSET(d, set) (((set)->fds_bits[__FDELT(d)] & __FDMASK(d)) != 0) #define __FD_ZERO(set) \ ((void) memset ((void *) (set), 0, sizeof (__kernel_fd_set))) #else /* __GNUC__ */ # 66 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/posix_types.h" 3 #endif /* __GNUC__ */ # 68 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/posix_types.h" 3 #endif /* _ASM_POWERPC_POSIX_TYPES_H */ # 69 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/posix_types.h" 3 # 48 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/posix_types.h" 2 3 #endif /* _LINUX_POSIX_TYPES_H */ # 50 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/posix_types.h" 3 # 9 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/types.h" 2 3 /* * Below are truly Linux-specific types that should never collide with * any application/library that wants linux/types.h. */ #ifdef __CHECKER__ #define __bitwise__ __attribute__((bitwise)) #else # 19 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/types.h" 3 #define __bitwise__ #endif # 21 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/types.h" 3 #ifdef __CHECK_ENDIAN__ #define __bitwise __bitwise__ #else # 24 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/types.h" 3 #define __bitwise #endif # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/types.h" 3 typedef __u16 __bitwise __le16; typedef __u16 __bitwise __be16; typedef __u32 __bitwise __le32; typedef __u32 __bitwise __be32; typedef __u64 __bitwise __le64; typedef __u64 __bitwise __be64; typedef __u16 __bitwise __sum16; typedef __u32 __bitwise __wsum; /* this is a special 64bit data type that is 8-byte aligned */ #define __aligned_u64 __u64 __attribute__((aligned(8))) #define __aligned_be64 __be64 __attribute__((aligned(8))) #define __aligned_le64 __le64 __attribute__((aligned(8))) #endif /* __ASSEMBLY__ */ # 43 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/types.h" 3 #endif /* _LINUX_TYPES_H */ # 44 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/types.h" 3 # 6 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/elf.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 7 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/elf.h" 3 # 8 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/elf.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 8 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/elf.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/cputable.h" 1 3 #ifndef __ASM_POWERPC_CPUTABLE_H #define __ASM_POWERPC_CPUTABLE_H #define PPC_FEATURE_32 0x80000000 #define PPC_FEATURE_64 0x40000000 #define PPC_FEATURE_601_INSTR 0x20000000 #define PPC_FEATURE_HAS_ALTIVEC 0x10000000 #define PPC_FEATURE_HAS_FPU 0x08000000 #define PPC_FEATURE_HAS_MMU 0x04000000 #define PPC_FEATURE_HAS_4xxMAC 0x02000000 #define PPC_FEATURE_UNIFIED_CACHE 0x01000000 #define PPC_FEATURE_HAS_SPE 0x00800000 #define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000 #define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000 #define PPC_FEATURE_NO_TB 0x00100000 #define PPC_FEATURE_POWER4 0x00080000 #define PPC_FEATURE_POWER5 0x00040000 #define PPC_FEATURE_POWER5_PLUS 0x00020000 #define PPC_FEATURE_CELL 0x00010000 #define PPC_FEATURE_BOOKE 0x00008000 #define PPC_FEATURE_SMT 0x00004000 #define PPC_FEATURE_ICACHE_SNOOP 0x00002000 #define PPC_FEATURE_ARCH_2_05 0x00001000 #define PPC_FEATURE_PA6T 0x00000800 #define PPC_FEATURE_HAS_DFP 0x00000400 #define PPC_FEATURE_POWER6_EXT 0x00000200 #define PPC_FEATURE_ARCH_2_06 0x00000100 #define PPC_FEATURE_HAS_VSX 0x00000080 #define PPC_FEATURE_PSERIES_PERFMON_COMPAT \ 0x00000040 #define PPC_FEATURE_TRUE_LE 0x00000002 #define PPC_FEATURE_PPC_LE 0x00000001 #endif /* __ASM_POWERPC_CPUTABLE_H */ # 37 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/cputable.h" 3 # 9 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/elf.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 9 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/elf.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/auxvec.h" 1 3 #ifndef _ASM_POWERPC_AUXVEC_H #define _ASM_POWERPC_AUXVEC_H /* * We need to put in some extra aux table entries to tell glibc what * the cache block size is, so it can use the dcbz instruction safely. */ #define AT_DCACHEBSIZE 19 #define AT_ICACHEBSIZE 20 #define AT_UCACHEBSIZE 21 /* A special ignored type value for PPC, for glibc compatibility. */ #define AT_IGNOREPPC 22 /* The vDSO location. We have to use the same value as x86 for glibc's * sake :-) */ #define AT_SYSINFO_EHDR 33 #endif # 20 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/auxvec.h" 3 # 10 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/elf.h" 2 3 /* PowerPC relocations defined by the ABIs */ #define R_PPC_NONE 0 #define R_PPC_ADDR32 1 /* 32bit absolute address */ #define R_PPC_ADDR24 2 /* 26bit address, 2 bits ignored. */ #define R_PPC_ADDR16 3 /* 16bit absolute address */ #define R_PPC_ADDR16_LO 4 /* lower 16bit of absolute address */ #define R_PPC_ADDR16_HI 5 /* high 16bit of absolute address */ #define R_PPC_ADDR16_HA 6 /* adjusted high 16bit */ #define R_PPC_ADDR14 7 /* 16bit address, 2 bits ignored */ #define R_PPC_ADDR14_BRTAKEN 8 #define R_PPC_ADDR14_BRNTAKEN 9 #define R_PPC_REL24 10 /* PC relative 26 bit */ #define R_PPC_REL14 11 /* PC relative 16 bit */ #define R_PPC_REL14_BRTAKEN 12 #define R_PPC_REL14_BRNTAKEN 13 #define R_PPC_GOT16 14 #define R_PPC_GOT16_LO 15 #define R_PPC_GOT16_HI 16 #define R_PPC_GOT16_HA 17 #define R_PPC_PLTREL24 18 #define R_PPC_COPY 19 #define R_PPC_GLOB_DAT 20 #define R_PPC_JMP_SLOT 21 #define R_PPC_RELATIVE 22 #define R_PPC_LOCAL24PC 23 #define R_PPC_UADDR32 24 #define R_PPC_UADDR16 25 #define R_PPC_REL32 26 #define R_PPC_PLT32 27 #define R_PPC_PLTREL32 28 #define R_PPC_PLT16_LO 29 #define R_PPC_PLT16_HI 30 #define R_PPC_PLT16_HA 31 #define R_PPC_SDAREL16 32 #define R_PPC_SECTOFF 33 #define R_PPC_SECTOFF_LO 34 #define R_PPC_SECTOFF_HI 35 #define R_PPC_SECTOFF_HA 36 /* PowerPC relocations defined for the TLS access ABI. */ #define R_PPC_TLS 67 /* none (sym+add)@tls */ #define R_PPC_DTPMOD32 68 /* word32 (sym+add)@dtpmod */ #define R_PPC_TPREL16 69 /* half16* (sym+add)@tprel */ #define R_PPC_TPREL16_LO 70 /* half16 (sym+add)@tprel@l */ #define R_PPC_TPREL16_HI 71 /* half16 (sym+add)@tprel@h */ #define R_PPC_TPREL16_HA 72 /* half16 (sym+add)@tprel@ha */ #define R_PPC_TPREL32 73 /* word32 (sym+add)@tprel */ #define R_PPC_DTPREL16 74 /* half16* (sym+add)@dtprel */ #define R_PPC_DTPREL16_LO 75 /* half16 (sym+add)@dtprel@l */ #define R_PPC_DTPREL16_HI 76 /* half16 (sym+add)@dtprel@h */ #define R_PPC_DTPREL16_HA 77 /* half16 (sym+add)@dtprel@ha */ #define R_PPC_DTPREL32 78 /* word32 (sym+add)@dtprel */ #define R_PPC_GOT_TLSGD16 79 /* half16* (sym+add)@got@tlsgd */ #define R_PPC_GOT_TLSGD16_LO 80 /* half16 (sym+add)@got@tlsgd@l */ #define R_PPC_GOT_TLSGD16_HI 81 /* half16 (sym+add)@got@tlsgd@h */ #define R_PPC_GOT_TLSGD16_HA 82 /* half16 (sym+add)@got@tlsgd@ha */ #define R_PPC_GOT_TLSLD16 83 /* half16* (sym+add)@got@tlsld */ #define R_PPC_GOT_TLSLD16_LO 84 /* half16 (sym+add)@got@tlsld@l */ #define R_PPC_GOT_TLSLD16_HI 85 /* half16 (sym+add)@got@tlsld@h */ #define R_PPC_GOT_TLSLD16_HA 86 /* half16 (sym+add)@got@tlsld@ha */ #define R_PPC_GOT_TPREL16 87 /* half16* (sym+add)@got@tprel */ #define R_PPC_GOT_TPREL16_LO 88 /* half16 (sym+add)@got@tprel@l */ #define R_PPC_GOT_TPREL16_HI 89 /* half16 (sym+add)@got@tprel@h */ #define R_PPC_GOT_TPREL16_HA 90 /* half16 (sym+add)@got@tprel@ha */ #define R_PPC_GOT_DTPREL16 91 /* half16* (sym+add)@got@dtprel */ #define R_PPC_GOT_DTPREL16_LO 92 /* half16* (sym+add)@got@dtprel@l */ #define R_PPC_GOT_DTPREL16_HI 93 /* half16* (sym+add)@got@dtprel@h */ #define R_PPC_GOT_DTPREL16_HA 94 /* half16* (sym+add)@got@dtprel@ha */ /* keep this the last entry. */ #define R_PPC_NUM 95 /* * ELF register definitions.. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #define ELF_NGREG 48 /* includes nip, msr, lr, etc. */ #define ELF_NFPREG 33 /* includes fpscr */ typedef unsigned long elf_greg_t64; typedef elf_greg_t64 elf_gregset_t64[ELF_NGREG]; typedef unsigned int elf_greg_t32; typedef elf_greg_t32 elf_gregset_t32[ELF_NGREG]; typedef elf_gregset_t32 compat_elf_gregset_t; /* * ELF_ARCH, CLASS, and DATA are used to set parameters in the core dumps. */ #ifdef __powerpc64__ # define ELF_NVRREG32 33 /* includes vscr & vrsave stuffed together */ # define ELF_NVRREG 34 /* includes vscr & vrsave in split vectors */ # define ELF_NVSRHALFREG 32 /* Half the vsx registers */ # define ELF_GREG_TYPE elf_greg_t64 #else # 111 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/elf.h" 3 # define ELF_NEVRREG 34 /* includes acc (as 2) */ # define ELF_NVRREG 33 /* includes vscr */ # define ELF_GREG_TYPE elf_greg_t32 # define ELF_ARCH EM_PPC # define ELF_CLASS ELFCLASS32 # define ELF_DATA ELFDATA2MSB #endif /* __powerpc64__ */ # 118 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/elf.h" 3 #ifndef ELF_ARCH # define ELF_ARCH EM_PPC64 # define ELF_CLASS ELFCLASS64 # define ELF_DATA ELFDATA2MSB typedef elf_greg_t64 elf_greg_t; typedef elf_gregset_t64 elf_gregset_t; #else # 126 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/elf.h" 3 /* Assumption: ELF_ARCH == EM_PPC and ELF_CLASS == ELFCLASS32 */ typedef elf_greg_t32 elf_greg_t; typedef elf_gregset_t32 elf_gregset_t; #endif /* ELF_ARCH */ # 130 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/elf.h" 3 /* Floating point registers */ typedef double elf_fpreg_t; typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; /* Altivec registers */ /* * The entries with indexes 0-31 contain the corresponding vector registers. * The entry with index 32 contains the vscr as the last word (offset 12) * within the quadword. This allows the vscr to be stored as either a * quadword (since it must be copied via a vector register to/from storage) * or as a word. * * 64-bit kernel notes: The entry at index 33 contains the vrsave as the first * word (offset 0) within the quadword. * * This definition of the VMX state is compatible with the current PPC32 * ptrace interface. This allows signal handling and ptrace to use the same * structures. This also simplifies the implementation of a bi-arch * (combined (32- and 64-bit) gdb. * * Note that it's _not_ compatible with 32 bits ucontext which stuffs the * vrsave along with vscr and so only uses 33 vectors for the register set */ typedef __vector128 elf_vrreg_t; typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG]; #ifdef __powerpc64__ typedef elf_vrreg_t elf_vrregset_t32[ELF_NVRREG32]; typedef elf_fpreg_t elf_vsrreghalf_t32[ELF_NVSRHALFREG]; #endif # 160 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/elf.h" 3 /* * The requirements here are: * - keep the final alignment of sp (sp & 0xf) * - make sure the 32-bit value at the first 16 byte aligned position of * AUXV is greater than 16 for glibc compatibility. * AT_IGNOREPPC is used for that. * - for compatibility with glibc ARCH_DLINFO must always be defined on PPC, * even if DLINFO_ARCH_ITEMS goes to zero or is undefined. * update AT_VECTOR_SIZE_ARCH if the number of NEW_AUX_ENT entries changes */ #define ARCH_DLINFO \ do { \ /* Handle glibc compatibility. */ \ NEW_AUX_ENT(AT_IGNOREPPC, AT_IGNOREPPC); \ NEW_AUX_ENT(AT_IGNOREPPC, AT_IGNOREPPC); \ /* Cache size items */ \ NEW_AUX_ENT(AT_DCACHEBSIZE, dcache_bsize); \ NEW_AUX_ENT(AT_ICACHEBSIZE, icache_bsize); \ NEW_AUX_ENT(AT_UCACHEBSIZE, ucache_bsize); \ VDSO_AUX_ENT(AT_SYSINFO_EHDR, current->mm->context.vdso_base) \ } while (0) /* PowerPC64 relocations defined by the ABIs */ #define R_PPC64_NONE R_PPC_NONE #define R_PPC64_ADDR32 R_PPC_ADDR32 /* 32bit absolute address. */ #define R_PPC64_ADDR24 R_PPC_ADDR24 /* 26bit address, word aligned. */ #define R_PPC64_ADDR16 R_PPC_ADDR16 /* 16bit absolute address. */ #define R_PPC64_ADDR16_LO R_PPC_ADDR16_LO /* lower 16bits of abs. address. */ #define R_PPC64_ADDR16_HI R_PPC_ADDR16_HI /* high 16bits of abs. address. */ #define R_PPC64_ADDR16_HA R_PPC_ADDR16_HA /* adjusted high 16bits. */ #define R_PPC64_ADDR14 R_PPC_ADDR14 /* 16bit address, word aligned. */ #define R_PPC64_ADDR14_BRTAKEN R_PPC_ADDR14_BRTAKEN #define R_PPC64_ADDR14_BRNTAKEN R_PPC_ADDR14_BRNTAKEN #define R_PPC64_REL24 R_PPC_REL24 /* PC relative 26 bit, word aligned. */ #define R_PPC64_REL14 R_PPC_REL14 /* PC relative 16 bit. */ #define R_PPC64_REL14_BRTAKEN R_PPC_REL14_BRTAKEN #define R_PPC64_REL14_BRNTAKEN R_PPC_REL14_BRNTAKEN #define R_PPC64_GOT16 R_PPC_GOT16 #define R_PPC64_GOT16_LO R_PPC_GOT16_LO #define R_PPC64_GOT16_HI R_PPC_GOT16_HI #define R_PPC64_GOT16_HA R_PPC_GOT16_HA #define R_PPC64_COPY R_PPC_COPY #define R_PPC64_GLOB_DAT R_PPC_GLOB_DAT #define R_PPC64_JMP_SLOT R_PPC_JMP_SLOT #define R_PPC64_RELATIVE R_PPC_RELATIVE #define R_PPC64_UADDR32 R_PPC_UADDR32 #define R_PPC64_UADDR16 R_PPC_UADDR16 #define R_PPC64_REL32 R_PPC_REL32 #define R_PPC64_PLT32 R_PPC_PLT32 #define R_PPC64_PLTREL32 R_PPC_PLTREL32 #define R_PPC64_PLT16_LO R_PPC_PLT16_LO #define R_PPC64_PLT16_HI R_PPC_PLT16_HI #define R_PPC64_PLT16_HA R_PPC_PLT16_HA #define R_PPC64_SECTOFF R_PPC_SECTOFF #define R_PPC64_SECTOFF_LO R_PPC_SECTOFF_LO #define R_PPC64_SECTOFF_HI R_PPC_SECTOFF_HI #define R_PPC64_SECTOFF_HA R_PPC_SECTOFF_HA #define R_PPC64_ADDR30 37 /* word30 (S + A - P) >> 2. */ #define R_PPC64_ADDR64 38 /* doubleword64 S + A. */ #define R_PPC64_ADDR16_HIGHER 39 /* half16 #higher(S + A). */ #define R_PPC64_ADDR16_HIGHERA 40 /* half16 #highera(S + A). */ #define R_PPC64_ADDR16_HIGHEST 41 /* half16 #highest(S + A). */ #define R_PPC64_ADDR16_HIGHESTA 42 /* half16 #highesta(S + A). */ #define R_PPC64_UADDR64 43 /* doubleword64 S + A. */ #define R_PPC64_REL64 44 /* doubleword64 S + A - P. */ #define R_PPC64_PLT64 45 /* doubleword64 L + A. */ #define R_PPC64_PLTREL64 46 /* doubleword64 L + A - P. */ #define R_PPC64_TOC16 47 /* half16* S + A - .TOC. */ #define R_PPC64_TOC16_LO 48 /* half16 #lo(S + A - .TOC.). */ #define R_PPC64_TOC16_HI 49 /* half16 #hi(S + A - .TOC.). */ #define R_PPC64_TOC16_HA 50 /* half16 #ha(S + A - .TOC.). */ #define R_PPC64_TOC 51 /* doubleword64 .TOC. */ #define R_PPC64_PLTGOT16 52 /* half16* M + A. */ #define R_PPC64_PLTGOT16_LO 53 /* half16 #lo(M + A). */ #define R_PPC64_PLTGOT16_HI 54 /* half16 #hi(M + A). */ #define R_PPC64_PLTGOT16_HA 55 /* half16 #ha(M + A). */ #define R_PPC64_ADDR16_DS 56 /* half16ds* (S + A) >> 2. */ #define R_PPC64_ADDR16_LO_DS 57 /* half16ds #lo(S + A) >> 2. */ #define R_PPC64_GOT16_DS 58 /* half16ds* (G + A) >> 2. */ #define R_PPC64_GOT16_LO_DS 59 /* half16ds #lo(G + A) >> 2. */ #define R_PPC64_PLT16_LO_DS 60 /* half16ds #lo(L + A) >> 2. */ #define R_PPC64_SECTOFF_DS 61 /* half16ds* (R + A) >> 2. */ #define R_PPC64_SECTOFF_LO_DS 62 /* half16ds #lo(R + A) >> 2. */ #define R_PPC64_TOC16_DS 63 /* half16ds* (S + A - .TOC.) >> 2. */ #define R_PPC64_TOC16_LO_DS 64 /* half16ds #lo(S + A - .TOC.) >> 2. */ #define R_PPC64_PLTGOT16_DS 65 /* half16ds* (M + A) >> 2. */ #define R_PPC64_PLTGOT16_LO_DS 66 /* half16ds #lo(M + A) >> 2. */ /* PowerPC64 relocations defined for the TLS access ABI. */ #define R_PPC64_TLS 67 /* none (sym+add)@tls */ #define R_PPC64_DTPMOD64 68 /* doubleword64 (sym+add)@dtpmod */ #define R_PPC64_TPREL16 69 /* half16* (sym+add)@tprel */ #define R_PPC64_TPREL16_LO 70 /* half16 (sym+add)@tprel@l */ #define R_PPC64_TPREL16_HI 71 /* half16 (sym+add)@tprel@h */ #define R_PPC64_TPREL16_HA 72 /* half16 (sym+add)@tprel@ha */ #define R_PPC64_TPREL64 73 /* doubleword64 (sym+add)@tprel */ #define R_PPC64_DTPREL16 74 /* half16* (sym+add)@dtprel */ #define R_PPC64_DTPREL16_LO 75 /* half16 (sym+add)@dtprel@l */ #define R_PPC64_DTPREL16_HI 76 /* half16 (sym+add)@dtprel@h */ #define R_PPC64_DTPREL16_HA 77 /* half16 (sym+add)@dtprel@ha */ #define R_PPC64_DTPREL64 78 /* doubleword64 (sym+add)@dtprel */ #define R_PPC64_GOT_TLSGD16 79 /* half16* (sym+add)@got@tlsgd */ #define R_PPC64_GOT_TLSGD16_LO 80 /* half16 (sym+add)@got@tlsgd@l */ #define R_PPC64_GOT_TLSGD16_HI 81 /* half16 (sym+add)@got@tlsgd@h */ #define R_PPC64_GOT_TLSGD16_HA 82 /* half16 (sym+add)@got@tlsgd@ha */ #define R_PPC64_GOT_TLSLD16 83 /* half16* (sym+add)@got@tlsld */ #define R_PPC64_GOT_TLSLD16_LO 84 /* half16 (sym+add)@got@tlsld@l */ #define R_PPC64_GOT_TLSLD16_HI 85 /* half16 (sym+add)@got@tlsld@h */ #define R_PPC64_GOT_TLSLD16_HA 86 /* half16 (sym+add)@got@tlsld@ha */ #define R_PPC64_GOT_TPREL16_DS 87 /* half16ds* (sym+add)@got@tprel */ #define R_PPC64_GOT_TPREL16_LO_DS 88 /* half16ds (sym+add)@got@tprel@l */ #define R_PPC64_GOT_TPREL16_HI 89 /* half16 (sym+add)@got@tprel@h */ #define R_PPC64_GOT_TPREL16_HA 90 /* half16 (sym+add)@got@tprel@ha */ #define R_PPC64_GOT_DTPREL16_DS 91 /* half16ds* (sym+add)@got@dtprel */ #define R_PPC64_GOT_DTPREL16_LO_DS 92 /* half16ds (sym+add)@got@dtprel@l */ #define R_PPC64_GOT_DTPREL16_HI 93 /* half16 (sym+add)@got@dtprel@h */ #define R_PPC64_GOT_DTPREL16_HA 94 /* half16 (sym+add)@got@dtprel@ha */ #define R_PPC64_TPREL16_DS 95 /* half16ds* (sym+add)@tprel */ #define R_PPC64_TPREL16_LO_DS 96 /* half16ds (sym+add)@tprel@l */ #define R_PPC64_TPREL16_HIGHER 97 /* half16 (sym+add)@tprel@higher */ #define R_PPC64_TPREL16_HIGHERA 98 /* half16 (sym+add)@tprel@highera */ #define R_PPC64_TPREL16_HIGHEST 99 /* half16 (sym+add)@tprel@highest */ #define R_PPC64_TPREL16_HIGHESTA 100 /* half16 (sym+add)@tprel@highesta */ #define R_PPC64_DTPREL16_DS 101 /* half16ds* (sym+add)@dtprel */ #define R_PPC64_DTPREL16_LO_DS 102 /* half16ds (sym+add)@dtprel@l */ #define R_PPC64_DTPREL16_HIGHER 103 /* half16 (sym+add)@dtprel@higher */ #define R_PPC64_DTPREL16_HIGHERA 104 /* half16 (sym+add)@dtprel@highera */ #define R_PPC64_DTPREL16_HIGHEST 105 /* half16 (sym+add)@dtprel@highest */ #define R_PPC64_DTPREL16_HIGHESTA 106 /* half16 (sym+add)@dtprel@highesta */ /* Keep this the last entry. */ #define R_PPC64_NUM 107 /* There's actually a third entry here, but it's unused */ struct ppc64_opd_entry { unsigned long funcaddr; unsigned long r2; }; #endif /* _ASM_POWERPC_ELF_H */ # 308 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/elf.h" 3 # 14 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/sigcontext.h" 2 3 #endif # 15 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/sigcontext.h" 3 struct sigcontext { unsigned long _unused[4]; int signal; #ifdef __powerpc64__ int _pad0; #endif # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/sigcontext.h" 3 unsigned long handler; unsigned long oldmask; struct pt_regs *regs; #ifdef __powerpc64__ elf_gregset_t gp_regs; elf_fpregset_t fp_regs; /* * To maintain compatibility with current implementations the sigcontext is * extended by appending a pointer (v_regs) to a quadword type (elf_vrreg_t) * followed by an unstructured (vmx_reserve) field of 69 doublewords. This * allows the array of vector registers to be quadword aligned independent of * the alignment of the containing sigcontext or ucontext. It is the * responsibility of the code setting the sigcontext to set this pointer to * either NULL (if this processor does not support the VMX feature) or the * address of the first quadword within the allocated (vmx_reserve) area. * * The pointer (v_regs) of vector type (elf_vrreg_t) is type compatible with * an array of 34 quadword entries (elf_vrregset_t). The entries with * indexes 0-31 contain the corresponding vector registers. The entry with * index 32 contains the vscr as the last word (offset 12) within the * quadword. This allows the vscr to be stored as either a quadword (since * it must be copied via a vector register to/from storage) or as a word. * The entry with index 33 contains the vrsave as the first word (offset 0) * within the quadword. * * Part of the VSX data is stored here also by extending vmx_restore * by an additional 32 double words. Architecturally the layout of * the VSR registers and how they overlap on top of the legacy FPR and * VR registers is shown below: * * VSR doubleword 0 VSR doubleword 1 * ---------------------------------------------------------------- * VSR[0] | FPR[0] | | * ---------------------------------------------------------------- * VSR[1] | FPR[1] | | * ---------------------------------------------------------------- * | ... | | * | ... | | * ---------------------------------------------------------------- * VSR[30] | FPR[30] | | * ---------------------------------------------------------------- * VSR[31] | FPR[31] | | * ---------------------------------------------------------------- * VSR[32] | VR[0] | * ---------------------------------------------------------------- * VSR[33] | VR[1] | * ---------------------------------------------------------------- * | ... | * | ... | * ---------------------------------------------------------------- * VSR[62] | VR[30] | * ---------------------------------------------------------------- * VSR[63] | VR[31] | * ---------------------------------------------------------------- * * FPR/VSR 0-31 doubleword 0 is stored in fp_regs, and VMX/VSR 32-63 * is stored at the start of vmx_reserve. vmx_reserve is extended for * backwards compatility to store VSR 0-31 doubleword 1 after the VMX * registers and vscr/vrsave. */ elf_vrreg_t *v_regs; long vmx_reserve[ELF_NVRREG+ELF_NVRREG+32+1]; #endif # 85 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/sigcontext.h" 3 }; #endif /* _ASM_POWERPC_SIGCONTEXT_H */ # 88 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/sigcontext.h" 3 # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigcontext.h" 2 3 /* The Linux kernel headers redefine NULL wrongly, so cleanup afterwards. */ # define __need_NULL #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 31 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigcontext.h" 3 # 1 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 1 3 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) /* Always define miscellaneous pieces when modules are available. */ #if !__has_feature(modules) #define __STDDEF_H #endif # 37 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 44 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_ptrdiff_t) #if !defined(_PTRDIFF_T) || __has_feature(modules) /* Always define ptrdiff_t when modules are available. */ #if !__has_feature(modules) #define _PTRDIFF_T #endif # 51 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 53 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 55 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_size_t) #if !defined(_SIZE_T) || __has_feature(modules) /* Always define size_t when modules are available. */ #if !__has_feature(modules) #define _SIZE_T #endif # 62 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ size_t; #endif # 64 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_size_t #endif /*defined(__need_size_t) */ # 66 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) /* Always define rsize_t when modules are available. */ #if !__has_feature(modules) #define _RSIZE_T #endif # 76 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ rsize_t; #endif # 78 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif /* defined(__need_STDDEF_H_misc) */ # 79 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_wchar_t) #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if !defined(_WCHAR_T) || __has_feature(modules) #if !__has_feature(modules) #define _WCHAR_T #if defined(_MSC_EXTENSIONS) #define _WCHAR_T_DEFINED #endif # 89 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 90 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WCHAR_TYPE__ wchar_t; #endif # 92 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 93 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 95 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_NULL) #undef NULL #ifdef __cplusplus # if !defined(__MINGW32__) && !defined(_MSC_VER) # define NULL __null # else # 102 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL 0 # endif # 104 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #else # 105 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL ((void*)0) #endif # 107 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #ifdef __cplusplus #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 112 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 113 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_NULL #endif /* defined(__need_NULL) */ # 115 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 118 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 119 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 120 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 123 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if defined(__need_wint_t) /* Always define wint_t when modules are available. */ #if !defined(_WINT_T) || __has_feature(modules) #if !__has_feature(modules) #define _WINT_T #endif # 132 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WINT_TYPE__ wint_t; #endif # 134 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wint_t #endif /* __need_wint_t */ # 136 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 138 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 32 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigcontext.h" 2 3 #endif # 33 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigcontext.h" 3 # 341 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 2 3 /* Restore the state saved in SCP. */ extern int sigreturn (struct sigcontext *__scp) __THROW; #endif /* use BSD. */ # 346 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 # define __need_size_t #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 350 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 1 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 1 3 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) /* Always define miscellaneous pieces when modules are available. */ #if !__has_feature(modules) #define __STDDEF_H #endif # 37 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 44 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_ptrdiff_t) #if !defined(_PTRDIFF_T) || __has_feature(modules) /* Always define ptrdiff_t when modules are available. */ #if !__has_feature(modules) #define _PTRDIFF_T #endif # 51 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 53 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 55 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_size_t) #if !defined(_SIZE_T) || __has_feature(modules) /* Always define size_t when modules are available. */ #if !__has_feature(modules) #define _SIZE_T #endif # 62 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ size_t; #endif # 64 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_size_t #endif /*defined(__need_size_t) */ # 66 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) /* Always define rsize_t when modules are available. */ #if !__has_feature(modules) #define _RSIZE_T #endif # 76 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ rsize_t; #endif # 78 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif /* defined(__need_STDDEF_H_misc) */ # 79 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_wchar_t) #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if !defined(_WCHAR_T) || __has_feature(modules) #if !__has_feature(modules) #define _WCHAR_T #if defined(_MSC_EXTENSIONS) #define _WCHAR_T_DEFINED #endif # 89 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 90 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WCHAR_TYPE__ wchar_t; #endif # 92 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 93 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 95 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_NULL) #undef NULL #ifdef __cplusplus # if !defined(__MINGW32__) && !defined(_MSC_VER) # define NULL __null # else # 102 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL 0 # endif # 104 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #else # 105 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL ((void*)0) #endif # 107 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #ifdef __cplusplus #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 112 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 113 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_NULL #endif /* defined(__need_NULL) */ # 115 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 118 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 119 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 120 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 123 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if defined(__need_wint_t) /* Always define wint_t when modules are available. */ #if !defined(_WINT_T) || __has_feature(modules) #if !__has_feature(modules) #define _WINT_T #endif # 132 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WINT_TYPE__ wint_t; #endif # 134 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wint_t #endif /* __need_wint_t */ # 136 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 138 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 351 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 2 3 /* If INTERRUPT is nonzero, make signal SIG interrupt system calls (causing them to fail with EINTR); if INTERRUPT is zero, make system calls be restarted after signal SIG. */ extern int siginterrupt (int __sig, int __interrupt) __THROW; #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 357 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigstack.h" 1 3 /* sigstack, sigaltstack definitions. Copyright (C) 1998, 1999 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SIGNAL_H # error "Never include this file directly. Use instead" #endif # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigstack.h" 3 /* Structure describing a signal stack (obsolete). */ struct sigstack { void *ss_sp; /* Signal stack pointer. */ int ss_onstack; /* Nonzero if executing on this stack. */ }; /* Possible values for `ss_flags.'. */ enum { SS_ONSTACK = 1, #define SS_ONSTACK SS_ONSTACK SS_DISABLE #define SS_DISABLE SS_DISABLE }; /* Minimum stack size for a signal handler. */ #define MINSIGSTKSZ 2048 /* System default stack size. */ #define SIGSTKSZ 8192 /* Alternate, preferred interface. */ typedef struct sigaltstack { void *ss_sp; int ss_flags; size_t ss_size; } stack_t; # 358 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 2 3 # if defined __USE_XOPEN || defined __USE_XOPEN2K8 /* This will define `ucontext_t' and `mcontext_t'. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 360 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/ucontext.h" 1 3 /* Copyright (C) 1998, 1999, 2002, 2004, 2005 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_UCONTEXT_H #define _SYS_UCONTEXT_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 21 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/ucontext.h" 3 # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/ucontext.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/ucontext.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 1 3 /* Copyright (C) 1991-2004,2007,2009,2010,2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.14 Signal handling */ #ifndef _SIGNAL_H #if !defined __need_sig_atomic_t && !defined __need_sigset_t # define _SIGNAL_H #endif # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 29 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 __BEGIN_DECLS #if 0 /* expanded by -frewrite-includes */ #include /* __sigset_t, __sig_atomic_t. */ #endif /* expanded by -frewrite-includes */ # 32 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 33 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* An integral type that can be modified atomically, without the possibility of a signal arriving in the middle of the operation. */ #if defined __need_sig_atomic_t || defined _SIGNAL_H # ifndef __sig_atomic_t_defined # define __sig_atomic_t_defined __BEGIN_NAMESPACE_STD typedef __sig_atomic_t sig_atomic_t; __END_NAMESPACE_STD # endif # 43 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # undef __need_sig_atomic_t #endif # 45 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #if defined __need_sigset_t || (defined _SIGNAL_H && defined __USE_POSIX) # ifndef __sigset_t_defined # define __sigset_t_defined typedef __sigset_t sigset_t; # endif # 51 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # undef __need_sigset_t #endif # 53 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #ifdef _SIGNAL_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 56 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 57 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 57 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 58 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #if defined __USE_XOPEN || defined __USE_XOPEN2K # ifndef __pid_t_defined typedef __pid_t pid_t; # define __pid_t_defined #endif # 64 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #ifdef __USE_XOPEN # endif # 66 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # ifndef __uid_t_defined typedef __uid_t uid_t; # define __uid_t_defined # endif # 70 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #endif /* Unix98 */ # 71 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #ifdef __USE_POSIX199309 /* We need `struct timespec' later on. */ # define __need_timespec #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 75 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 76 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #endif # 77 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED /* Get the `siginfo_t' type plus the needed symbols. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 80 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 81 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #endif # 82 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* Type of a signal handler. */ typedef void (*__sighandler_t) (int); /* The X/Open definition of `signal' specifies the SVID semantic. Use the additional function `sysv_signal' when X/Open compatibility is requested. */ extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler) __THROW; #ifdef __USE_GNU extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler) __THROW; #endif # 96 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* Set the handler for the signal SIG to HANDLER, returning the old handler, or SIG_ERR on error. By default `signal' has the BSD semantic. */ __BEGIN_NAMESPACE_STD #ifdef __USE_BSD extern __sighandler_t signal (int __sig, __sighandler_t __handler) __THROW; #else # 105 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* Make sure the used `signal' implementation is the SVID version. */ # ifdef __REDIRECT_NTH extern __sighandler_t __REDIRECT_NTH (signal, (int __sig, __sighandler_t __handler), __sysv_signal); # else # 111 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # define signal __sysv_signal # endif # 113 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #endif # 114 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 __END_NAMESPACE_STD #ifdef __USE_XOPEN /* The X/Open definition of `signal' conflicts with the BSD version. So they defined another function `bsd_signal'. */ extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler) __THROW; #endif # 122 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* Send signal SIG to process number PID. If PID is zero, send SIG to all processes in the current process's process group. If PID is < -1, send SIG to all processes in process group - PID. */ #ifdef __USE_POSIX extern int kill (__pid_t __pid, int __sig) __THROW; #endif /* Use POSIX. */ # 129 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Send SIG to all processes in process group PGRP. If PGRP is zero, send SIG to all processes in the current process's process group. */ extern int killpg (__pid_t __pgrp, int __sig) __THROW; #endif /* Use BSD || X/Open Unix. */ # 136 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 __BEGIN_NAMESPACE_STD /* Raise signal SIG, i.e., send SIG to yourself. */ extern int raise (int __sig) __THROW; __END_NAMESPACE_STD #ifdef __USE_SVID /* SVID names for the same things. */ extern __sighandler_t ssignal (int __sig, __sighandler_t __handler) __THROW; extern int gsignal (int __sig) __THROW; #endif /* Use SVID. */ # 148 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #if defined __USE_MISC || defined __USE_XOPEN2K /* Print a message describing the meaning of the given signal number. */ extern void psignal (int __sig, const char *__s); #endif /* Use misc or POSIX 2008. */ # 153 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #ifdef __USE_XOPEN2K /* Print a message describing the meaning of the given signal information. */ extern void psiginfo (const siginfo_t *__pinfo, const char *__s); #endif /* POSIX 2008. */ # 158 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* The `sigpause' function has two different interfaces. The original BSD definition defines the argument as a mask of the signal, while the more modern interface in X/Open defines it as the signal number. We go with the BSD version unless the user explicitly selects the X/Open version. This function is a cancellation point and therefore not marked with __THROW. */ extern int __sigpause (int __sig_or_mask, int __is_sig); #ifdef __FAVOR_BSD /* Set the mask of blocked signals to MASK, wait for a signal to arrive, and then restore the mask. */ extern int sigpause (int __mask) __THROW __attribute_deprecated__; #else # 176 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # ifdef __USE_XOPEN # ifdef __GNUC__ extern int sigpause (int __sig) __asm__ ("__xpg_sigpause"); # else # 180 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* Remove a signal from the signal mask and suspend the process. */ # define sigpause(sig) __sigpause ((sig), 1) # endif # 183 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # endif # 184 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #endif # 185 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #ifdef __USE_BSD /* None of the following functions should be used anymore. They are here only for compatibility. A single word (`int') is not guaranteed to be enough to hold a complete signal mask and therefore these functions simply do not work in many situations. Use `sigprocmask' instead. */ /* Compute mask for signal SIG. */ # define sigmask(sig) __sigmask(sig) /* Block signals in MASK, returning the old mask. */ extern int sigblock (int __mask) __THROW __attribute_deprecated__; /* Set the mask of blocked signals to MASK, returning the old mask. */ extern int sigsetmask (int __mask) __THROW __attribute_deprecated__; /* Return currently selected signal mask. */ extern int siggetmask (void) __THROW __attribute_deprecated__; #endif /* Use BSD. */ # 205 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #ifdef __USE_MISC # define NSIG _NSIG #endif # 210 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #ifdef __USE_GNU typedef __sighandler_t sighandler_t; #endif # 214 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* 4.4 BSD uses the name `sig_t' for this. */ #ifdef __USE_BSD typedef __sighandler_t sig_t; #endif # 219 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #ifdef __USE_POSIX /* Clear all signals from SET. */ extern int sigemptyset (sigset_t *__set) __THROW __nonnull ((1)); /* Set all signals in SET. */ extern int sigfillset (sigset_t *__set) __THROW __nonnull ((1)); /* Add SIGNO to SET. */ extern int sigaddset (sigset_t *__set, int __signo) __THROW __nonnull ((1)); /* Remove SIGNO from SET. */ extern int sigdelset (sigset_t *__set, int __signo) __THROW __nonnull ((1)); /* Return 1 if SIGNO is in SET, 0 if not. */ extern int sigismember (const sigset_t *__set, int __signo) __THROW __nonnull ((1)); # ifdef __USE_GNU /* Return non-empty value is SET is not empty. */ extern int sigisemptyset (const sigset_t *__set) __THROW __nonnull ((1)); /* Build new signal set by combining the two inputs set using logical AND. */ extern int sigandset (sigset_t *__set, const sigset_t *__left, const sigset_t *__right) __THROW __nonnull ((1, 2, 3)); /* Build new signal set by combining the two inputs set using logical OR. */ extern int sigorset (sigset_t *__set, const sigset_t *__left, const sigset_t *__right) __THROW __nonnull ((1, 2, 3)); # endif /* GNU */ # 250 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* Get the system-specific definitions of `struct sigaction' and the `SA_*' and `SIG_*'. constants. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 253 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 254 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* Get and/or change the set of blocked signals. */ extern int sigprocmask (int __how, const sigset_t *__restrict __set, sigset_t *__restrict __oset) __THROW; /* Change the set of blocked signals to SET, wait until a signal arrives, and restore the set of blocked signals. This function is a cancellation point and therefore not marked with __THROW. */ extern int sigsuspend (const sigset_t *__set) __nonnull ((1)); /* Get and/or set the action for signal SIG. */ extern int sigaction (int __sig, const struct sigaction *__restrict __act, struct sigaction *__restrict __oact) __THROW; /* Put in SET all signals that are blocked and waiting to be delivered. */ extern int sigpending (sigset_t *__set) __THROW __nonnull ((1)); /* Select any of pending signals from SET or wait for any to arrive. This function is a cancellation point and therefore not marked with __THROW. */ extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig) __nonnull ((1, 2)); # ifdef __USE_POSIX199309 /* Select any of pending signals from SET and place information in INFO. This function is a cancellation point and therefore not marked with __THROW. */ extern int sigwaitinfo (const sigset_t *__restrict __set, siginfo_t *__restrict __info) __nonnull ((1)); /* Select any of pending signals from SET and place information in INFO. Wait the time specified by TIMEOUT if no signal is pending. This function is a cancellation point and therefore not marked with __THROW. */ extern int sigtimedwait (const sigset_t *__restrict __set, siginfo_t *__restrict __info, const struct timespec *__restrict __timeout) __nonnull ((1)); /* Send signal SIG to the process PID. Associate data in VAL with the signal. */ extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val) __THROW; # endif /* Use POSIX 199306. */ # 304 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #endif /* Use POSIX. */ # 306 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #ifdef __USE_BSD /* Names of the signals. This variable exists only for compatibility. Use `strsignal' instead (see ). */ extern const char *const _sys_siglist[_NSIG]; extern const char *const sys_siglist[_NSIG]; /* Structure passed to `sigvec'. */ struct sigvec { __sighandler_t sv_handler; /* Signal handler. */ int sv_mask; /* Mask of signals to be blocked. */ int sv_flags; /* Flags (see below). */ # define sv_onstack sv_flags /* 4.2 BSD compatibility. */ }; /* Bits in `sv_flags'. */ # define SV_ONSTACK (1 << 0)/* Take the signal on the signal stack. */ # define SV_INTERRUPT (1 << 1)/* Do not restart system calls. */ # define SV_RESETHAND (1 << 2)/* Reset handler to SIG_DFL on receipt. */ /* If VEC is non-NULL, set the handler for SIG to the `sv_handler' member of VEC. The signals in `sv_mask' will be blocked while the handler runs. If the SV_RESETHAND bit is set in `sv_flags', the handler for SIG will be reset to SIG_DFL before `sv_handler' is entered. If OVEC is non-NULL, it is filled in with the old information for SIG. */ extern int sigvec (int __sig, const struct sigvec *__vec, struct sigvec *__ovec) __THROW; /* Get machine-dependent `struct sigcontext' and signal subcodes. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 340 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 341 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* Restore the state saved in SCP. */ extern int sigreturn (struct sigcontext *__scp) __THROW; #endif /* use BSD. */ # 346 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 # define __need_size_t #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 350 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 351 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* If INTERRUPT is nonzero, make signal SIG interrupt system calls (causing them to fail with EINTR); if INTERRUPT is zero, make system calls be restarted after signal SIG. */ extern int siginterrupt (int __sig, int __interrupt) __THROW; #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 357 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 358 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # if defined __USE_XOPEN || defined __USE_XOPEN2K8 /* This will define `ucontext_t' and `mcontext_t'. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 360 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 361 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # endif # 362 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* Run signals handlers on the stack specified by SS (if not NULL). If OSS is not NULL, it is filled in with the old signal stack status. This interface is obsolete and on many platform not implemented. */ extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) __THROW __attribute_deprecated__; /* Alternate signal handler stack interface. This interface should always be preferred over `sigstack'. */ extern int sigaltstack (const struct sigaltstack *__restrict __ss, struct sigaltstack *__restrict __oss) __THROW; #endif /* use BSD or X/Open Unix. */ # 375 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #ifdef __USE_XOPEN_EXTENDED /* Simplified interface for signal management. */ /* Add SIG to the calling process' signal mask. */ extern int sighold (int __sig) __THROW; /* Remove SIG from the calling process' signal mask. */ extern int sigrelse (int __sig) __THROW; /* Set the disposition of SIG to SIG_IGN. */ extern int sigignore (int __sig) __THROW; /* Set the disposition of SIG. */ extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __THROW; #endif # 391 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #if defined __USE_POSIX199506 || defined __USE_UNIX98 /* Some of the functions for handling signals in threaded programs must be defined here. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 395 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 396 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 396 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 397 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #endif /* use Unix98 */ # 398 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* The following functions are used internally in the C library and in other code which need deep insights. */ /* Return number of available real-time signal with highest priority. */ extern int __libc_current_sigrtmin (void) __THROW; /* Return number of available real-time signal with lowest priority. */ extern int __libc_current_sigrtmax (void) __THROW; #endif /* signal.h */ # 408 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 __END_DECLS #endif /* not signal.h */ # 412 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 23 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/ucontext.h" 2 3 /* We need the signal context definitions even if they are not used included in . */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/ucontext.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigcontext.h" 1 3 /* Copyright (C) 1996, 1997, 1998, 2011 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H # error "Never use directly; include instead." #endif # 21 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigcontext.h" 3 #ifndef sigcontext_struct /* Kernel headers before 2.1.1 define a struct sigcontext_struct, but we need sigcontext. */ # define sigcontext_struct sigcontext #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigcontext.h" 3 # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigcontext.h" 3 /* The Linux kernel headers redefine NULL wrongly, so cleanup afterwards. */ # define __need_NULL #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 31 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigcontext.h" 3 # 32 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigcontext.h" 3 #endif # 33 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigcontext.h" 3 # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/ucontext.h" 2 3 #if __WORDSIZE == 32 /* Number of general registers. */ # define NGREG 48 /* Container for all general registers. */ typedef unsigned long gregset_t[NGREG]; /* Container for floating-point registers and status */ typedef struct _libc_fpstate { double fpregs[32]; double fpscr; unsigned int _pad[2]; } fpregset_t; /* Container for Altivec/VMX registers and status. Needs to be aligned on a 16-byte boundary. */ typedef struct _libc_vrstate { unsigned int vrregs[32][4]; unsigned int vrsave; unsigned int _pad[2]; unsigned int vscr; } vrregset_t; /* Context to describe whole processor state. */ typedef struct { gregset_t gregs; fpregset_t fpregs; vrregset_t vrregs __attribute__((__aligned__(16))); } mcontext_t; #else # 63 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/ucontext.h" 3 /* For 64-bit kernels with Altivec support, a machine context is exactly * a sigcontext. For older kernel (without Altivec) the sigcontext matches * the mcontext upto but not including the v_regs field. For kernels that * don't AT_HWCAP or return AT_HWCAP without PPC_FEATURE_HAS_ALTIVEC the * v_regs field may not exit and should not be referenced. The v_regd field * can be refernced safely only after verifying that PPC_FEATURE_HAS_ALTIVEC * is set in AT_HWCAP. */ /* Number of general registers. */ # define NGREG 48 /* includes r0-r31, nip, msr, lr, etc. */ # define NFPREG 33 /* includes fp0-fp31 &fpscr. */ # define NVRREG 34 /* includes v0-v31, vscr, & vrsave in split vectors */ typedef unsigned long gregset_t[NGREG]; typedef double fpregset_t[NFPREG]; /* Container for Altivec/VMX Vector Status and Control Register. Only 32-bits but can only be copied to/from a 128-bit vector register. So we allocated a whole quadword speedup save/restore. */ typedef struct _libc_vscr { unsigned int __pad[3]; unsigned int vscr_word; } vscr_t; /* Container for Altivec/VMX registers and status. Must to be aligned on a 16-byte boundary. */ typedef struct _libc_vrstate { unsigned int vrregs[32][4]; vscr_t vscr; unsigned int vrsave; unsigned int __pad[3]; } vrregset_t __attribute__((__aligned__(16))); typedef struct { unsigned long __unused[4]; int signal; int __pad0; unsigned long handler; unsigned long oldmask; struct pt_regs *regs; gregset_t gp_regs; fpregset_t fp_regs; /* * To maintain compatibility with current implementations the sigcontext is * extended by appending a pointer (v_regs) to a quadword type (elf_vrreg_t) * followed by an unstructured (vmx_reserve) field of 69 doublewords. This * allows the array of vector registers to be quadword aligned independent of * the alignment of the containing sigcontext or ucontext. It is the * responsibility of the code setting the sigcontext to set this pointer to * either NULL (if this processor does not support the VMX feature) or the * address of the first quadword within the allocated (vmx_reserve) area. * * The pointer (v_regs) of vector type (elf_vrreg_t) is essentually * an array of 34 quadword entries. The entries with * indexes 0-31 contain the corresponding vector registers. The entry with * index 32 contains the vscr as the last word (offset 12) within the * quadword. This allows the vscr to be stored as either a quadword (since * it must be copied via a vector register to/from storage) or as a word. * The entry with index 33 contains the vrsave as the first word (offset 0) * within the quadword. */ vrregset_t *v_regs; /* Extra space for the QPX registers. */ long vmx_reserve[NVRREG+NVRREG+32+1]; } mcontext_t; #endif # 135 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/ucontext.h" 3 /* Userlevel context. */ typedef struct ucontext { unsigned long int uc_flags; struct ucontext *uc_link; stack_t uc_stack; #if __WORDSIZE == 32 /* * These fields are set up this way to maximize source and * binary compatibility with code written for the old * ucontext_t definition, which didn't include space for the * registers. * * Different versions of the kernel have stored the registers on * signal delivery at different offsets from the ucontext struct. * Programs should thus use the uc_mcontext.uc_regs pointer to * find where the registers are actually stored. The registers * will be stored within the ucontext_t struct but not necessarily * at a fixed address. As a side-effect, this lets us achieve * 16-byte alignment for the register storage space if the * Altivec registers are to be saved, without requiring 16-byte * alignment on the whole ucontext_t. * * The uc_mcontext.regs field is included for source compatibility * with programs written against the older ucontext_t definition, * and its name should therefore not change. The uc_pad field * is for binary compatibility with programs compiled against the * old ucontext_t; it ensures that uc_mcontext.regs and uc_sigmask * are at the same offset as previously. */ int uc_pad[7]; union uc_regs_ptr { struct pt_regs *regs; mcontext_t *uc_regs; } uc_mcontext; sigset_t uc_sigmask; char uc_reg_space[sizeof(mcontext_t) + 12]; /* last for extensibility */ #else /* 64-bit */ # 174 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/ucontext.h" 3 sigset_t uc_sigmask; mcontext_t uc_mcontext; /* last for extensibility */ #endif # 177 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/ucontext.h" 3 } ucontext_t; #endif /* sys/ucontext.h */ # 180 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/ucontext.h" 3 # 361 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 2 3 # endif # 362 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* Run signals handlers on the stack specified by SS (if not NULL). If OSS is not NULL, it is filled in with the old signal stack status. This interface is obsolete and on many platform not implemented. */ extern int sigstack (struct sigstack *__ss, struct sigstack *__oss) __THROW __attribute_deprecated__; /* Alternate signal handler stack interface. This interface should always be preferred over `sigstack'. */ extern int sigaltstack (const struct sigaltstack *__restrict __ss, struct sigaltstack *__restrict __oss) __THROW; #endif /* use BSD or X/Open Unix. */ # 375 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #ifdef __USE_XOPEN_EXTENDED /* Simplified interface for signal management. */ /* Add SIG to the calling process' signal mask. */ extern int sighold (int __sig) __THROW; /* Remove SIG from the calling process' signal mask. */ extern int sigrelse (int __sig) __THROW; /* Set the disposition of SIG to SIG_IGN. */ extern int sigignore (int __sig) __THROW; /* Set the disposition of SIG. */ extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __THROW; #endif # 391 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #if defined __USE_POSIX199506 || defined __USE_UNIX98 /* Some of the functions for handling signals in threaded programs must be defined here. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 395 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 396 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 396 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigthread.h" 1 3 /* Signal handling function for threaded programs. Copyright (C) 1998-2000, 2002, 2009, 2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; see the file COPYING.LIB. If not, see . */ #ifndef _BITS_SIGTHREAD_H #define _BITS_SIGTHREAD_H 1 #if !defined _SIGNAL_H && !defined _PTHREAD_H # error "Never include this file directly. Use instead" #endif # 25 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigthread.h" 3 /* Functions for handling signals. */ /* Modify the signal mask for the calling thread. The arguments have the same meaning as for sigprocmask(2). */ extern int pthread_sigmask (int __how, const __sigset_t *__restrict __newmask, __sigset_t *__restrict __oldmask)__THROW; /* Send signal SIGNO to the given thread. */ extern int pthread_kill (pthread_t __threadid, int __signo) __THROW; #ifdef __USE_GNU /* Queue signal and data to a thread. */ extern int pthread_sigqueue (pthread_t __threadid, int __signo, const union sigval __value) __THROW; #endif # 42 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigthread.h" 3 #endif /* bits/sigthread.h */ # 44 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sigthread.h" 3 # 397 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 2 3 #endif /* use Unix98 */ # 398 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 /* The following functions are used internally in the C library and in other code which need deep insights. */ /* Return number of available real-time signal with highest priority. */ extern int __libc_current_sigrtmin (void) __THROW; /* Return number of available real-time signal with lowest priority. */ extern int __libc_current_sigrtmax (void) __THROW; #endif /* signal.h */ # 408 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 __END_DECLS #endif /* not signal.h */ # 412 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/signal.h" 3 # 29 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 2 3 /* This file defines some things in system-specific ways. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 31 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/param.h" 1 3 /* Old-style Unix parameters and limits. Linux version. Copyright (C) 1995-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_PARAM_H # error "Never use directly; include instead." #endif # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/param.h" 3 #ifndef ARG_MAX # define __undef_ARG_MAX #endif # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/param.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/param.h" 3 # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/param.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/param.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/param.h" 1 3 #ifndef _LINUX_PARAM_H #define _LINUX_PARAM_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 4 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/param.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/param.h" 1 3 #ifndef _ASM_POWERPC_PARAM_H #define _ASM_POWERPC_PARAM_H #ifndef HZ #define HZ 100 #endif # 8 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/param.h" 3 #define EXEC_PAGESIZE 4096 #ifndef NOGROUP #define NOGROUP (-1) #endif # 14 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/param.h" 3 #define MAXHOSTNAMELEN 64 /* max length of hostname */ #endif /* _ASM_POWERPC_PARAM_H */ # 18 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/param.h" 3 # 5 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/param.h" 2 3 #endif # 7 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/param.h" 3 # 29 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/param.h" 2 3 /* The kernel headers define ARG_MAX. The value is wrong, though. */ #ifdef __undef_ARG_MAX # undef ARG_MAX # undef __undef_ARG_MAX #endif # 35 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/param.h" 3 #define MAXSYMLINKS 20 /* The following are not really correct but it is a value we used for a long time and which seems to be usable. People should not use NOFILE and NCARGS anyway. */ #define NOFILE 256 #define NCARGS 131072 # 32 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 2 3 /* BSD names for some values. */ #define NBBY CHAR_BIT #if !defined NGROUPS && defined NGROUPS_MAX # define NGROUPS NGROUPS_MAX #endif # 41 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 3 #if !defined MAXSYMLINKS && defined SYMLOOP_MAX # define MAXSYMLINKS SYMLOOP_MAX #endif # 44 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 3 #if !defined CANBSIZ && defined MAX_CANON # define CANBSIZ MAX_CANON #endif # 47 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 3 #if !defined MAXPATHLEN && defined PATH_MAX # define MAXPATHLEN PATH_MAX #endif # 50 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 3 #if !defined NOFILE && defined OPEN_MAX # define NOFILE OPEN_MAX #endif # 53 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 3 #ifndef NCARGS # ifdef ARG_MAX # define NCARGS ARG_MAX # else # 57 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 3 /* ARG_MAX is unlimited, but we define NCARGS for BSD programs that want to compare against some fixed limit. */ # define NCARGS INT_MAX # endif # 61 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 3 #endif # 62 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 3 /* Magical constants. */ #ifndef NOGROUP # define NOGROUP 65535 /* Marker for empty group set member. */ #endif # 68 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 3 #ifndef NODEV # define NODEV ((dev_t) -1) /* Non-existent device. */ #endif # 71 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 3 /* Unit of `st_blocks'. */ #define DEV_BSIZE 512 /* Bit map related macros. */ #define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY)) #define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY))) #define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY))) #define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0) /* Macros for counting and rounding. */ #ifndef howmany # define howmany(x, y) (((x) + ((y) - 1)) / (y)) #endif # 87 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 3 #ifdef __GNUC__ # define roundup(x, y) (__builtin_constant_p (y) && powerof2 (y) \ ? (((x) + (y) - 1) & ~((y) - 1)) \ : ((((x) + ((y) - 1)) / (y)) * (y))) #else # 92 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 3 # define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) #endif # 94 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 3 #define powerof2(x) ((((x) - 1) & (x)) == 0) /* Macros for min/max. */ #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) #endif /* sys/param.h */ # 102 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/param.h" 3 # 50 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #endif # 51 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if defined (HAVE_USLEEP) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 53 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 54 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if defined (NEEDS_USLEEP_DECL) int usleep(useconds_t usec); #endif # 57 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 58 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if defined(HAVE_LONG_LONG_INT) /* Assume two's complement for determining LLONG_MAX (already assumed * elsewhere in MPICH). */ #ifndef LLONG_MAX /* slightly tricky (values in binary): * - put a 1 in the second-to-msb digit (0100...0000) * - sub 1, giving all 1s starting at third-to-msb digit (0011...1111) * - shift left 1 (0111...1110) * - add 1, yielding all 1s in positive space (0111...1111) */ #define LLONG_MAX (((((long long) 1 << (sizeof(long long) * CHAR_BIT - 2)) - 1 ) << 1) + 1) #endif # 70 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif /* defined(HAVE_LONG_LONG_INT) */ # 71 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if (!defined MAXHOSTNAMELEN) && (!defined MAX_HOSTNAME_LEN) #define MAX_HOSTNAME_LEN 256 #elif !defined MAX_HOSTNAME_LEN # 75 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #define MAX_HOSTNAME_LEN MAXHOSTNAMELEN #endif # 77 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" /* This allows us to keep names local to a single file when we can use weak symbols */ #ifdef USE_WEAK_SYMBOLS #define PMPI_LOCAL static #else # 83 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #define PMPI_LOCAL #endif # 85 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" /* Fix for universal endianess added in autoconf 2.62 */ #ifdef WORDS_UNIVERSAL_ENDIAN #if defined(__BIG_ENDIAN__) #elif defined(__LITTLE_ENDIAN__) # 90 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #define WORDS_LITTLEENDIAN #else # 92 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #error 'Universal endianess defined without __BIG_ENDIAN__ or __LITTLE_ENDIAN__' #endif # 94 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 95 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if defined(HAVE_VSNPRINTF) && defined(NEEDS_VSNPRINTF_DECL) && !defined(vsnprintf) int vsnprintf(char *str, size_t size, const char *format, va_list ap); # endif # 99 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" /***************************************************************************** * We use the following ordering of information in this file: * * 1. Start with independent headers that do not have any * dependencies on the rest of the MPICH implementation (e.g., * mpl, opa, mpi.h). * * 2. Next is forward declarations of MPIR structures (MPIR_Comm, * MPIR_Win, etc.). * * 3. After that we have device-independent headers (MPIR * functionality that does not have any dependency on MPID). * * 4. Next is the device "pre" header that defines device-level * initial objects that would be used by the MPIR structures. * * 5. Then comes the device-dependent MPIR functionality, with the * actual definitions of structures, function prototypes, etc. * This functionality can only rely on the device "pre" * functionality. * * 6. Finally, we'll add the device "post" header that is allowed to * use anything from the MPIR layer. *****************************************************************************/ /*****************************************************************************/ /*********************** PART 1: INDEPENDENT HEADERS *************************/ /*****************************************************************************/ /* if we are defining this, we must define it before including mpl.h */ #if defined(MPICH_DEBUG_MEMINIT) #define MPL_VG_ENABLED 1 #endif # 135 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl.h" #endif /* expanded by -frewrite-includes */ # 136 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPL_H_INCLUDED) #define MPL_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpl_base.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPL_BASE_H_INCLUDED) #define MPL_BASE_H_INCLUDED /* this file splits off the base functionality in MPL, which does not * depend on any of the exposed features. */ #if 0 /* expanded by -frewrite-includes */ #include "mplconfig.h" #endif /* expanded by -frewrite-includes */ # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" # 1 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" 1 #ifndef _INCLUDE_MPLCONFIG_H #define _INCLUDE_MPLCONFIG_H 1 /* include/mplconfig.h. Generated automatically at end of configure. */ /* include/config.h. Generated from config.h.in by configure. */ /* include/config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the header file. */ /* #undef HAVE_BACKTRACE_H */ /* Define to 1 if you have the `backtrace_symbols' function. */ #ifndef MPL_HAVE_BACKTRACE_SYMBOLS #define MPL_HAVE_BACKTRACE_SYMBOLS 1 #endif # 15 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* define if valgrind is old and/or broken compared to what we are expecting */ #ifndef MPL_HAVE_BROKEN_VALGRIND #define MPL_HAVE_BROKEN_VALGRIND 1 #endif # 21 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if the compiler supports __builtin_expect. */ #ifndef MPL_HAVE_BUILTIN_EXPECT #define MPL_HAVE_BUILTIN_EXPECT 1 #endif # 26 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the `clock_getres' function. */ #ifndef MPL_HAVE_CLOCK_GETRES #define MPL_HAVE_CLOCK_GETRES 1 #endif # 31 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the `clock_gettime' function. */ #ifndef MPL_HAVE_CLOCK_GETTIME #define MPL_HAVE_CLOCK_GETTIME 1 #endif # 36 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the header file. */ #ifndef MPL_HAVE_CTYPE_H #define MPL_HAVE_CTYPE_H 1 #endif # 41 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the declaration of `backtrace_create_state', and to 0 if you don't. */ #ifndef MPL_HAVE_DECL_BACKTRACE_CREATE_STATE #define MPL_HAVE_DECL_BACKTRACE_CREATE_STATE 0 #endif # 47 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the declaration of `backtrace_print', and to 0 if you don't. */ #ifndef MPL_HAVE_DECL_BACKTRACE_PRINT #define MPL_HAVE_DECL_BACKTRACE_PRINT 0 #endif # 53 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the header file. */ #ifndef MPL_HAVE_DLFCN_H #define MPL_HAVE_DLFCN_H 1 #endif # 58 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the header file. */ /* #undef HAVE_DRD_H */ /* Define to 1 if you have the header file. */ #ifndef MPL_HAVE_ERRNO_H #define MPL_HAVE_ERRNO_H 1 #endif # 66 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the header file. */ #ifndef MPL_HAVE_EXECINFO_H #define MPL_HAVE_EXECINFO_H 1 #endif # 71 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the `fdopen' function. */ #ifndef MPL_HAVE_FDOPEN #define MPL_HAVE_FDOPEN 1 #endif # 76 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define if GNU __attribute__ is supported */ #ifndef MPL_HAVE_GCC_ATTRIBUTE #define MPL_HAVE_GCC_ATTRIBUTE 1 #endif # 81 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the `gethrtime' function. */ /* #undef HAVE_GETHRTIME */ /* Define to 1 if you have the `getpid' function. */ #ifndef MPL_HAVE_GETPID #define MPL_HAVE_GETPID 1 #endif # 89 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the `gettimeofday' function. */ #ifndef MPL_HAVE_GETTIMEOFDAY #define MPL_HAVE_GETTIMEOFDAY 1 #endif # 94 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the header file. */ /* #undef HAVE_HELGRIND_H */ /* Define to 1 if you have the header file. */ #ifndef MPL_HAVE_INTTYPES_H #define MPL_HAVE_INTTYPES_H 1 #endif # 102 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the `backtrace' library (-lbacktrace). */ /* #undef HAVE_LIBBACKTRACE */ /* Define to 1 if you have the `unwind' library (-lunwind). */ /* #undef HAVE_LIBUNWIND */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBUNWIND_H */ /* Define to 1 if you have the `mach_absolute_time' function. */ /* #undef HAVE_MACH_ABSOLUTE_TIME */ /* Define if C99-style variable argument list macro functionality */ #ifndef MPL_HAVE_MACRO_VA_ARGS #define MPL_HAVE_MACRO_VA_ARGS 1 #endif # 119 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the header file. */ /* #undef HAVE_MEMCHECK_H */ /* Define to 1 if you have the header file. */ #ifndef MPL_HAVE_MEMORY_H #define MPL_HAVE_MEMORY_H 1 #endif # 127 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the `mkstemp' function. */ #ifndef MPL_HAVE_MKSTEMP #define MPL_HAVE_MKSTEMP 1 #endif # 132 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the `mmap' function. */ #ifndef MPL_HAVE_MMAP #define MPL_HAVE_MMAP 1 #endif # 137 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the `munmap' function. */ #ifndef MPL_HAVE_MUNMAP #define MPL_HAVE_MUNMAP 1 #endif # 142 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the `pthread_cleanup_push' function. */ /* #undef HAVE_PTHREAD_CLEANUP_PUSH */ /* Define if pthread_cleanup_push is available, even as a macro */ /* #undef HAVE_PTHREAD_CLEANUP_PUSH_MACRO */ /* Define to 1 if you have the header file. */ #ifndef MPL_HAVE_PTHREAD_H #define MPL_HAVE_PTHREAD_H 1 #endif # 153 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the `pthread_yield' function. */ #ifndef MPL_HAVE_PTHREAD_YIELD #define MPL_HAVE_PTHREAD_YIELD 1 #endif # 158 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the `putenv' function. */ #ifndef MPL_HAVE_PUTENV #define MPL_HAVE_PUTENV 1 #endif # 163 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the header file. */ #ifndef MPL_HAVE_SCHED_H #define MPL_HAVE_SCHED_H 1 #endif # 168 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the `sched_yield' function. */ #ifndef MPL_HAVE_SCHED_YIELD #define MPL_HAVE_SCHED_YIELD 1 #endif # 173 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the `select' function. */ #ifndef MPL_HAVE_SELECT #define MPL_HAVE_SELECT 1 #endif # 178 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the `shmat' function. */ /* #undef HAVE_SHMAT */ /* Define to 1 if you have the `shmctl' function. */ /* #undef HAVE_SHMCTL */ /* Define to 1 if you have the `shmdt' function. */ /* #undef HAVE_SHMDT */ /* Define to 1 if you have the `shmget' function. */ /* #undef HAVE_SHMGET */ /* Define to 1 if you have the `sleep' function. */ #ifndef MPL_HAVE_SLEEP #define MPL_HAVE_SLEEP 1 #endif # 195 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the `snprintf' function. */ #ifndef MPL_HAVE_SNPRINTF #define MPL_HAVE_SNPRINTF 1 #endif # 200 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the header file. */ #ifndef MPL_HAVE_STDARG_H #define MPL_HAVE_STDARG_H 1 #endif # 205 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the header file. */ #ifndef MPL_HAVE_STDINT_H #define MPL_HAVE_STDINT_H 1 #endif # 210 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the header file. */ #ifndef MPL_HAVE_STDIO_H #define MPL_HAVE_STDIO_H 1 #endif # 215 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the header file. */ #ifndef MPL_HAVE_STDLIB_H #define MPL_HAVE_STDLIB_H 1 #endif # 220 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the `strdup' function. */ #ifndef MPL_HAVE_STRDUP #define MPL_HAVE_STRDUP 1 #endif # 225 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the `strerror' function. */ #ifndef MPL_HAVE_STRERROR #define MPL_HAVE_STRERROR 1 #endif # 230 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the header file. */ #ifndef MPL_HAVE_STRINGS_H #define MPL_HAVE_STRINGS_H 1 #endif # 235 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the header file. */ #ifndef MPL_HAVE_STRING_H #define MPL_HAVE_STRING_H 1 #endif # 240 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the `strncmp' function. */ #ifndef MPL_HAVE_STRNCMP #define MPL_HAVE_STRNCMP 1 #endif # 245 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the header file. */ #ifndef MPL_HAVE_SYS_SELECT_H #define MPL_HAVE_SYS_SELECT_H 1 #endif # 250 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the header file. */ #ifndef MPL_HAVE_SYS_STAT_H #define MPL_HAVE_SYS_STAT_H 1 #endif # 255 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the header file. */ #ifndef MPL_HAVE_SYS_TYPES_H #define MPL_HAVE_SYS_TYPES_H 1 #endif # 260 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the header file. */ #ifndef MPL_HAVE_SYS_UIO_H #define MPL_HAVE_SYS_UIO_H 1 #endif # 265 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the header file. */ /* #undef HAVE_THREAD_H */ /* Define to 1 if you have the `thr_yield' function. */ /* #undef HAVE_THR_YIELD */ /* Define to 1 if you have the header file. */ #ifndef MPL_HAVE_UNISTD_H #define MPL_HAVE_UNISTD_H 1 #endif # 276 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the `usleep' function. */ #ifndef MPL_HAVE_USLEEP #define MPL_HAVE_USLEEP 1 #endif # 281 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the header file. */ /* #undef HAVE_VALGRIND_DRD_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_VALGRIND_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_VALGRIND_HELGRIND_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_VALGRIND_MEMCHECK_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_VALGRIND_VALGRIND_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_WINDOWS_H */ /* Define to 1 if you have the `yield' function. */ /* #undef HAVE_YIELD */ /* defined if the C compiler supports __typeof(variable) */ #ifndef MPL_HAVE___TYPEOF #define MPL_HAVE___TYPEOF 1 #endif # 307 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define which x86 cycle counter to use */ /* #undef LINUX86_CYCLE_CPUID_RDTSC32 */ /* Define which x86 cycle counter to use */ /* #undef LINUX86_CYCLE_CPUID_RDTSC64 */ /* Define which x86 cycle counter to use */ /* #undef LINUX86_CYCLE_RDTSC */ /* Define which x86 cycle counter to use */ /* #undef LINUX86_CYCLE_RDTSCP */ /* Define to the sub-directory where libtool stores uninstalled libraries. */ #ifndef MPL_LT_OBJDIR #define MPL_LT_OBJDIR ".libs/" #endif # 324 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define if use MMAP shared memory */ #ifndef MPL_MPL_USE_MMAP_SHM #define MPL_MPL_USE_MMAP_SHM 1 #endif # 329 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define if use Windows shared memory */ /* #undef MPL_USE_NT_SHM */ /* Define if use SYSV shared memory */ /* #undef MPL_USE_SYSV_SHM */ /* Define if fdopen needs a declaration */ #ifndef MPL_NEEDS_FDOPEN_DECL #define MPL_NEEDS_FDOPEN_DECL 1 #endif # 340 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define if mkstemp needs a declaration */ /* #undef NEEDS_MKSTEMP_DECL */ /* Define if pthread_mutexattr_settype needs a declaration */ /* #undef NEEDS_PTHREAD_MUTEXATTR_SETTYPE_DECL */ /* Define if putenv needs a declaration */ /* #undef NEEDS_PUTENV_DECL */ /* Define if snprintf needs a declaration */ /* #undef NEEDS_SNPRINTF_DECL */ /* Define if strdup needs a declaration */ /* #undef NEEDS_STRDUP_DECL */ /* Define if strerror needs a declaration */ /* #undef NEEDS_STRERROR_DECL */ /* Define if strncmp needs a declaration */ /* #undef NEEDS_STRNCMP_DECL */ /* Define if sys/time.h is required to get timer definitions */ /* #undef NEEDS_SYS_TIME_H */ /* Define if usleep needs a declaration */ /* #undef NEEDS_USLEEP_DECL */ /* Name of package */ #ifndef MPL_PACKAGE #define MPL_PACKAGE "mpl" #endif # 372 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to the address where bug reports for this package should be sent. */ #ifndef MPL_PACKAGE_BUGREPORT #define MPL_PACKAGE_BUGREPORT "" #endif # 377 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to the full name of this package. */ #ifndef MPL_PACKAGE_NAME #define MPL_PACKAGE_NAME "MPL" #endif # 382 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to the full name and version of this package. */ #ifndef MPL_PACKAGE_STRING #define MPL_PACKAGE_STRING "MPL 0.1" #endif # 387 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to the one symbol short name of this package. */ #ifndef MPL_PACKAGE_TARNAME #define MPL_PACKAGE_TARNAME "mpl" #endif # 392 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to the home page for this package. */ #ifndef MPL_PACKAGE_URL #define MPL_PACKAGE_URL "" #endif # 397 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to the version of this package. */ #ifndef MPL_PACKAGE_VERSION #define MPL_PACKAGE_VERSION "0.1" #endif # 402 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to an expression that will result in an error checking mutex type. */ #ifndef MPL_PTHREAD_MUTEX_ERRORCHECK_VALUE #define MPL_PTHREAD_MUTEX_ERRORCHECK_VALUE PTHREAD_MUTEX_ERRORCHECK #endif # 408 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to 1 if you have the ANSI C header files. */ #ifndef MPL_STDC_HEADERS #define MPL_STDC_HEADERS 1 #endif # 413 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* set to the name of the thread package */ #ifndef MPL_THREAD_PACKAGE_NAME #define MPL_THREAD_PACKAGE_NAME MPL_THREAD_PACKAGE_POSIX #endif # 418 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* If the compiler supports a TLS storage class define it to that here */ #ifndef MPL_TLS_SPECIFIER #define MPL_TLS_SPECIFIER _Thread_local #endif # 423 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define if performing coverage tests */ /* #undef USE_COVERAGE */ /* Define to enable logging macros */ /* #undef USE_DBG_LOGGING */ /* Define to enable memory tracing */ /* #undef USE_MEMORY_TRACING */ /* Define if we have sysv shared memory */ #ifndef MPL_USE_MMAP_SHM #define MPL_USE_MMAP_SHM 1 #endif # 437 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to use nothing to yield processor */ #ifndef MPL_USE_NOTHING_FOR_YIELD #define MPL_USE_NOTHING_FOR_YIELD 1 #endif # 442 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to use sched_yield to yield processor */ /* #undef USE_SCHED_YIELD_FOR_YIELD */ /* Define to use select to yield processor */ /* #undef USE_SELECT_FOR_YIELD */ /* Define to use sleep to yield processor */ /* #undef USE_SLEEP_FOR_YIELD */ /* Define if we have sysv shared memory */ /* #undef USE_SYSV_SHM */ /* Define to use usleep to yield processor */ /* #undef USE_USLEEP_FOR_YIELD */ /* Define to use yield to yield processor */ /* #undef USE_YIELD_FOR_YIELD */ /* Version number of package */ #ifndef MPL_VERSION #define MPL_VERSION "0.1" #endif # 465 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus /* #undef inline */ #endif # 474 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #ifndef _mpl_restrict #define _mpl_restrict __restrict #endif # 481 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* Work around a bug in Sun C++: it does not support _Restrict or __restrict__, even though the corresponding Sun C compiler ends up with "#define restrict _Restrict" or "#define restrict __restrict__" in the previous line. Perhaps some future version of Sun C++ will work with restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict # define __restrict__ #endif # 490 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" /* once: _INCLUDE_MPLCONFIG_H */ #endif # 493 "/tmp/robl/mpich-bgq/src/mpl/include/mplconfig.h" # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 1 3 /* Copyright (C) 1997,1998,1999,2000,2001,2006 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99: 7.18 Integer types */ #ifndef _STDINT_H #define _STDINT_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 25 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wchar.h" 1 3 /* wchar_t type related definitions. Copyright (C) 2000 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _BITS_WCHAR_H #define _BITS_WCHAR_H 1 #define __WCHAR_MIN (-2147483647 - 1) #define __WCHAR_MAX (2147483647) #endif /* bits/wchar.h */ # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wchar.h" 3 # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 1 3 /* Determine the wordsize from the preprocessor defines. */ #if defined __powerpc64__ # define __WORDSIZE 64 # define __WORDSIZE_TIME64_COMPAT32 1 #else # 7 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 # define __WORDSIZE 32 #endif # 9 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 #if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL /* Signal the glibc ABI didn't used to have a `long double'. The changes all the `long double' function variants to be redirects to the double functions. */ # define __LONG_DOUBLE_MATH_OPTIONAL 1 # ifndef __LONG_DOUBLE_128__ # define __NO_LONG_DOUBLE_MATH 1 # endif # 19 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 #endif # 20 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 2 3 /* Exact integral types. */ /* Signed. */ /* There is some amount of overlap with as known by inet code */ #ifndef __int8_t_defined # define __int8_t_defined typedef signed char int8_t; typedef short int int16_t; typedef int int32_t; # if __WORDSIZE == 64 typedef long int int64_t; # else # 42 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 __extension__ typedef long long int int64_t; # endif # 45 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 #endif # 46 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 /* Unsigned. */ typedef unsigned char uint8_t; typedef unsigned short int uint16_t; #ifndef __uint32_t_defined typedef unsigned int uint32_t; # define __uint32_t_defined #endif # 54 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 #if __WORDSIZE == 64 typedef unsigned long int uint64_t; #else # 57 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 __extension__ typedef unsigned long long int uint64_t; #endif # 60 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 /* Small types. */ /* Signed. */ typedef signed char int_least8_t; typedef short int int_least16_t; typedef int int_least32_t; #if __WORDSIZE == 64 typedef long int int_least64_t; #else # 71 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 __extension__ typedef long long int int_least64_t; #endif # 74 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 /* Unsigned. */ typedef unsigned char uint_least8_t; typedef unsigned short int uint_least16_t; typedef unsigned int uint_least32_t; #if __WORDSIZE == 64 typedef unsigned long int uint_least64_t; #else # 82 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 __extension__ typedef unsigned long long int uint_least64_t; #endif # 85 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 /* Fast types. */ /* Signed. */ typedef signed char int_fast8_t; #if __WORDSIZE == 64 typedef long int int_fast16_t; typedef long int int_fast32_t; typedef long int int_fast64_t; #else # 96 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 typedef int int_fast16_t; typedef int int_fast32_t; __extension__ typedef long long int int_fast64_t; #endif # 101 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 /* Unsigned. */ typedef unsigned char uint_fast8_t; #if __WORDSIZE == 64 typedef unsigned long int uint_fast16_t; typedef unsigned long int uint_fast32_t; typedef unsigned long int uint_fast64_t; #else # 109 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 typedef unsigned int uint_fast16_t; typedef unsigned int uint_fast32_t; __extension__ typedef unsigned long long int uint_fast64_t; #endif # 114 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 /* Types for `void *' pointers. */ #if __WORDSIZE == 64 # ifndef __intptr_t_defined typedef long int intptr_t; # define __intptr_t_defined # endif # 122 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 typedef unsigned long int uintptr_t; #else # 124 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 # ifndef __intptr_t_defined typedef int intptr_t; # define __intptr_t_defined # endif # 128 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 typedef unsigned int uintptr_t; #endif # 130 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 /* Largest integral types. */ #if __WORDSIZE == 64 typedef long int intmax_t; typedef unsigned long int uintmax_t; #else # 137 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 __extension__ typedef long long int intmax_t; __extension__ typedef unsigned long long int uintmax_t; #endif # 142 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 /* The ISO C99 standard specifies that in C++ implementations these macros should only be defined if explicitly requested. */ #if !defined __cplusplus || defined __STDC_LIMIT_MACROS # if __WORDSIZE == 64 # define __INT64_C(c) c ## L # define __UINT64_C(c) c ## UL # else # 152 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 # define __INT64_C(c) c ## LL # define __UINT64_C(c) c ## ULL # endif # 155 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 /* Limits of integral types. */ /* Minimum of signed integral types. */ # define INT8_MIN (-128) # define INT16_MIN (-32767-1) # define INT32_MIN (-2147483647-1) # define INT64_MIN (-__INT64_C(9223372036854775807)-1) /* Maximum of signed integral types. */ # define INT8_MAX (127) # define INT16_MAX (32767) # define INT32_MAX (2147483647) # define INT64_MAX (__INT64_C(9223372036854775807)) /* Maximum of unsigned integral types. */ # define UINT8_MAX (255) # define UINT16_MAX (65535) # define UINT32_MAX (4294967295U) # define UINT64_MAX (__UINT64_C(18446744073709551615)) /* Minimum of signed integral types having a minimum size. */ # define INT_LEAST8_MIN (-128) # define INT_LEAST16_MIN (-32767-1) # define INT_LEAST32_MIN (-2147483647-1) # define INT_LEAST64_MIN (-__INT64_C(9223372036854775807)-1) /* Maximum of signed integral types having a minimum size. */ # define INT_LEAST8_MAX (127) # define INT_LEAST16_MAX (32767) # define INT_LEAST32_MAX (2147483647) # define INT_LEAST64_MAX (__INT64_C(9223372036854775807)) /* Maximum of unsigned integral types having a minimum size. */ # define UINT_LEAST8_MAX (255) # define UINT_LEAST16_MAX (65535) # define UINT_LEAST32_MAX (4294967295U) # define UINT_LEAST64_MAX (__UINT64_C(18446744073709551615)) /* Minimum of fast signed integral types having a minimum size. */ # define INT_FAST8_MIN (-128) # if __WORDSIZE == 64 # define INT_FAST16_MIN (-9223372036854775807L-1) # define INT_FAST32_MIN (-9223372036854775807L-1) # else # 200 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 # define INT_FAST16_MIN (-2147483647-1) # define INT_FAST32_MIN (-2147483647-1) # endif # 203 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 # define INT_FAST64_MIN (-__INT64_C(9223372036854775807)-1) /* Maximum of fast signed integral types having a minimum size. */ # define INT_FAST8_MAX (127) # if __WORDSIZE == 64 # define INT_FAST16_MAX (9223372036854775807L) # define INT_FAST32_MAX (9223372036854775807L) # else # 210 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 # define INT_FAST16_MAX (2147483647) # define INT_FAST32_MAX (2147483647) # endif # 213 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 # define INT_FAST64_MAX (__INT64_C(9223372036854775807)) /* Maximum of fast unsigned integral types having a minimum size. */ # define UINT_FAST8_MAX (255) # if __WORDSIZE == 64 # define UINT_FAST16_MAX (18446744073709551615UL) # define UINT_FAST32_MAX (18446744073709551615UL) # else # 221 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 # define UINT_FAST16_MAX (4294967295U) # define UINT_FAST32_MAX (4294967295U) # endif # 224 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 # define UINT_FAST64_MAX (__UINT64_C(18446744073709551615)) /* Values to test for integral types holding `void *' pointer. */ # if __WORDSIZE == 64 # define INTPTR_MIN (-9223372036854775807L-1) # define INTPTR_MAX (9223372036854775807L) # define UINTPTR_MAX (18446744073709551615UL) # else # 233 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 # define INTPTR_MIN (-2147483647-1) # define INTPTR_MAX (2147483647) # define UINTPTR_MAX (4294967295U) # endif # 237 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 /* Minimum for largest signed integral type. */ # define INTMAX_MIN (-__INT64_C(9223372036854775807)-1) /* Maximum for largest signed integral type. */ # define INTMAX_MAX (__INT64_C(9223372036854775807)) /* Maximum for largest unsigned integral type. */ # define UINTMAX_MAX (__UINT64_C(18446744073709551615)) /* Limits of other integer types. */ /* Limits of `ptrdiff_t' type. */ # if __WORDSIZE == 64 # define PTRDIFF_MIN (-9223372036854775807L-1) # define PTRDIFF_MAX (9223372036854775807L) # else # 255 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 # define PTRDIFF_MIN (-2147483647-1) # define PTRDIFF_MAX (2147483647) # endif # 258 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 /* Limits of `sig_atomic_t'. */ # define SIG_ATOMIC_MIN (-2147483647-1) # define SIG_ATOMIC_MAX (2147483647) /* Limit of `size_t' type. */ # if __WORDSIZE == 64 # define SIZE_MAX (18446744073709551615UL) # else # 267 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 # define SIZE_MAX (4294967295U) # endif # 269 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 /* Limits of `wchar_t'. */ # ifndef WCHAR_MIN /* These constants might also be defined in . */ # define WCHAR_MIN __WCHAR_MIN # define WCHAR_MAX __WCHAR_MAX # endif # 276 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 /* Limits of `wint_t'. */ # define WINT_MIN (0u) # define WINT_MAX (4294967295u) #endif /* C++ && limit macros */ # 282 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 /* The ISO C99 standard specifies that in C++ implementations these should only be defined if explicitly requested. */ #if !defined __cplusplus || defined __STDC_CONSTANT_MACROS /* Signed. */ # define INT8_C(c) c # define INT16_C(c) c # define INT32_C(c) c # if __WORDSIZE == 64 # define INT64_C(c) c ## L # else # 295 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 # define INT64_C(c) c ## LL # endif # 297 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 /* Unsigned. */ # define UINT8_C(c) c # define UINT16_C(c) c # define UINT32_C(c) c ## U # if __WORDSIZE == 64 # define UINT64_C(c) c ## UL # else # 305 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 # define UINT64_C(c) c ## ULL # endif # 307 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 /* Maximal type. */ # if __WORDSIZE == 64 # define INTMAX_C(c) c ## L # define UINTMAX_C(c) c ## UL # else # 313 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 # define INTMAX_C(c) c ## LL # define UINTMAX_C(c) c ## ULL # endif # 316 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 #endif /* C++ && constant macros */ # 318 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 #endif /* stdint.h */ # 320 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/stdint.h" 3 # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" 2 #if defined _mpl_restrict #define mpl_restrict _mpl_restrict #else # 24 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" #define mpl_restrict restrict #endif /* _mpl_restrict */ # 26 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" #if defined _mpl_const #define mpl_const _mpl_const #else # 30 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" #define mpl_const const #endif /* _mpl_const */ # 32 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" #if defined _mpl_inline #define mpl_inline _mpl_inline #else # 36 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" #define mpl_inline inline #endif /* _mpl_inline */ # 38 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" #if defined MPL_HAVE_CTYPE_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 40 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 1 3 /* Copyright (C) 1991,92,93,95,96,97,98,99,2001,2002,2004,2007-2009,2011,2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard 7.4: Character handling */ #ifndef _CTYPE_H #define _CTYPE_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 __BEGIN_DECLS #ifndef _ISbit /* These are all the characteristics of characters. If there get to be more than 16 distinct characteristics, many things must be changed that use `unsigned short int's. The characteristics are stored always in network byte order (big endian). We define the bit value interpretations here dependent on the machine's byte order. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 40 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 # 41 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 # if __BYTE_ORDER == __BIG_ENDIAN # define _ISbit(bit) (1 << (bit)) # else /* __BYTE_ORDER == __LITTLE_ENDIAN */ # 44 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 # define _ISbit(bit) ((bit) < 8 ? ((1 << (bit)) << 8) : ((1 << (bit)) >> 8)) # endif # 46 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 enum { _ISupper = _ISbit (0), /* UPPERCASE. */ _ISlower = _ISbit (1), /* lowercase. */ _ISalpha = _ISbit (2), /* Alphabetic. */ _ISdigit = _ISbit (3), /* Numeric. */ _ISxdigit = _ISbit (4), /* Hexadecimal numeric. */ _ISspace = _ISbit (5), /* Whitespace. */ _ISprint = _ISbit (6), /* Printing. */ _ISgraph = _ISbit (7), /* Graphical. */ _ISblank = _ISbit (8), /* Blank (usually SPC and TAB). */ _IScntrl = _ISbit (9), /* Control character. */ _ISpunct = _ISbit (10), /* Punctuation. */ _ISalnum = _ISbit (11) /* Alphanumeric. */ }; #endif /* ! _ISbit */ # 63 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 /* These are defined in ctype-info.c. The declarations here must match those in localeinfo.h. In the thread-specific locale model (see `uselocale' in ) we cannot use global variables for these as was done in the past. Instead, the following accessor functions return the address of each variable, which is local to the current thread if multithreaded. These point into arrays of 384, so they can be indexed by any `unsigned char' value [0,255]; by EOF (-1); or by any `signed char' value [-128,-1). ISO C requires that the ctype functions work for `unsigned char' values and for EOF; we also support negative `signed char' values for broken old programs. The case conversion arrays are of `int's rather than `unsigned char's because tolower (EOF) must be EOF, which doesn't fit into an `unsigned char'. But today more important is that the arrays are also used for multi-byte character sets. */ extern const unsigned short int **__ctype_b_loc (void) __THROW __attribute__ ((__const__)); extern const __int32_t **__ctype_tolower_loc (void) __THROW __attribute__ ((__const__)); extern const __int32_t **__ctype_toupper_loc (void) __THROW __attribute__ ((__const__)); #ifndef __cplusplus # define __isctype(c, type) \ ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type) #elif defined __USE_EXTERN_INLINES # 92 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 # define __isctype_f(type) \ __extern_inline int \ is##type (int __c) __THROW \ { \ return (*__ctype_b_loc ())[(int) (__c)] & (unsigned short int) _IS##type; \ } #endif # 99 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 #define __isascii(c) (((c) & ~0x7f) == 0) /* If C is a 7 bit value. */ #define __toascii(c) ((c) & 0x7f) /* Mask off high bits. */ #define __exctype(name) extern int name (int) __THROW __BEGIN_NAMESPACE_STD /* The following names are all functions: int isCHARACTERISTIC(int c); which return nonzero iff C has CHARACTERISTIC. For the meaning of the characteristic names, see the `enum' above. */ __exctype (isalnum); __exctype (isalpha); __exctype (iscntrl); __exctype (isdigit); __exctype (islower); __exctype (isgraph); __exctype (isprint); __exctype (ispunct); __exctype (isspace); __exctype (isupper); __exctype (isxdigit); /* Return the lowercase version of C. */ extern int tolower (int __c) __THROW; /* Return the uppercase version of C. */ extern int toupper (int __c) __THROW; __END_NAMESPACE_STD /* ISO C99 introduced one new function. */ #ifdef __USE_ISOC99 __BEGIN_NAMESPACE_C99 __exctype (isblank); __END_NAMESPACE_C99 #endif # 141 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 #ifdef __USE_GNU /* Test C for a set of character classes according to MASK. */ extern int isctype (int __c, int __mask) __THROW; #endif # 146 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 #if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN /* Return nonzero iff C is in the ASCII set (i.e., is no more than 7 bits wide). */ extern int isascii (int __c) __THROW; /* Return the part of C that is in the ASCII set (i.e., the low-order 7 bits of C). */ extern int toascii (int __c) __THROW; /* These are the same as `toupper' and `tolower' except that they do not check the argument for being in the range of a `char'. */ __exctype (_toupper); __exctype (_tolower); #endif /* Use SVID or use misc. */ # 162 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 /* This code is needed for the optimized mapping functions. */ #define __tobody(c, f, a, args) \ (__extension__ \ ({ int __res; \ if (sizeof (c) > 1) \ { \ if (__builtin_constant_p (c)) \ { \ int __c = (c); \ __res = __c < -128 || __c > 255 ? __c : (a)[__c]; \ } \ else \ __res = f args; \ } \ else \ __res = (a)[(int) (c)]; \ __res; })) #if !defined __NO_CTYPE # ifdef __isctype_f __isctype_f (alnum) __isctype_f (alpha) __isctype_f (cntrl) __isctype_f (digit) __isctype_f (lower) __isctype_f (graph) __isctype_f (print) __isctype_f (punct) __isctype_f (space) __isctype_f (upper) __isctype_f (xdigit) # ifdef __USE_ISOC99 __isctype_f (blank) # endif # 197 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 # elif defined __isctype # 198 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 # define isalnum(c) __isctype((c), _ISalnum) # define isalpha(c) __isctype((c), _ISalpha) # define iscntrl(c) __isctype((c), _IScntrl) # define isdigit(c) __isctype((c), _ISdigit) # define islower(c) __isctype((c), _ISlower) # define isgraph(c) __isctype((c), _ISgraph) # define isprint(c) __isctype((c), _ISprint) # define ispunct(c) __isctype((c), _ISpunct) # define isspace(c) __isctype((c), _ISspace) # define isupper(c) __isctype((c), _ISupper) # define isxdigit(c) __isctype((c), _ISxdigit) # ifdef __USE_ISOC99 # define isblank(c) __isctype((c), _ISblank) # endif # 212 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 # endif # 213 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 # ifdef __USE_EXTERN_INLINES __extern_inline int __NTH (tolower (int __c)) { return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c; } __extern_inline int __NTH (toupper (int __c)) { return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c; } # endif # 227 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 # if __GNUC__ >= 2 && defined __OPTIMIZE__ && !defined __cplusplus # define tolower(c) __tobody (c, tolower, *__ctype_tolower_loc (), (c)) # define toupper(c) __tobody (c, toupper, *__ctype_toupper_loc (), (c)) # endif /* Optimizing gcc */ # 232 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 # if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN # define isascii(c) __isascii (c) # define toascii(c) __toascii (c) # define _tolower(c) ((int) (*__ctype_tolower_loc ())[(int) (c)]) # define _toupper(c) ((int) (*__ctype_toupper_loc ())[(int) (c)]) # endif # 240 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 #endif /* Not __NO_CTYPE. */ # 242 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 #ifdef __USE_XOPEN2K8 /* The concept of one static locale per category is not very well thought out. Many applications will need to process its data using information from several different locales. Another application is the implementation of the internationalization handling in the upcoming ISO C++ standard library. To support this another set of the functions using locale data exist which have an additional argument. Attention: all these functions are *not* standardized in any form. This is a proof-of-concept implementation. */ /* Structure for reentrant locale using functions. This is an (almost) opaque type for the user level programs. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 258 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 # 259 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 /* These definitions are similar to the ones above but all functions take as an argument a handle for the locale which shall be used. */ # define __isctype_l(c, type, locale) \ ((locale)->__ctype_b[(int) (c)] & (unsigned short int) type) # define __exctype_l(name) \ extern int name (int, __locale_t) __THROW /* The following names are all functions: int isCHARACTERISTIC(int c, locale_t *locale); which return nonzero iff C has CHARACTERISTIC. For the meaning of the characteristic names, see the `enum' above. */ __exctype_l (isalnum_l); __exctype_l (isalpha_l); __exctype_l (iscntrl_l); __exctype_l (isdigit_l); __exctype_l (islower_l); __exctype_l (isgraph_l); __exctype_l (isprint_l); __exctype_l (ispunct_l); __exctype_l (isspace_l); __exctype_l (isupper_l); __exctype_l (isxdigit_l); __exctype_l (isblank_l); /* Return the lowercase version of C in locale L. */ extern int __tolower_l (int __c, __locale_t __l) __THROW; extern int tolower_l (int __c, __locale_t __l) __THROW; /* Return the uppercase version of C. */ extern int __toupper_l (int __c, __locale_t __l) __THROW; extern int toupper_l (int __c, __locale_t __l) __THROW; # if __GNUC__ >= 2 && defined __OPTIMIZE__ && !defined __cplusplus # define __tolower_l(c, locale) \ __tobody (c, __tolower_l, (locale)->__ctype_tolower, (c, locale)) # define __toupper_l(c, locale) \ __tobody (c, __toupper_l, (locale)->__ctype_toupper, (c, locale)) # define tolower_l(c, locale) __tolower_l ((c), (locale)) # define toupper_l(c, locale) __toupper_l ((c), (locale)) # endif /* Optimizing gcc */ # 303 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 # ifndef __NO_CTYPE # define __isalnum_l(c,l) __isctype_l((c), _ISalnum, (l)) # define __isalpha_l(c,l) __isctype_l((c), _ISalpha, (l)) # define __iscntrl_l(c,l) __isctype_l((c), _IScntrl, (l)) # define __isdigit_l(c,l) __isctype_l((c), _ISdigit, (l)) # define __islower_l(c,l) __isctype_l((c), _ISlower, (l)) # define __isgraph_l(c,l) __isctype_l((c), _ISgraph, (l)) # define __isprint_l(c,l) __isctype_l((c), _ISprint, (l)) # define __ispunct_l(c,l) __isctype_l((c), _ISpunct, (l)) # define __isspace_l(c,l) __isctype_l((c), _ISspace, (l)) # define __isupper_l(c,l) __isctype_l((c), _ISupper, (l)) # define __isxdigit_l(c,l) __isctype_l((c), _ISxdigit, (l)) # define __isblank_l(c,l) __isctype_l((c), _ISblank, (l)) # if defined __USE_SVID || defined __USE_MISC # define __isascii_l(c,l) ((l), __isascii (c)) # define __toascii_l(c,l) ((l), __toascii (c)) # endif # 324 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 # define isalnum_l(c,l) __isalnum_l ((c), (l)) # define isalpha_l(c,l) __isalpha_l ((c), (l)) # define iscntrl_l(c,l) __iscntrl_l ((c), (l)) # define isdigit_l(c,l) __isdigit_l ((c), (l)) # define islower_l(c,l) __islower_l ((c), (l)) # define isgraph_l(c,l) __isgraph_l ((c), (l)) # define isprint_l(c,l) __isprint_l ((c), (l)) # define ispunct_l(c,l) __ispunct_l ((c), (l)) # define isspace_l(c,l) __isspace_l ((c), (l)) # define isupper_l(c,l) __isupper_l ((c), (l)) # define isxdigit_l(c,l) __isxdigit_l ((c), (l)) # define isblank_l(c,l) __isblank_l ((c), (l)) # if defined __USE_SVID || defined __USE_MISC # define isascii_l(c,l) __isascii_l ((c), (l)) # define toascii_l(c,l) __toascii_l ((c), (l)) # endif # 343 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 # endif /* Not __NO_CTYPE. */ # 345 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 #endif /* Use POSIX 2008. */ # 347 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 __END_DECLS #endif /* ctype.h */ # 351 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/ctype.h" 3 # 41 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" 2 #endif /* MPL_HAVE_CTYPE_H */ # 42 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" #if defined(MPL_HAVE_INTTYPES_H) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 44 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/inttypes.h" 1 3 /* Copyright (C) 1997-2001, 2004, 2007, 2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99: 7.8 Format conversion of integer types */ #ifndef _INTTYPES_H #define _INTTYPES_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 25 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/inttypes.h" 3 # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/inttypes.h" 3 /* Get the type definitions. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/inttypes.h" 3 # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/inttypes.h" 3 /* Get a definition for wchar_t. But we must not define wchar_t itself. */ #ifndef ____gwchar_t_defined # ifdef __cplusplus # define __gwchar_t wchar_t # elif defined __WCHAR_TYPE__ # 34 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/inttypes.h" 3 typedef __WCHAR_TYPE__ __gwchar_t; # else # 36 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/inttypes.h" 3 # define __need_wchar_t #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 37 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/inttypes.h" 3 # 38 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/inttypes.h" 3 typedef wchar_t __gwchar_t; # endif # 40 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/inttypes.h" 3 # define ____gwchar_t_defined 1 #endif # 42 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/inttypes.h" 3 /* The ISO C99 standard specifies that these macros must only be defined if explicitly requested. */ #if !defined __cplusplus || defined __STDC_FORMAT_MACROS # if __WORDSIZE == 64 # define __PRI64_PREFIX "l" # define __PRIPTR_PREFIX "l" # else # 52 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/inttypes.h" 3 # define __PRI64_PREFIX "ll" # define __PRIPTR_PREFIX # endif # 55 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/inttypes.h" 3 /* Macros for printing format specifiers. */ /* Decimal notation. */ # define PRId8 "d" # define PRId16 "d" # define PRId32 "d" # define PRId64 __PRI64_PREFIX "d" # define PRIdLEAST8 "d" # define PRIdLEAST16 "d" # define PRIdLEAST32 "d" # define PRIdLEAST64 __PRI64_PREFIX "d" # define PRIdFAST8 "d" # define PRIdFAST16 __PRIPTR_PREFIX "d" # define PRIdFAST32 __PRIPTR_PREFIX "d" # define PRIdFAST64 __PRI64_PREFIX "d" # define PRIi8 "i" # define PRIi16 "i" # define PRIi32 "i" # define PRIi64 __PRI64_PREFIX "i" # define PRIiLEAST8 "i" # define PRIiLEAST16 "i" # define PRIiLEAST32 "i" # define PRIiLEAST64 __PRI64_PREFIX "i" # define PRIiFAST8 "i" # define PRIiFAST16 __PRIPTR_PREFIX "i" # define PRIiFAST32 __PRIPTR_PREFIX "i" # define PRIiFAST64 __PRI64_PREFIX "i" /* Octal notation. */ # define PRIo8 "o" # define PRIo16 "o" # define PRIo32 "o" # define PRIo64 __PRI64_PREFIX "o" # define PRIoLEAST8 "o" # define PRIoLEAST16 "o" # define PRIoLEAST32 "o" # define PRIoLEAST64 __PRI64_PREFIX "o" # define PRIoFAST8 "o" # define PRIoFAST16 __PRIPTR_PREFIX "o" # define PRIoFAST32 __PRIPTR_PREFIX "o" # define PRIoFAST64 __PRI64_PREFIX "o" /* Unsigned integers. */ # define PRIu8 "u" # define PRIu16 "u" # define PRIu32 "u" # define PRIu64 __PRI64_PREFIX "u" # define PRIuLEAST8 "u" # define PRIuLEAST16 "u" # define PRIuLEAST32 "u" # define PRIuLEAST64 __PRI64_PREFIX "u" # define PRIuFAST8 "u" # define PRIuFAST16 __PRIPTR_PREFIX "u" # define PRIuFAST32 __PRIPTR_PREFIX "u" # define PRIuFAST64 __PRI64_PREFIX "u" /* lowercase hexadecimal notation. */ # define PRIx8 "x" # define PRIx16 "x" # define PRIx32 "x" # define PRIx64 __PRI64_PREFIX "x" # define PRIxLEAST8 "x" # define PRIxLEAST16 "x" # define PRIxLEAST32 "x" # define PRIxLEAST64 __PRI64_PREFIX "x" # define PRIxFAST8 "x" # define PRIxFAST16 __PRIPTR_PREFIX "x" # define PRIxFAST32 __PRIPTR_PREFIX "x" # define PRIxFAST64 __PRI64_PREFIX "x" /* UPPERCASE hexadecimal notation. */ # define PRIX8 "X" # define PRIX16 "X" # define PRIX32 "X" # define PRIX64 __PRI64_PREFIX "X" # define PRIXLEAST8 "X" # define PRIXLEAST16 "X" # define PRIXLEAST32 "X" # define PRIXLEAST64 __PRI64_PREFIX "X" # define PRIXFAST8 "X" # define PRIXFAST16 __PRIPTR_PREFIX "X" # define PRIXFAST32 __PRIPTR_PREFIX "X" # define PRIXFAST64 __PRI64_PREFIX "X" /* Macros for printing `intmax_t' and `uintmax_t'. */ # define PRIdMAX __PRI64_PREFIX "d" # define PRIiMAX __PRI64_PREFIX "i" # define PRIoMAX __PRI64_PREFIX "o" # define PRIuMAX __PRI64_PREFIX "u" # define PRIxMAX __PRI64_PREFIX "x" # define PRIXMAX __PRI64_PREFIX "X" /* Macros for printing `intptr_t' and `uintptr_t'. */ # define PRIdPTR __PRIPTR_PREFIX "d" # define PRIiPTR __PRIPTR_PREFIX "i" # define PRIoPTR __PRIPTR_PREFIX "o" # define PRIuPTR __PRIPTR_PREFIX "u" # define PRIxPTR __PRIPTR_PREFIX "x" # define PRIXPTR __PRIPTR_PREFIX "X" /* Macros for scanning format specifiers. */ /* Signed decimal notation. */ # define SCNd8 "hhd" # define SCNd16 "hd" # define SCNd32 "d" # define SCNd64 __PRI64_PREFIX "d" # define SCNdLEAST8 "hhd" # define SCNdLEAST16 "hd" # define SCNdLEAST32 "d" # define SCNdLEAST64 __PRI64_PREFIX "d" # define SCNdFAST8 "hhd" # define SCNdFAST16 __PRIPTR_PREFIX "d" # define SCNdFAST32 __PRIPTR_PREFIX "d" # define SCNdFAST64 __PRI64_PREFIX "d" /* Signed decimal notation. */ # define SCNi8 "hhi" # define SCNi16 "hi" # define SCNi32 "i" # define SCNi64 __PRI64_PREFIX "i" # define SCNiLEAST8 "hhi" # define SCNiLEAST16 "hi" # define SCNiLEAST32 "i" # define SCNiLEAST64 __PRI64_PREFIX "i" # define SCNiFAST8 "hhi" # define SCNiFAST16 __PRIPTR_PREFIX "i" # define SCNiFAST32 __PRIPTR_PREFIX "i" # define SCNiFAST64 __PRI64_PREFIX "i" /* Unsigned decimal notation. */ # define SCNu8 "hhu" # define SCNu16 "hu" # define SCNu32 "u" # define SCNu64 __PRI64_PREFIX "u" # define SCNuLEAST8 "hhu" # define SCNuLEAST16 "hu" # define SCNuLEAST32 "u" # define SCNuLEAST64 __PRI64_PREFIX "u" # define SCNuFAST8 "hhu" # define SCNuFAST16 __PRIPTR_PREFIX "u" # define SCNuFAST32 __PRIPTR_PREFIX "u" # define SCNuFAST64 __PRI64_PREFIX "u" /* Octal notation. */ # define SCNo8 "hho" # define SCNo16 "ho" # define SCNo32 "o" # define SCNo64 __PRI64_PREFIX "o" # define SCNoLEAST8 "hho" # define SCNoLEAST16 "ho" # define SCNoLEAST32 "o" # define SCNoLEAST64 __PRI64_PREFIX "o" # define SCNoFAST8 "hho" # define SCNoFAST16 __PRIPTR_PREFIX "o" # define SCNoFAST32 __PRIPTR_PREFIX "o" # define SCNoFAST64 __PRI64_PREFIX "o" /* Hexadecimal notation. */ # define SCNx8 "hhx" # define SCNx16 "hx" # define SCNx32 "x" # define SCNx64 __PRI64_PREFIX "x" # define SCNxLEAST8 "hhx" # define SCNxLEAST16 "hx" # define SCNxLEAST32 "x" # define SCNxLEAST64 __PRI64_PREFIX "x" # define SCNxFAST8 "hhx" # define SCNxFAST16 __PRIPTR_PREFIX "x" # define SCNxFAST32 __PRIPTR_PREFIX "x" # define SCNxFAST64 __PRI64_PREFIX "x" /* Macros for scanning `intmax_t' and `uintmax_t'. */ # define SCNdMAX __PRI64_PREFIX "d" # define SCNiMAX __PRI64_PREFIX "i" # define SCNoMAX __PRI64_PREFIX "o" # define SCNuMAX __PRI64_PREFIX "u" # define SCNxMAX __PRI64_PREFIX "x" /* Macros for scaning `intptr_t' and `uintptr_t'. */ # define SCNdPTR __PRIPTR_PREFIX "d" # define SCNiPTR __PRIPTR_PREFIX "i" # define SCNoPTR __PRIPTR_PREFIX "o" # define SCNuPTR __PRIPTR_PREFIX "u" # define SCNxPTR __PRIPTR_PREFIX "x" #endif /* C++ && format macros */ # 271 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/inttypes.h" 3 __BEGIN_DECLS #if __WORDSIZE == 64 /* We have to define the `uintmax_t' type using `ldiv_t'. */ typedef struct { long int quot; /* Quotient. */ long int rem; /* Remainder. */ } imaxdiv_t; #else # 285 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/inttypes.h" 3 /* We have to define the `uintmax_t' type using `lldiv_t'. */ typedef struct { long long int quot; /* Quotient. */ long long int rem; /* Remainder. */ } imaxdiv_t; #endif # 294 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/inttypes.h" 3 /* Compute absolute value of N. */ extern intmax_t imaxabs (intmax_t __n) __THROW __attribute__ ((__const__)); /* Return the `imaxdiv_t' representation of the value of NUMER over DENOM. */ extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom) __THROW __attribute__ ((__const__)); /* Like `strtol' but convert to `intmax_t'. */ extern intmax_t strtoimax (const char *__restrict __nptr, char **__restrict __endptr, int __base) __THROW; /* Like `strtoul' but convert to `uintmax_t'. */ extern uintmax_t strtoumax (const char *__restrict __nptr, char ** __restrict __endptr, int __base) __THROW; /* Like `wcstol' but convert to `intmax_t'. */ extern intmax_t wcstoimax (const __gwchar_t *__restrict __nptr, __gwchar_t **__restrict __endptr, int __base) __THROW; /* Like `wcstoul' but convert to `uintmax_t'. */ extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr, __gwchar_t ** __restrict __endptr, int __base) __THROW; #ifdef __USE_EXTERN_INLINES # if __WORDSIZE == 64 extern long int __strtol_internal (const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) __THROW __nonnull ((1)) __wur; /* Like `strtol' but convert to `intmax_t'. */ __extern_inline intmax_t __NTH (strtoimax (const char *__restrict nptr, char **__restrict endptr, int base)) { return __strtol_internal (nptr, endptr, base, 0); } extern unsigned long int __strtoul_internal (const char *__restrict __nptr, char ** __restrict __endptr, int __base, int __group) __THROW __nonnull ((1)) __wur; /* Like `strtoul' but convert to `uintmax_t'. */ __extern_inline uintmax_t __NTH (strtoumax (const char *__restrict nptr, char **__restrict endptr, int base)) { return __strtoul_internal (nptr, endptr, base, 0); } extern long int __wcstol_internal (const __gwchar_t * __restrict __nptr, __gwchar_t **__restrict __endptr, int __base, int __group) __THROW __nonnull ((1)) __wur; /* Like `wcstol' but convert to `intmax_t'. */ __extern_inline intmax_t __NTH (wcstoimax (const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base)) { return __wcstol_internal (nptr, endptr, base, 0); } extern unsigned long int __wcstoul_internal (const __gwchar_t * __restrict __nptr, __gwchar_t ** __restrict __endptr, int __base, int __group) __THROW __nonnull ((1)) __wur; /* Like `wcstoul' but convert to `uintmax_t'. */ __extern_inline uintmax_t __NTH (wcstoumax (const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base)) { return __wcstoul_internal (nptr, endptr, base, 0); } # else /* __WORDSIZE == 32 */ # 376 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/inttypes.h" 3 __extension__ extern long long int __strtoll_internal (const char *__restrict __nptr, char **__restrict __endptr, int __base, int __group) __THROW __nonnull ((1)) __wur; /* Like `strtol' but convert to `intmax_t'. */ __extern_inline intmax_t __NTH (strtoimax (const char *__restrict nptr, char **__restrict endptr, int base)) { return __strtoll_internal (nptr, endptr, base, 0); } __extension__ extern unsigned long long int __strtoull_internal (const char * __restrict __nptr, char ** __restrict __endptr, int __base, int __group) __THROW __nonnull ((1)) __wur; /* Like `strtoul' but convert to `uintmax_t'. */ __extern_inline uintmax_t __NTH (strtoumax (const char *__restrict nptr, char **__restrict endptr, int base)) { return __strtoull_internal (nptr, endptr, base, 0); } __extension__ extern long long int __wcstoll_internal (const __gwchar_t *__restrict __nptr, __gwchar_t **__restrict __endptr, int __base, int __group) __THROW __nonnull ((1)) __wur; /* Like `wcstol' but convert to `intmax_t'. */ __extern_inline intmax_t __NTH (wcstoimax (const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base)) { return __wcstoll_internal (nptr, endptr, base, 0); } __extension__ extern unsigned long long int __wcstoull_internal (const __gwchar_t * __restrict __nptr, __gwchar_t ** __restrict __endptr, int __base, int __group) __THROW __nonnull ((1)) __wur; /* Like `wcstoul' but convert to `uintmax_t'. */ __extern_inline uintmax_t __NTH (wcstoumax (const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base)) { return __wcstoull_internal (nptr, endptr, base, 0); } # endif /* __WORDSIZE == 32 */ # 437 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/inttypes.h" 3 #endif /* Use extern inlines. */ # 438 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/inttypes.h" 3 __END_DECLS #endif /* inttypes.h */ # 442 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/inttypes.h" 3 # 45 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" 2 #endif /* MPL_HAVE_INTTYPES_H */ # 46 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" #if !defined ATTRIBUTE # if defined MPL_HAVE_GCC_ATTRIBUTE # define ATTRIBUTE(a_) __attribute__(a_) # else /* MPL_HAVE_GCC_ATTRIBUTE */ # 51 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" # define ATTRIBUTE(a_) # endif /* MPL_HAVE_GCC_ATTRIBUTE */ # 53 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" #endif /* ATTRIBUTE */ # 54 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" #define MPL_STATIC_INLINE_PREFIX ATTRIBUTE((always_inline)) static inline #define MPL_STATIC_INLINE_SUFFIX ATTRIBUTE((always_inline)) /* These likely/unlikely macros provide static branch prediction hints to the * compiler, if such hints are available. Simply wrap the relevant expression in * the macro, like this: * * if (unlikely(ptr == NULL)) { * // ... some unlikely code path ... * } * * They should be used sparingly, especially in upper-level code. It's easy to * incorrectly estimate branching likelihood, while the compiler can often do a * decent job if left to its own devices. * * These macros are not namespaced because the namespacing is cumbersome. */ #ifdef MPL_HAVE_BUILTIN_EXPECT # define unlikely(x_) __builtin_expect(!!(x_),0) # define likely(x_) __builtin_expect(!!(x_),1) #else # 76 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" # define unlikely(x_) (x_) # define likely(x_) (x_) #endif # 79 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" #define MPL_QUOTE(A) MPL_QUOTE2(A) #define MPL_QUOTE2(A) #A #define MPL_MAX(a,b) (((a) > (b)) ? (a) : (b)) #define MPL_MIN(a,b) (((a) < (b)) ? (a) : (b)) /* Use this macro for each parameter to a function that is not referenced in the body of the function */ #ifdef MPL_HAVE_WINDOWS_H #define MPL_UNREFERENCED_ARG(a) a #else # 91 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" #define MPL_UNREFERENCED_ARG(a) #endif # 93 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" /* macro for finding the enclosing structure of an element */ #define MPL_container_of(ptr, type, member) (type *)((char *)(ptr) - offsetof(type,member)) /* This macro is used to silence warnings from the Mac OS X linker when * an object file "has no symbols". The unused attribute prevents a * warning about the unused dummy variable while the used attribute * prevents the compiler from discarding the symbol altogether. This * macro should be used at the top of any file that might not define any * other variables or functions (perhaps due to conditional compilation * via the preprocessor). A semicolon is expected after each invocation * of this macro. */ #define MPL_SUPPRESS_OSX_HAS_NO_SYMBOLS_WARNING \ static int MPL_UNIQUE_SYMBOL_NAME(dummy) ATTRIBUTE((unused,used)) = 0 /* we jump through a couple of extra macro hoops to append the line * number to the variable name in order to reduce the chance of a name * collision with headers that might be included in the translation * unit */ #define MPL_UNIQUE_SYMBOL_NAME(prefix_) MPL_UNIQUE_IMPL1_(prefix_##_unique_L,__LINE__) #define MPL_UNIQUE_IMPL1_(prefix_,line_) MPL_UNIQUE_IMPL2_(prefix_,line_) #define MPL_UNIQUE_IMPL2_(prefix_,line_) MPL_UNIQUE_IMPL3_(prefix_,line_) #define MPL_UNIQUE_IMPL3_(prefix_,line_) prefix_##line_ typedef int MPL_bool; #endif /* !defined(MPL_BASE_H_INCLUDED) */ # 120 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_base.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" 2 /* must come before mpltrmem.h */ #if 0 /* expanded by -frewrite-includes */ #include "mpl_valgrind.h" #endif /* expanded by -frewrite-includes */ # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2010 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ /* IMPORTANT!!!: you must define MPL_VG_ENABLED before including mpl.h if you want the the actual valgrind macros to be expanded when an MPL_VG_ macro is used */ /* this file should not be included directly, it expects to be included from * mpl.h with the results of various configure tests and several system * libraries already included */ #if !defined(MPL_H_INCLUDED) #error do not include mpl_valgrind.h directly, use mpl.h instead #endif # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" /* valgrind interaction macros and header include logic These macros are intended to simplify client request interactions with valgrind. A client source file that needs valgrind client requests if they are available can include this file instead and use MPL_VG_ macros without worrying about whether or not valgrind is actually present, which headers to include, and how to include them. For more complicated logic this header will also define/undefine the preprocessor token "MPL_VG_AVAILABLE". */ #if !defined(MPL_VALGRIND_H_INCLUDED) #define MPL_VALGRIND_H_INCLUDED #undef MPL_VG_AVAILABLE #if !defined(HAVE_BROKEN_VALGRIND) && defined(MPL_VG_ENABLED) # if !defined(NVALGRIND) # if defined(MPL_HAVE_VALGRIND_H) && defined(MPL_HAVE_MEMCHECK_H) #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 38 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # 39 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 39 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # 40 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # define MPL_VG_AVAILABLE 1 # elif defined(MPL_HAVE_VALGRIND_VALGRIND_H) && defined(MPL_HAVE_VALGRIND_MEMCHECK_H) # 42 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 42 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # 43 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 43 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # 44 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # define MPL_VG_AVAILABLE 1 # endif # 46 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # endif # 47 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" #endif # 48 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" /* Valgrind-based thread checking tools: * * There are three main tools right now, Helgrind and DRD come in the standard * Valgrind distribution, while ThreadSanitizer (tsan) requires a separate * download. All three tools are fairly similar, with a few variations. They * primarily check for data races by tracing the happens-before relation between * memory accesses and synchronization primitives. Helgrind also offers good * pthread API usage checking and lock-order checking, which usually makes it * the most useful tool of the group. Unfortunately, Helgrind has the most * limited support for client requests. * * All three tools are source-level compatible with the ANNOTATE_* set of macros * defined by tsan. However, they are not totally binary compatible, so a * particular tool must usually be selected at compile time. One exception to * this is that modern-ish DRDs will usually understand Helgrind requests (but * Helgrind won't understand DRD requests). * * To further complicate matters, Helgrind will issue warnings when a client * request is encountered that it does not implement. In particular, Helgrind * does not support ANNOTATE_BENIGN_RACE or * ANNOTATE_IGNORE_{READS,WRITES}_{BEGIN,END}, which makes it difficult to avoid * emitting warning/error messages w.r.t. some kinds of lockfree * synchronization. * * So for the moment, we only provide a minimal set of annotations that seems to * be both common between the tools and useful in MPICH. */ #define MPL_VG_THREAD_INVALID 0 #define MPL_VG_THREAD_HELGRIND 1 #define MPL_VG_THREAD_DRD 2 #define MPL_VG_THREAD_TSAN 3 /* TODO make this selectable by configure */ /* default to helgrind for now, since DRD understands helgrind annotations, but * not the other way around */ #define MPL_VG_THREAD_TOOL MPL_VG_THREAD_HELGRIND #if defined(MPL_VG_AVAILABLE) # if (MPL_VG_THREAD_TOOL == MPL_VG_THREAD_HELGRIND) # if defined(MPL_HAVE_HELGRIND_H) #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 92 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # 93 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # define MPL_VG_THREAD_TOOL_SUPPORTED_ 1 # elif defined(MPL_HAVE_VALGRIND_HELGRIND_H) # 95 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 95 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # 96 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # define MPL_VG_THREAD_TOOL_SUPPORTED_ 1 # endif # 98 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # elif (MPL_VG_THREAD_TOOL == MPL_VG_THREAD_DRD) # 99 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # if defined(MPL_HAVE_DRD_H) #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 100 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # 101 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # define MPL_VG_THREAD_TOOL_SUPPORTED_ 1 # elif defined(MPL_HAVE_VALGRIND_DRD_H) # 103 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 103 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # 104 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # define MPL_VG_THREAD_TOOL_SUPPORTED_ 1 # endif # 106 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # elif (MPL_VG_THREAD_TOOL == MPL_VG_THREAD_TSAN) # 107 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" /* support wouldn't be hard to add, but it does require additional build * system work */ # error 'ThreadSanitizer not currently supported' # else # 111 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # error 'unknown or unsupported tool' # endif # 113 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" #else # 114 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # undef MPL_VG_THREAD_TOOL_SUPPORTED_ /*defensive*/ #endif # 116 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" /* This is only a modest subset of all of the available client requests defined in the valgrind headers. As MPICH is modified to use more of them, this list should be expanded appropriately. */ #if defined(MPL_VG_AVAILABLE) # if defined(VALGRIND_MAKE_MEM_DEFINED) /* this valgrind is version 3.2.0 or later */ /* tt#1784: do not add extra parens around the VALGRIND_... macros, since * valgrind-3.6.0 incorrectly includes a ";" at the end of the macro */ # define MPL_VG_MAKE_MEM_DEFINED(addr_,len_) do { (void) VALGRIND_MAKE_MEM_DEFINED((addr_),(len_)); } while (0) # define MPL_VG_MAKE_MEM_NOACCESS(addr_,len_) do { (void) VALGRIND_MAKE_MEM_NOACCESS((addr_),(len_)); } while (0) # define MPL_VG_MAKE_MEM_UNDEFINED(addr_,len_) do { (void) VALGRIND_MAKE_MEM_UNDEFINED((addr_),(len_)); } while (0) # define MPL_VG_CHECK_MEM_IS_DEFINED(addr_,len_) do { (void) VALGRIND_CHECK_MEM_IS_DEFINED((addr_),(len_)); } while (0) # define MPL_VG_CHECK_MEM_IS_ADDRESSABLE(addr_,len_) do { (void) VALGRIND_CHECK_MEM_IS_ADDRESSABLE((addr_),(len_)); } while (0) # else # 131 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" /* this is an older version of valgrind. Use the older (subtly misleading) names */ # define MPL_VG_MAKE_MEM_DEFINED(addr_,len_) VALGRIND_MAKE_READABLE((addr_),(len_)) # define MPL_VG_MAKE_MEM_NOACCESS(addr_,len_) VALGRIND_MAKE_NOACCESS((addr_),(len_)) # define MPL_VG_MAKE_MEM_UNDEFINED(addr_,len_) VALGRIND_MAKE_WRITABLE((addr_),(len_)) # define MPL_VG_CHECK_MEM_IS_DEFINED(addr_,len_) VALGRIND_CHECK_READABLE((addr_),(len_)) # define MPL_VG_CHECK_MEM_IS_ADDRESSABLE(addr_,len_) VALGRIND_CHECK_WRITABLE((addr_),(len_)) # endif # 138 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # define MPL_VG_CREATE_BLOCK(addr_,len_,desc_) do { (void) VALGRIND_CREATE_BLOCK((addr_),(len_),(desc_)); } while (0) # define MPL_VG_RUNNING_ON_VALGRIND() RUNNING_ON_VALGRIND # define MPL_VG_PRINTF_BACKTRACE VALGRIND_PRINTF_BACKTRACE /* Valgrind has a bug * (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=524488) that * causes it to report a warning when the compiler adds padding to * structures. Even when we initialize all the fields in the * structure, the padding bytes are not initialized. The idea here is * to detect when we are in "valgrind mode" and in such cases * initialize all bytes of the structure. */ # define MPL_VG_MEM_INIT(addr_,len_) do { memset(addr_, 0, len_); } while (0) /* custom allocator client requests, you probably shouldn't use these unless you * really know what you are doing */ # define MPL_VG_CREATE_MEMPOOL(pool, rzB, is_zeroed) VALGRIND_CREATE_MEMPOOL((pool), (rzB), (is_zeroed)) # define MPL_VG_DESTROY_MEMPOOL(pool) VALGRIND_DESTROY_MEMPOOL((pool)) # define MPL_VG_MEMPOOL_ALLOC(pool, addr, size) VALGRIND_MEMPOOL_ALLOC((pool), (addr), (size)) # define MPL_VG_MEMPOOL_FREE(pool, addr) VALGRIND_MEMPOOL_FREE((pool), (addr)) #else /* !defined(MPL_VG_AVAILABLE) */ # 158 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # define MPL_VG_MAKE_MEM_DEFINED(addr_,len_) do {} while (0) # define MPL_VG_MAKE_MEM_NOACCESS(addr_,len_) do {} while (0) # define MPL_VG_MAKE_MEM_UNDEFINED(addr_,len_) do {} while (0) # define MPL_VG_CHECK_MEM_IS_DEFINED(addr_,len_) do {} while (0) # define MPL_VG_CHECK_MEM_IS_ADDRESSABLE(addr_,len_) do {} while (0) # define MPL_VG_CREATE_BLOCK(addr_,len_,desc_) do {} while (0) # define MPL_VG_RUNNING_ON_VALGRIND() (0) /*always false */ # define MPL_VG_MEM_INIT(addr_,len_) do {} while (0) # if defined(MPL_HAVE_MACRO_VA_ARGS) # define MPL_VG_PRINTF_BACKTRACE(...) do {} while (0) # else # 169 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # define MPL_VG_PRINTF_BACKTRACE MPL_VG_printf_do_nothing_func static mpl_inline void MPL_VG_printf_do_nothing_func(char *fmt, ...) { /* do nothing */ } # endif /* defined(MPL_HAVE_MACRO_VA_ARGS) */ # 175 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # define MPL_VG_CREATE_MEMPOOL(pool, rzB, is_zeroed) do {} while (0) # define MPL_VG_DESTROY_MEMPOOL(pool) do {} while (0) # define MPL_VG_MEMPOOL_ALLOC(pool, addr, size) do {} while (0) # define MPL_VG_MEMPOOL_FREE(pool, addr) do {} while (0) #endif /* defined(MPL_VG_AVAILABLE) */ # 181 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" #if defined(MPL_VG_THREAD_TOOL_SUPPORTED_) /* could switch on tool type, but all three tools know about these annotations */ # define MPL_VG_ANNOTATE_HAPPENS_BEFORE(obj_) ANNOTATE_HAPPENS_BEFORE(obj_) # define MPL_VG_ANNOTATE_HAPPENS_AFTER(obj_) ANNOTATE_HAPPENS_AFTER(obj_) /* older versions of some of Helgrind & DRD don't support this annotation */ # if defined(ANNOTATE_NEW_MEMORY) # define MPL_VG_ANNOTATE_NEW_MEMORY(obj_,size_) ANNOTATE_NEW_MEMORY(obj_,size_) # else # 190 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # define MPL_VG_ANNOTATE_NEW_MEMORY(obj_,size_) do {} while (0) # endif # 192 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" #else # 193 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # define MPL_VG_ANNOTATE_HAPPENS_BEFORE(obj_) do {} while (0) # define MPL_VG_ANNOTATE_HAPPENS_AFTER(obj_) do {} while (0) # define MPL_VG_ANNOTATE_NEW_MEMORY(obj_,size_) do {} while (0) #endif # 197 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" #endif /* !defined(MPL_VALGRIND_H_INCLUDED) */ # 200 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_valgrind.h" # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpl_argstr.h" #endif /* expanded by -frewrite-includes */ # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_argstr.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPL_ARGSTR_H_INCLUDED #define MPL_ARGSTR_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mplconfig.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_argstr.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_argstr.h" /* Make sure that we have the definitions for the malloc routines and size_t */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_argstr.h" # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_argstr.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_argstr.h" # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_argstr.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_dbg.h" #endif /* expanded by -frewrite-includes */ # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_argstr.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_dbg.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2005 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPL_DBG_H_INCLUDED #define MPL_DBG_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mplconfig.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_dbg.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_dbg.h" /* * Multilevel debugging and tracing macros. * The design is discussed at * http://wiki.mpich.org/mpich/index.php/Debug_Event_Logging * * Basically, this provide a way to place debugging messages into * groups (called *classes*), with levels of detail, and arbitrary * messages. The messages can be turned on and off using environment * variables and/or command-line options. */ #ifdef MPL_USE_DBG_LOGGING #define MPL_DBG_SELECTED(_class, _level) \ ((_class & MPL_dbg_active_classes) && MPL_DBG_##_level <= MPL_dbg_max_level) #define MPL_DBG_MSG(_class, _level, _string) \ { \ if ((_class & MPL_dbg_active_classes) && MPL_DBG_##_level <= MPL_dbg_max_level) { \ MPL_dbg_outevent(__FILE__, __LINE__, _class, 0, "%s", _string); \ } \ } #define MPL_DBG_MSG_S(_class, _level, _fmat, _string) \ { \ if ((_class & MPL_dbg_active_classes) && MPL_DBG_##_level <= MPL_dbg_max_level) { \ MPL_dbg_outevent(__FILE__, __LINE__, _class, 1, _fmat, _string); \ } \ } #define MPL_DBG_MSG_D(_class, _level, _fmat, _int) \ { \ if ((_class & MPL_dbg_active_classes) && MPL_DBG_##_level <= MPL_dbg_max_level) { \ MPL_dbg_outevent(__FILE__, __LINE__, _class, 2, _fmat, _int); \ } \ } #define MPL_DBG_MSG_P(_class, _level, _fmat, _pointer) \ { \ if ((_class & MPL_dbg_active_classes) && MPL_DBG_##_level <= MPL_dbg_max_level) { \ MPL_dbg_outevent(__FILE__, __LINE__, _class, 3, _fmat, _pointer); \ } \ } #define MPL_DBG_MAXLINE 256 #define MPL_DBG_FDEST _s,(size_t)MPL_DBG_MAXLINE /*M MPL_DBG_MSG_FMT - General debugging output macro Notes: To use this macro, the third argument should be an "sprintf" - style argument, using MPL_DBG_FDEST as the buffer argument. For example, .vb MPL_DBG_MSG_FMT(CMM,VERBOSE,(MPL_DBG_FDEST,"fmat",args...)); .ve M*/ #define MPL_DBG_MSG_FMT(_class, _level, _fmatargs) \ { \ if ((_class & MPL_dbg_active_classes) && MPL_DBG_##_level <= MPL_dbg_max_level) { \ char _s[MPL_DBG_MAXLINE]; \ MPL_snprintf _fmatargs ; \ MPL_dbg_outevent(__FILE__, __LINE__, _class, 0, "%s", _s); \ } \ } #define MPL_DBG_STMT(_class, _level, _stmt) \ { \ if ((_class & MPL_dbg_active_classes) && MPL_DBG_##_level <= MPL_dbg_max_level) { \ _stmt; \ } \ } #define MPL_DBG_OUT(_class, _msg) \ MPL_dbg_outevent(__FILE__, __LINE__, _class, 0, "%s", _msg) #define MPL_DBG_OUT_FMT(_class,_fmatargs) \ { \ char _s[MPL_DBG_MAXLINE]; \ MPL_snprintf _fmatargs ; \ MPL_dbg_outevent(__FILE__, __LINE__, _class, 0, "%s", _s); \ } #else # 96 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_dbg.h" #define MPL_DBG_SELECTED(_class,_level) 0 #define MPL_DBG_MSG(_class,_level,_string) #define MPL_DBG_MSG_S(_class,_level,_fmat,_string) #define MPL_DBG_MSG_D(_class,_level,_fmat,_int) #define MPL_DBG_MSG_P(_class,_level,_fmat,_int) #define MPL_DBG_MSG_FMT(_class,_level,_fmatargs) #define MPL_DBG_STMT(_class,_level,_stmt) #define MPL_DBG_OUT(_class,_msg) #define MPL_DBG_OUT_FMT(_class,_fmtargs) #endif # 106 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_dbg.h" #define MPL_DBG_SUCCESS 0 #define MPL_DBG_ERR_INTERN 1 #define MPL_DBG_ERR_OTHER 2 typedef unsigned int MPL_dbg_class; /* Special constants */ enum MPL_DBG_LEVEL { MPL_DBG_TERSE = 0, MPL_DBG_TYPICAL = 50, MPL_DBG_VERBOSE = 99 }; extern int MPL_dbg_active_classes; extern int MPL_dbg_max_level; extern MPL_dbg_class MPL_DBG_ROUTINE_ENTER; extern MPL_dbg_class MPL_DBG_ROUTINE_EXIT; extern MPL_dbg_class MPL_DBG_ROUTINE; extern MPL_dbg_class MPL_DBG_ALL; MPL_dbg_class MPL_dbg_class_alloc(const char *ucname, const char *lcname); void MPL_dbg_class_register(MPL_dbg_class cls, const char *ucname, const char *lcname); #define MPL_DBG_CLASS_CLR(cls) \ do { \ (cls) = 0; \ } while (0) #define MPL_DBG_CLASS_APPEND(out_class, in_class) \ do { \ (out_class) |= (in_class); \ } while (0) /* *INDENT-OFF* */ int MPL_dbg_outevent(const char *, int, int, int, const char *, ...) ATTRIBUTE((format(printf, 5, 6))); /* *INDENT-ON* */ int MPL_dbg_init(int *, char ***, int, int, int, int, int); int MPL_dbg_pre_init(int *, char ***, int); #endif # 149 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_dbg.h" # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_argstr.h" 2 #if defined (MPL_USE_DBG_LOGGING) extern MPL_dbg_class MPIR_DBG_STRING; #endif /* MPL_USE_DBG_LOGGING */ # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_argstr.h" #define MPL_STR_SUCCESS 0 #define MPL_STR_FAIL 1 #define MPL_STR_NOMEM 2 #define MPL_STR_TRUNCATED 3 #define MPL_STR_QUOTE_CHAR '\"' #define MPL_STR_QUOTE_STR "\"" #define MPL_STR_DELIM_CHAR '#' #define MPL_STR_DELIM_STR "#" #define MPL_STR_ESCAPE_CHAR '\\' #define MPL_STR_HIDE_CHAR '*' #define MPL_STR_SEPAR_CHAR '$' #define MPL_STR_SEPAR_STR "$" int MPL_str_get_string_arg(const char *str, const char *key, char *val, int maxlen); int MPL_str_get_binary_arg(const char *str, const char *key, char *buffer, int maxlen, int *out_length); int MPL_str_get_int_arg(const char *str, const char *key, int *val_ptr); int MPL_str_add_string_arg(char **str_ptr, int *maxlen_ptr, const char *key, const char *val); int MPL_str_add_binary_arg(char **str_ptr, int *maxlen_ptr, const char *key, const char *buffer, int length); int MPL_str_add_int_arg(char **str_ptr, int *maxlen_ptr, const char *key, int val); int MPL_str_add_string(char **str_ptr, int *maxlen_ptr, const char *val); int MPL_str_get_string(char **str_ptr, char *val, int maxlen); #endif # 50 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_argstr.h" # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpl_str.h" #endif /* expanded by -frewrite-includes */ # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_str.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPL_STR_H_INCLUDED) #define MPL_STR_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mplconfig.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_str.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_str.h" /* *INDENT-ON* */ #if defined(__cplusplus) extern "C" { #endif # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_str.h" /* *INDENT-OFF* */ #if defined MPL_NEEDS_SNPRINTF_DECL extern int snprintf(char *, size_t, const char *, ...) ATTRIBUTE((format(printf,3,4))); #endif # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_str.h" #if defined MPL_HAVE_SNPRINTF #define MPL_snprintf snprintf #else # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_str.h" int MPL_snprintf(char *, size_t, const char *, ...) ATTRIBUTE((format(printf,3,4))); #endif /* MPL_HAVE_SNPRINTF */ # 27 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_str.h" int MPL_strncpy(char *dest, const char *src, size_t n); char *MPL_strsep(char **stringp, const char *delim); #if defined MPL_NEEDS_STRNCMP_DECL extern int strncmp(const char *s1, const char *s2, size_t n); #endif # 34 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_str.h" #if defined MPL_HAVE_STRNCMP #define MPL_strncmp strncmp #else # 38 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_str.h" #error "strncmp is required" #endif /* MPL_HAVE_STRNCMP */ # 40 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_str.h" #if defined MPL_NEEDS_STRERROR_DECL extern char *strerror(int errnum); #endif # 44 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_str.h" #if defined MPL_HAVE_STRERROR #define MPL_strerror strerror #else # 47 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_str.h" char *MPL_strerror(int errnum); #endif /* MPL_HAVE_STRERROR */ # 49 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_str.h" int MPL_strnapp(char *dest, const char *src, size_t n); /* *INDENT-ON* */ #if defined(__cplusplus) } #endif # 56 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_str.h" /* *INDENT-OFF* */ #endif /* !defined(MPL_STR_H_INCLUDED) */ # 59 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_str.h" # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpl_trmem.h" #endif /* expanded by -frewrite-includes */ # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_trmem.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPL_TRMEM_H_INCLUDED) #define MPL_TRMEM_H_INCLUDED #if defined MPL_NEEDS_STRDUP_DECL && !defined strdup extern char *strdup(const char *); #endif /* MPL_NEEDS_STRDUP_DECL */ # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_trmem.h" #if defined(MPL_USE_MEMORY_TRACING) #define MPL_strdup(a) MPL_trstrdup(a,__LINE__,__FILE__) #elif defined(MPL_HAVE_STRDUP) # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_trmem.h" #define MPL_strdup strdup #else # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_trmem.h" char *MPL_strdup(const char *str); #endif /* defined(MPL_USE_MEMORY_TRACING) || defined(MPL_HAVE_STRDUP) */ # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_trmem.h" #ifdef MPL_USE_MEMORY_TRACING /*M MPL_malloc - Allocate memory Synopsis: .vb void *MPL_malloc( size_t len ) .ve Input Parameter: . len - Length of memory to allocate in bytes Return Value: Pointer to allocated memory, or null if memory could not be allocated. Notes: This routine will often be implemented as the simple macro .vb #define MPL_malloc(n) malloc(n) .ve However, it can also be defined as .vb #define MPL_malloc(n) MPL_trmalloc(n,__LINE__,__FILE__) .ve where 'MPL_trmalloc' is a tracing version of 'malloc' that is included with MPICH. Module: Utility M*/ #define MPL_malloc(a) MPL_trmalloc((a),__LINE__,__FILE__) /*M MPL_calloc - Allocate memory that is initialized to zero. Synopsis: .vb void *MPL_calloc( size_t nelm, size_t elsize ) .ve Input Parameters: + nelm - Number of elements to allocate - elsize - Size of each element. Notes: Like 'MPL_malloc' and 'MPL_free', this will often be implemented as a macro but may use 'MPL_trcalloc' to provide a tracing version. Module: Utility M*/ #define MPL_calloc(a,b) MPL_trcalloc((a),(b),__LINE__,__FILE__) /*M MPL_free - Free memory Synopsis: .vb void MPL_free( void *ptr ) .ve Input Parameter: . ptr - Pointer to memory to be freed. This memory must have been allocated with 'MPL_malloc'. Notes: This routine will often be implemented as the simple macro .vb #define MPL_free(n) free(n) .ve However, it can also be defined as .vb #define MPL_free(n) MPL_trfree(n,__LINE__,__FILE__) .ve where 'MPL_trfree' is a tracing version of 'free' that is included with MPICH. Module: Utility M*/ #define MPL_free(a) MPL_trfree(a,__LINE__,__FILE__) #define MPL_realloc(a,b) MPL_trrealloc((a),(b),__LINE__,__FILE__) #else /* MPL_USE_MEMORY_TRACING */ # 107 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_trmem.h" /* No memory tracing; just use native functions */ #define MPL_malloc(a) malloc((size_t)(a)) #define MPL_calloc(a,b) calloc((size_t)(a),(size_t)(b)) #define MPL_free(a) free((void *)(a)) #define MPL_realloc(a,b) realloc((void *)(a),(size_t)(b)) #endif /* MPL_USE_MEMORY_TRACING */ # 114 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_trmem.h" /* FIXME: Consider an option of specifying __attribute__((malloc)) for gcc - this lets gcc-style compilers know that the returned pointer does not alias any pointer prior to the call. */ void MPL_trinit(int, int); void *MPL_trmalloc(size_t, int, const char[]); void MPL_trfree(void *, int, const char[]); int MPL_trvalid(const char[]); int MPL_trvalid2(const char[],int,const char[]); void *MPL_trcalloc(size_t, size_t, int, const char[]); void *MPL_trrealloc(void *, size_t, int, const char[]); void *MPL_trstrdup(const char *, int, const char[]); /* Make sure that FILE is defined */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 130 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_trmem.h" # 131 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_trmem.h" void MPL_trdump(FILE *, int); #endif /* !defined(MPL_TRMEM_H_INCLUDED) */ # 134 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_trmem.h" # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpl_env.h" #endif /* expanded by -frewrite-includes */ # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_env.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPL_ENV_H_INCLUDED) #define MPL_ENV_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mplconfig.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_env.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_env.h" /* *INDENT-ON* */ #if defined(__cplusplus) extern "C" { #endif # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_env.h" /* *INDENT-OFF* */ #if defined(MPL_HAVE_PUTENV) && defined(MPL_NEEDS_PUTENV_DECL) extern int putenv(char *string); #endif # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_env.h" /* Prototypes for the functions to provide uniform access to the environment */ int MPL_env2int(const char *envName, int *val); int MPL_env2range(const char *envName, int *lowPtr, int *highPtr); int MPL_env2bool(const char *envName, int *val); int MPL_env2str(const char *envName, const char **val); int MPL_env2double(const char *envName, double *val); int MPL_putenv(char *name_val); /* *INDENT-ON* */ #if defined(__cplusplus) } #endif # 34 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_env.h" /* *INDENT-OFF* */ #endif /* !defined(MPL_ENV_H_INCLUDED) */ # 37 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_env.h" # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpl_sock.h" #endif /* expanded by -frewrite-includes */ # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPL_SOCK_H_INCLUDED) #define MPL_SOCK_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mplconfig.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 1 3 /* Declarations of socket constants, types, and functions. Copyright (C) 1991,92,1994-2001,2003,2005,2007,2008,2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_SOCKET_H #define _SYS_SOCKET_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 23 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 3 # 24 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 3 __BEGIN_DECLS #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/uio.h" 1 3 /* Copyright (C) 1991,1992,1996-1999,2003,2009,2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_UIO_H #define _SYS_UIO_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/uio.h" 3 # 23 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/uio.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 24 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/uio.h" 3 # 25 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/uio.h" 3 __BEGIN_DECLS /* This file defines `struct iovec'. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 29 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/uio.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/uio.h" 1 3 /* Copyright (C) 1996, 1997, 2006, 2011, 2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if !defined _SYS_UIO_H && !defined _FCNTL_H # error "Never include directly; use instead." #endif # 21 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/uio.h" 3 #ifndef _BITS_UIO_H #define _BITS_UIO_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 25 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/uio.h" 3 # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/uio.h" 3 /* We should normally use the Linux kernel header file to define this type and macros but this calls for trouble because of the header includes other kernel headers. */ /* Size of object which can be written atomically. This macro has different values in different kernel versions. The latest versions of the kernel use 1024 and this is good choice. Since the C library implementation of readv/writev is able to emulate the functionality even if the currently running kernel does not support this large value the readv/writev call will not fail because of this. */ #define UIO_MAXIOV 1024 /* Structure for scatter/gather I/O. */ struct iovec { void *iov_base; /* Pointer to data. */ size_t iov_len; /* Length of data. */ }; #endif # 50 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/uio.h" 3 #ifdef __USE_GNU # if defined _SYS_UIO_H && !defined _BITS_UIO_H_FOR_SYS_UIO_H # define _BITS_UIO_H_FOR_SYS_UIO_H 1 __BEGIN_DECLS /* Read from another process' address space. */ extern ssize_t process_vm_readv (pid_t __pid, const struct iovec *__lvec, unsigned long int __liovcnt, const struct iovec *__rvec, unsigned long int __riovcnt, unsigned long int __flags) __THROW; /* Write to another process' address space. */ extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec, unsigned long int __liovcnt, const struct iovec *__rvec, unsigned long int __riovcnt, unsigned long int __flags) __THROW; __END_DECLS # endif # 77 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/uio.h" 3 #endif # 78 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/uio.h" 3 # 30 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/uio.h" 2 3 /* Read data from file descriptor FD, and put the result in the buffers described by IOVEC, which is a vector of COUNT 'struct iovec's. The buffers are filled in the order specified. Operates just like 'read' (see ) except that data are put in IOVEC instead of a contiguous buffer. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t readv (int __fd, const struct iovec *__iovec, int __count) __wur; /* Write data pointed by the buffers described by IOVEC, which is a vector of COUNT 'struct iovec's, to file descriptor FD. The data is written in the order specified. Operates just like 'write' (see ) except that the data are taken from IOVEC instead of a contiguous buffer. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t writev (int __fd, const struct iovec *__iovec, int __count) __wur; #ifdef __USE_BSD # ifndef __USE_FILE_OFFSET64 /* Read data from file descriptor FD at the given position OFFSET without change the file pointer, and put the result in the buffers described by IOVEC, which is a vector of COUNT 'struct iovec's. The buffers are filled in the order specified. Operates just like 'pread' (see ) except that data are put in IOVEC instead of a contiguous buffer. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t preadv (int __fd, const struct iovec *__iovec, int __count, __off_t __offset) __wur; /* Write data pointed by the buffers described by IOVEC, which is a vector of COUNT 'struct iovec's, to file descriptor FD at the given position OFFSET without change the file pointer. The data is written in the order specified. Operates just like 'pwrite' (see ) except that the data are taken from IOVEC instead of a contiguous buffer. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t pwritev (int __fd, const struct iovec *__iovec, int __count, __off_t __offset) __wur; # else # 81 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/uio.h" 3 # ifdef __REDIRECT extern ssize_t __REDIRECT (preadv, (int __fd, const struct iovec *__iovec, int __count, __off64_t __offset), preadv64) __wur; extern ssize_t __REDIRECT (pwritev, (int __fd, const struct iovec *__iovec, int __count, __off64_t __offset), pwritev64) __wur; # else # 89 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/uio.h" 3 # define preadv preadv64 # define pwritev pwritev64 # endif # 92 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/uio.h" 3 # endif # 93 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/uio.h" 3 # ifdef __USE_LARGEFILE64 /* Read data from file descriptor FD at the given position OFFSET without change the file pointer, and put the result in the buffers described by IOVEC, which is a vector of COUNT 'struct iovec's. The buffers are filled in the order specified. Operates just like 'pread' (see ) except that data are put in IOVEC instead of a contiguous buffer. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t preadv64 (int __fd, const struct iovec *__iovec, int __count, __off64_t __offset) __wur; /* Write data pointed by the buffers described by IOVEC, which is a vector of COUNT 'struct iovec's, to file descriptor FD at the given position OFFSET without change the file pointer. The data is written in the order specified. Operates just like 'pwrite' (see ) except that the data are taken from IOVEC instead of a contiguous buffer. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t pwritev64 (int __fd, const struct iovec *__iovec, int __count, __off64_t __offset) __wur; # endif # 119 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/uio.h" 3 #endif /* Use BSD */ # 120 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/uio.h" 3 __END_DECLS #endif /* sys/uio.h */ # 124 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/uio.h" 3 # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 2 3 #define __need_size_t #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 29 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 3 # 1 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 1 3 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) /* Always define miscellaneous pieces when modules are available. */ #if !__has_feature(modules) #define __STDDEF_H #endif # 37 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 44 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_ptrdiff_t) #if !defined(_PTRDIFF_T) || __has_feature(modules) /* Always define ptrdiff_t when modules are available. */ #if !__has_feature(modules) #define _PTRDIFF_T #endif # 51 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 53 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 55 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_size_t) #if !defined(_SIZE_T) || __has_feature(modules) /* Always define size_t when modules are available. */ #if !__has_feature(modules) #define _SIZE_T #endif # 62 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ size_t; #endif # 64 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_size_t #endif /*defined(__need_size_t) */ # 66 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) /* Always define rsize_t when modules are available. */ #if !__has_feature(modules) #define _RSIZE_T #endif # 76 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ rsize_t; #endif # 78 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif /* defined(__need_STDDEF_H_misc) */ # 79 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_wchar_t) #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if !defined(_WCHAR_T) || __has_feature(modules) #if !__has_feature(modules) #define _WCHAR_T #if defined(_MSC_EXTENSIONS) #define _WCHAR_T_DEFINED #endif # 89 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 90 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WCHAR_TYPE__ wchar_t; #endif # 92 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 93 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 95 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_NULL) #undef NULL #ifdef __cplusplus # if !defined(__MINGW32__) && !defined(_MSC_VER) # define NULL __null # else # 102 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL 0 # endif # 104 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #else # 105 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL ((void*)0) #endif # 107 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #ifdef __cplusplus #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 112 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 113 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_NULL #endif /* defined(__need_NULL) */ # 115 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 118 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 119 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 120 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 123 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if defined(__need_wint_t) /* Always define wint_t when modules are available. */ #if !defined(_WINT_T) || __has_feature(modules) #if !__has_feature(modules) #define _WINT_T #endif # 132 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WINT_TYPE__ wint_t; #endif # 134 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wint_t #endif /* __need_wint_t */ # 136 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 138 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 30 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 2 3 #ifdef __USE_GNU /* Get the __sigset_t definition. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 32 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 3 # 33 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 3 #endif # 34 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 3 /* This operating system-specific header file defines the SOCK_*, PF_*, AF_*, MSG_*, SOL_*, and SO_* constants, and the `struct sockaddr', `struct msghdr', and `struct linger' types. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 1 3 /* System-specific socket constants and types. Linux version. Copyright (C) 1991, 1992, 1994-2001, 2004, 2006-2010, 2011, 2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef __BITS_SOCKET_H #define __BITS_SOCKET_H #ifndef _SYS_SOCKET_H # error "Never include directly; use instead." #endif # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 #define __need_size_t #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 # 1 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 1 3 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) /* Always define miscellaneous pieces when modules are available. */ #if !__has_feature(modules) #define __STDDEF_H #endif # 37 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 44 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_ptrdiff_t) #if !defined(_PTRDIFF_T) || __has_feature(modules) /* Always define ptrdiff_t when modules are available. */ #if !__has_feature(modules) #define _PTRDIFF_T #endif # 51 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 53 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 55 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_size_t) #if !defined(_SIZE_T) || __has_feature(modules) /* Always define size_t when modules are available. */ #if !__has_feature(modules) #define _SIZE_T #endif # 62 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ size_t; #endif # 64 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_size_t #endif /*defined(__need_size_t) */ # 66 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) /* Always define rsize_t when modules are available. */ #if !__has_feature(modules) #define _RSIZE_T #endif # 76 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ rsize_t; #endif # 78 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif /* defined(__need_STDDEF_H_misc) */ # 79 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_wchar_t) #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if !defined(_WCHAR_T) || __has_feature(modules) #if !__has_feature(modules) #define _WCHAR_T #if defined(_MSC_EXTENSIONS) #define _WCHAR_T_DEFINED #endif # 89 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 90 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WCHAR_TYPE__ wchar_t; #endif # 92 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 93 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 95 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_NULL) #undef NULL #ifdef __cplusplus # if !defined(__MINGW32__) && !defined(_MSC_VER) # define NULL __null # else # 102 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL 0 # endif # 104 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #else # 105 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL ((void*)0) #endif # 107 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #ifdef __cplusplus #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 112 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 113 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_NULL #endif /* defined(__need_NULL) */ # 115 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 118 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 119 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 120 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 123 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if defined(__need_wint_t) /* Always define wint_t when modules are available. */ #if !defined(_WINT_T) || __has_feature(modules) #if !__has_feature(modules) #define _WINT_T #endif # 132 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WINT_TYPE__ wint_t; #endif # 134 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wint_t #endif /* __need_wint_t */ # 136 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 138 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 29 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 30 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 # 31 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 /* Type for length arguments in socket calls. */ #ifndef __socklen_t_defined typedef __socklen_t socklen_t; # define __socklen_t_defined #endif # 37 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 /* Get the architecture-dependent definition of enum __socket_type. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket_type.h" 1 3 /* Define enum __socket_type for generic Linux. Copyright (C) 1991-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_SOCKET_H # error "Never include directly; use instead." #endif # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket_type.h" 3 /* Types of sockets. */ enum __socket_type { SOCK_STREAM = 1, /* Sequenced, reliable, connection-based byte streams. */ #define SOCK_STREAM SOCK_STREAM SOCK_DGRAM = 2, /* Connectionless, unreliable datagrams of fixed maximum length. */ #define SOCK_DGRAM SOCK_DGRAM SOCK_RAW = 3, /* Raw protocol interface. */ #define SOCK_RAW SOCK_RAW SOCK_RDM = 4, /* Reliably-delivered messages. */ #define SOCK_RDM SOCK_RDM SOCK_SEQPACKET = 5, /* Sequenced, reliable, connection-based, datagrams of fixed maximum length. */ #define SOCK_SEQPACKET SOCK_SEQPACKET SOCK_DCCP = 6, /* Datagram Congestion Control Protocol. */ #define SOCK_DCCP SOCK_DCCP SOCK_PACKET = 10, /* Linux specific way of getting packets at the dev level. For writing rarp and other similar things on the user level. */ #define SOCK_PACKET SOCK_PACKET /* Flags to be ORed into the type parameter of socket and socketpair and used for the flags parameter of paccept. */ SOCK_CLOEXEC = 02000000, /* Atomically set close-on-exec flag for the new descriptor(s). */ #define SOCK_CLOEXEC SOCK_CLOEXEC SOCK_NONBLOCK = 00004000 /* Atomically mark descriptor(s) as non-blocking. */ #define SOCK_NONBLOCK SOCK_NONBLOCK }; # 40 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 2 3 /* Protocol families. */ #define PF_UNSPEC 0 /* Unspecified. */ #define PF_LOCAL 1 /* Local to host (pipes and file-domain). */ #define PF_UNIX PF_LOCAL /* POSIX name for PF_LOCAL. */ #define PF_FILE PF_LOCAL /* Another non-standard name for PF_LOCAL. */ #define PF_INET 2 /* IP protocol family. */ #define PF_AX25 3 /* Amateur Radio AX.25. */ #define PF_IPX 4 /* Novell Internet Protocol. */ #define PF_APPLETALK 5 /* Appletalk DDP. */ #define PF_NETROM 6 /* Amateur radio NetROM. */ #define PF_BRIDGE 7 /* Multiprotocol bridge. */ #define PF_ATMPVC 8 /* ATM PVCs. */ #define PF_X25 9 /* Reserved for X.25 project. */ #define PF_INET6 10 /* IP version 6. */ #define PF_ROSE 11 /* Amateur Radio X.25 PLP. */ #define PF_DECnet 12 /* Reserved for DECnet project. */ #define PF_NETBEUI 13 /* Reserved for 802.2LLC project. */ #define PF_SECURITY 14 /* Security callback pseudo AF. */ #define PF_KEY 15 /* PF_KEY key management API. */ #define PF_NETLINK 16 #define PF_ROUTE PF_NETLINK /* Alias to emulate 4.4BSD. */ #define PF_PACKET 17 /* Packet family. */ #define PF_ASH 18 /* Ash. */ #define PF_ECONET 19 /* Acorn Econet. */ #define PF_ATMSVC 20 /* ATM SVCs. */ #define PF_RDS 21 /* RDS sockets. */ #define PF_SNA 22 /* Linux SNA Project */ #define PF_IRDA 23 /* IRDA sockets. */ #define PF_PPPOX 24 /* PPPoX sockets. */ #define PF_WANPIPE 25 /* Wanpipe API sockets. */ #define PF_LLC 26 /* Linux LLC. */ #define PF_CAN 29 /* Controller Area Network. */ #define PF_TIPC 30 /* TIPC sockets. */ #define PF_BLUETOOTH 31 /* Bluetooth sockets. */ #define PF_IUCV 32 /* IUCV sockets. */ #define PF_RXRPC 33 /* RxRPC sockets. */ #define PF_ISDN 34 /* mISDN sockets. */ #define PF_PHONET 35 /* Phonet sockets. */ #define PF_IEEE802154 36 /* IEEE 802.15.4 sockets. */ #define PF_CAIF 37 /* CAIF sockets. */ #define PF_ALG 38 /* Algorithm sockets. */ #define PF_NFC 39 /* NFC sockets. */ #define PF_MAX 40 /* For now.. */ /* Address families. */ #define AF_UNSPEC PF_UNSPEC #define AF_LOCAL PF_LOCAL #define AF_UNIX PF_UNIX #define AF_FILE PF_FILE #define AF_INET PF_INET #define AF_AX25 PF_AX25 #define AF_IPX PF_IPX #define AF_APPLETALK PF_APPLETALK #define AF_NETROM PF_NETROM #define AF_BRIDGE PF_BRIDGE #define AF_ATMPVC PF_ATMPVC #define AF_X25 PF_X25 #define AF_INET6 PF_INET6 #define AF_ROSE PF_ROSE #define AF_DECnet PF_DECnet #define AF_NETBEUI PF_NETBEUI #define AF_SECURITY PF_SECURITY #define AF_KEY PF_KEY #define AF_NETLINK PF_NETLINK #define AF_ROUTE PF_ROUTE #define AF_PACKET PF_PACKET #define AF_ASH PF_ASH #define AF_ECONET PF_ECONET #define AF_ATMSVC PF_ATMSVC #define AF_RDS PF_RDS #define AF_SNA PF_SNA #define AF_IRDA PF_IRDA #define AF_PPPOX PF_PPPOX #define AF_WANPIPE PF_WANPIPE #define AF_LLC PF_LLC #define AF_CAN PF_CAN #define AF_TIPC PF_TIPC #define AF_BLUETOOTH PF_BLUETOOTH #define AF_IUCV PF_IUCV #define AF_RXRPC PF_RXRPC #define AF_ISDN PF_ISDN #define AF_PHONET PF_PHONET #define AF_IEEE802154 PF_IEEE802154 #define AF_CAIF PF_CAIF #define AF_ALG PF_ALG #define AF_NFC PF_NFC #define AF_MAX PF_MAX /* Socket level values. Others are defined in the appropriate headers. XXX These definitions also should go into the appropriate headers as far as they are available. */ #define SOL_RAW 255 #define SOL_DECNET 261 #define SOL_X25 262 #define SOL_PACKET 263 #define SOL_ATM 264 /* ATM layer (cell level). */ #define SOL_AAL 265 /* ATM Adaption Layer (packet level). */ #define SOL_IRDA 266 /* Maximum queue length specifiable by listen. */ #define SOMAXCONN 128 /* Get the definition of the macro to define the common sockaddr members. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 145 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sockaddr.h" 1 3 /* Definition of `struct sockaddr_*' common members. Generic/4.2 BSD version. Copyright (C) 1995,1996,1997,1998,2000,2001 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ #ifndef _BITS_SOCKADDR_H #define _BITS_SOCKADDR_H 1 /* POSIX.1g specifies this type name for the `sa_family' member. */ typedef unsigned short int sa_family_t; /* This macro is used to declare the initial common members of the data types used for socket addresses, `struct sockaddr', `struct sockaddr_in', `struct sockaddr_un', etc. */ #define __SOCKADDR_COMMON(sa_prefix) \ sa_family_t sa_prefix##family #define __SOCKADDR_COMMON_SIZE (sizeof (unsigned short int)) #endif /* bits/sockaddr.h */ # 40 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sockaddr.h" 3 # 146 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 2 3 /* Structure describing a generic socket address. */ struct sockaddr { __SOCKADDR_COMMON (sa_); /* Common data: address family and length. */ char sa_data[14]; /* Address data. */ }; /* Structure large enough to hold any socket address (with the historical exception of AF_UNIX). We reserve 128 bytes. */ #define __ss_aligntype unsigned long int #define _SS_SIZE 128 #define _SS_PADSIZE (_SS_SIZE - (2 * sizeof (__ss_aligntype))) struct sockaddr_storage { __SOCKADDR_COMMON (ss_); /* Address family, etc. */ __ss_aligntype __ss_align; /* Force desired alignment. */ char __ss_padding[_SS_PADSIZE]; }; /* Bits in the FLAGS argument to `send', `recv', et al. */ enum { MSG_OOB = 0x01, /* Process out-of-band data. */ #define MSG_OOB MSG_OOB MSG_PEEK = 0x02, /* Peek at incoming messages. */ #define MSG_PEEK MSG_PEEK MSG_DONTROUTE = 0x04, /* Don't use local routing. */ #define MSG_DONTROUTE MSG_DONTROUTE #ifdef __USE_GNU /* DECnet uses a different name. */ MSG_TRYHARD = MSG_DONTROUTE, # define MSG_TRYHARD MSG_DONTROUTE #endif # 183 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 MSG_CTRUNC = 0x08, /* Control data lost before delivery. */ #define MSG_CTRUNC MSG_CTRUNC MSG_PROXY = 0x10, /* Supply or ask second address. */ #define MSG_PROXY MSG_PROXY MSG_TRUNC = 0x20, #define MSG_TRUNC MSG_TRUNC MSG_DONTWAIT = 0x40, /* Nonblocking IO. */ #define MSG_DONTWAIT MSG_DONTWAIT MSG_EOR = 0x80, /* End of record. */ #define MSG_EOR MSG_EOR MSG_WAITALL = 0x100, /* Wait for a full request. */ #define MSG_WAITALL MSG_WAITALL MSG_FIN = 0x200, #define MSG_FIN MSG_FIN MSG_SYN = 0x400, #define MSG_SYN MSG_SYN MSG_CONFIRM = 0x800, /* Confirm path validity. */ #define MSG_CONFIRM MSG_CONFIRM MSG_RST = 0x1000, #define MSG_RST MSG_RST MSG_ERRQUEUE = 0x2000, /* Fetch message from error queue. */ #define MSG_ERRQUEUE MSG_ERRQUEUE MSG_NOSIGNAL = 0x4000, /* Do not generate SIGPIPE. */ #define MSG_NOSIGNAL MSG_NOSIGNAL MSG_MORE = 0x8000, /* Sender will send more. */ #define MSG_MORE MSG_MORE MSG_WAITFORONE = 0x10000, /* Wait for at least one packet to return.*/ #define MSG_WAITFORONE MSG_WAITFORONE MSG_CMSG_CLOEXEC = 0x40000000 /* Set close_on_exit for file descriptor received through SCM_RIGHTS. */ #define MSG_CMSG_CLOEXEC MSG_CMSG_CLOEXEC }; /* Structure describing messages sent by `sendmsg' and received by `recvmsg'. */ struct msghdr { void *msg_name; /* Address to send to/receive from. */ socklen_t msg_namelen; /* Length of address data. */ struct iovec *msg_iov; /* Vector of data to send/receive into. */ size_t msg_iovlen; /* Number of elements in the vector. */ void *msg_control; /* Ancillary data (eg BSD filedesc passing). */ size_t msg_controllen; /* Ancillary data buffer length. !! The type should be socklen_t but the definition of the kernel is incompatible with this. */ int msg_flags; /* Flags on received message. */ }; /* Structure used for storage of ancillary data object information. */ struct cmsghdr { size_t cmsg_len; /* Length of data in cmsg_data plus length of cmsghdr structure. !! The type should be socklen_t but the definition of the kernel is incompatible with this. */ int cmsg_level; /* Originating protocol. */ int cmsg_type; /* Protocol specific type. */ #if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */ #endif # 251 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 }; /* Ancillary data object manipulation macros. */ #if (!defined __STRICT_ANSI__ && __GNUC__ >= 2) || __STDC_VERSION__ >= 199901L # define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data) #else # 257 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 # define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1)) #endif # 259 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 #define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg) #define CMSG_FIRSTHDR(mhdr) \ ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr) \ ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) 0) #define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \ & (size_t) ~(sizeof (size_t) - 1)) #define CMSG_SPACE(len) (CMSG_ALIGN (len) \ + CMSG_ALIGN (sizeof (struct cmsghdr))) #define CMSG_LEN(len) (CMSG_ALIGN (sizeof (struct cmsghdr)) + (len)) extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW; #ifdef __USE_EXTERN_INLINES # ifndef _EXTERN_INLINE # define _EXTERN_INLINE __extern_inline # endif # 275 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 _EXTERN_INLINE struct cmsghdr * __NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)) { if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr)) /* The kernel header does this so there may be a reason. */ return (struct cmsghdr *) 0; __cmsg = (struct cmsghdr *) ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len)); if ((unsigned char *) (__cmsg + 1) > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen) || ((unsigned char *) __cmsg + CMSG_ALIGN (__cmsg->cmsg_len) > ((unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen))) /* No more entries. */ return (struct cmsghdr *) 0; return __cmsg; } #endif /* Use `extern inline'. */ # 293 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 /* Socket level message types. This must match the definitions in . */ enum { SCM_RIGHTS = 0x01 /* Transfer file descriptors. */ #define SCM_RIGHTS SCM_RIGHTS #ifdef __USE_GNU , SCM_CREDENTIALS = 0x02 /* Credentials passing. */ # define SCM_CREDENTIALS SCM_CREDENTIALS #endif # 304 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 }; #ifdef __USE_GNU /* User visible structure for SCM_CREDENTIALS message */ struct ucred { pid_t pid; /* PID of sending process. */ uid_t uid; /* UID of sending process. */ gid_t gid; /* GID of sending process. */ }; #endif # 315 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 /* Ugly workaround for unclean kernel headers. */ #if !defined __USE_MISC && !defined __USE_GNU # ifndef FIOGETOWN # define __SYS_SOCKET_H_undef_FIOGETOWN # endif # 321 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 # ifndef FIOSETOWN # define __SYS_SOCKET_H_undef_FIOSETOWN # endif # 324 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 # ifndef SIOCATMARK # define __SYS_SOCKET_H_undef_SIOCATMARK # endif # 327 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 # ifndef SIOCGPGRP # define __SYS_SOCKET_H_undef_SIOCGPGRP # endif # 330 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 # ifndef SIOCGSTAMP # define __SYS_SOCKET_H_undef_SIOCGSTAMP # endif # 333 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 # ifndef SIOCGSTAMPNS # define __SYS_SOCKET_H_undef_SIOCGSTAMPNS # endif # 336 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 # ifndef SIOCSPGRP # define __SYS_SOCKET_H_undef_SIOCSPGRP # endif # 339 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 #endif # 340 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 /* Get socket manipulation related informations from kernel headers. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 342 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/socket.h" 1 3 #ifndef _ASM_POWERPC_SOCKET_H #define _ASM_POWERPC_SOCKET_H /* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 11 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/socket.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/sockios.h" 1 3 #ifndef _ASM_POWERPC_SOCKIOS_H #define _ASM_POWERPC_SOCKIOS_H /* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ /* Socket-level I/O control calls. */ #define FIOSETOWN 0x8901 #define SIOCSPGRP 0x8902 #define FIOGETOWN 0x8903 #define SIOCGPGRP 0x8904 #define SIOCATMARK 0x8905 #define SIOCGSTAMP 0x8906 /* Get stamp (timeval) */ #define SIOCGSTAMPNS 0x8907 /* Get stamp (timespec) */ #endif /* _ASM_POWERPC_SOCKIOS_H */ # 21 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/sockios.h" 3 # 12 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/socket.h" 2 3 /* For setsockopt(2) */ #define SOL_SOCKET 1 #define SO_DEBUG 1 #define SO_REUSEADDR 2 #define SO_TYPE 3 #define SO_ERROR 4 #define SO_DONTROUTE 5 #define SO_BROADCAST 6 #define SO_SNDBUF 7 #define SO_RCVBUF 8 #define SO_SNDBUFFORCE 32 #define SO_RCVBUFFORCE 33 #define SO_KEEPALIVE 9 #define SO_OOBINLINE 10 #define SO_NO_CHECK 11 #define SO_PRIORITY 12 #define SO_LINGER 13 #define SO_BSDCOMPAT 14 #define SO_REUSEPORT 15 #define SO_RCVLOWAT 16 #define SO_SNDLOWAT 17 #define SO_RCVTIMEO 18 #define SO_SNDTIMEO 19 #define SO_PASSCRED 20 #define SO_PEERCRED 21 /* Security levels - as per NRL IPv6 - don't actually do anything */ #define SO_SECURITY_AUTHENTICATION 22 #define SO_SECURITY_ENCRYPTION_TRANSPORT 23 #define SO_SECURITY_ENCRYPTION_NETWORK 24 #define SO_BINDTODEVICE 25 /* Socket filtering */ #define SO_ATTACH_FILTER 26 #define SO_DETACH_FILTER 27 #define SO_PEERNAME 28 #define SO_TIMESTAMP 29 #define SCM_TIMESTAMP SO_TIMESTAMP #define SO_ACCEPTCONN 30 #define SO_PEERSEC 31 #define SO_PASSSEC 34 #define SO_TIMESTAMPNS 35 #define SCM_TIMESTAMPNS SO_TIMESTAMPNS #define SO_MARK 36 #define SO_TIMESTAMPING 37 #define SCM_TIMESTAMPING SO_TIMESTAMPING #define SO_PROTOCOL 38 #define SO_DOMAIN 39 #define SO_RXQ_OVFL 40 #define SO_BPF_EXTENSIONS 48 #endif /* _ASM_POWERPC_SOCKET_H */ # 75 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/socket.h" 3 # 343 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 2 3 #if !defined __USE_MISC && !defined __USE_GNU # ifdef __SYS_SOCKET_H_undef_FIOGETOWN # undef __SYS_SOCKET_H_undef_FIOGETOWN # undef FIOGETOWN # endif # 349 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 # ifdef __SYS_SOCKET_H_undef_FIOSETOWN # undef __SYS_SOCKET_H_undef_FIOSETOWN # undef FIOSETOWN # endif # 353 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 # ifdef __SYS_SOCKET_H_undef_SIOCATMARK # undef __SYS_SOCKET_H_undef_SIOCATMARK # undef SIOCATMARK # endif # 357 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 # ifdef __SYS_SOCKET_H_undef_SIOCGPGRP # undef __SYS_SOCKET_H_undef_SIOCGPGRP # undef SIOCGPGRP # endif # 361 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 # ifdef __SYS_SOCKET_H_undef_SIOCGSTAMP # undef __SYS_SOCKET_H_undef_SIOCGSTAMP # undef SIOCGSTAMP # endif # 365 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 # ifdef __SYS_SOCKET_H_undef_SIOCGSTAMPNS # undef __SYS_SOCKET_H_undef_SIOCGSTAMPNS # undef SIOCGSTAMPNS # endif # 369 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 # ifdef __SYS_SOCKET_H_undef_SIOCSPGRP # undef __SYS_SOCKET_H_undef_SIOCSPGRP # undef SIOCSPGRP # endif # 373 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 #endif # 374 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 /* Structure used to manipulate the SO_LINGER option. */ struct linger { int l_onoff; /* Nonzero to linger on close. */ int l_linger; /* Time to linger. */ }; #endif /* bits/socket.h */ # 383 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/socket.h" 3 # 40 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 2 3 #ifdef __USE_BSD /* This is the 4.3 BSD `struct sockaddr' format, which is used as wire format in the grotty old 4.3 `talk' protocol. */ struct osockaddr { unsigned short int sa_family; unsigned char sa_data[14]; }; #endif # 50 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 3 /* The following constants should be used for the second parameter of `shutdown'. */ enum { SHUT_RD = 0, /* No more receptions. */ #define SHUT_RD SHUT_RD SHUT_WR, /* No more transmissions. */ #define SHUT_WR SHUT_WR SHUT_RDWR /* No more receptions or transmissions. */ #define SHUT_RDWR SHUT_RDWR }; /* This is the type we use for generic socket address arguments. With GCC 2.7 and later, the funky union causes redeclarations or uses with any of the listed types to be allowed without complaint. G++ 2.7 does not support transparent unions so there we want the old-style declaration, too. */ #if defined __cplusplus || !__GNUC_PREREQ (2, 7) || !defined __USE_GNU # define __SOCKADDR_ARG struct sockaddr *__restrict # define __CONST_SOCKADDR_ARG const struct sockaddr * #else # 73 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 3 /* Add more `struct sockaddr_AF' types here as necessary. These are all the ones I found on NetBSD and Linux. */ # define __SOCKADDR_ALLTYPES \ __SOCKADDR_ONETYPE (sockaddr) \ __SOCKADDR_ONETYPE (sockaddr_at) \ __SOCKADDR_ONETYPE (sockaddr_ax25) \ __SOCKADDR_ONETYPE (sockaddr_dl) \ __SOCKADDR_ONETYPE (sockaddr_eon) \ __SOCKADDR_ONETYPE (sockaddr_in) \ __SOCKADDR_ONETYPE (sockaddr_in6) \ __SOCKADDR_ONETYPE (sockaddr_inarp) \ __SOCKADDR_ONETYPE (sockaddr_ipx) \ __SOCKADDR_ONETYPE (sockaddr_iso) \ __SOCKADDR_ONETYPE (sockaddr_ns) \ __SOCKADDR_ONETYPE (sockaddr_un) \ __SOCKADDR_ONETYPE (sockaddr_x25) # define __SOCKADDR_ONETYPE(type) struct type *__restrict __##type##__; typedef union { __SOCKADDR_ALLTYPES } __SOCKADDR_ARG __attribute__ ((__transparent_union__)); # undef __SOCKADDR_ONETYPE # define __SOCKADDR_ONETYPE(type) const struct type *__restrict __##type##__; typedef union { __SOCKADDR_ALLTYPES } __CONST_SOCKADDR_ARG __attribute__ ((__transparent_union__)); # undef __SOCKADDR_ONETYPE #endif # 99 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 3 #ifdef __USE_GNU /* For `recvmmsg' and `sendmmsg'. */ struct mmsghdr { struct msghdr msg_hdr; /* Actual message header. */ unsigned int msg_len; /* Number of received or sent bytes for the entry. */ }; #endif # 109 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 3 /* Create a new socket of type TYPE in domain DOMAIN, using protocol PROTOCOL. If PROTOCOL is zero, one is chosen automatically. Returns a file descriptor for the new socket, or -1 for errors. */ extern int socket (int __domain, int __type, int __protocol) __THROW; /* Create two new sockets, of type TYPE in domain DOMAIN and using protocol PROTOCOL, which are connected to each other, and put file descriptors for them in FDS[0] and FDS[1]. If PROTOCOL is zero, one will be chosen automatically. Returns 0 on success, -1 for errors. */ extern int socketpair (int __domain, int __type, int __protocol, int __fds[2]) __THROW; /* Give the socket FD the local address ADDR (which is LEN bytes long). */ extern int bind (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len) __THROW; /* Put the local address of FD into *ADDR and its length in *LEN. */ extern int getsockname (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __len) __THROW; /* Open a connection on socket FD to peer at ADDR (which LEN bytes long). For connectionless socket types, just set the default address to send to and the only address from which to accept transmissions. Return 0 on success, -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern int connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len); /* Put the address of the peer connected to socket FD into *ADDR (which is *LEN bytes long), and its actual length into *LEN. */ extern int getpeername (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __len) __THROW; /* Send N bytes of BUF to socket FD. Returns the number sent or -1. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t send (int __fd, const void *__buf, size_t __n, int __flags); /* Read N bytes into BUF from socket FD. Returns the number read or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t recv (int __fd, void *__buf, size_t __n, int __flags); /* Send N bytes of BUF on socket FD to peer at address ADDR (which is ADDR_LEN bytes long). Returns the number sent, or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t sendto (int __fd, const void *__buf, size_t __n, int __flags, __CONST_SOCKADDR_ARG __addr, socklen_t __addr_len); /* Read N bytes into BUF through socket FD. If ADDR is not NULL, fill in *ADDR_LEN bytes of it with tha address of the sender, and store the actual size of the address in *ADDR_LEN. Returns the number of bytes read or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len); /* Send a message described MESSAGE on socket FD. Returns the number of bytes sent, or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t sendmsg (int __fd, const struct msghdr *__message, int __flags); #ifdef __USE_GNU /* Send a VLEN messages as described by VMESSAGES to socket FD. Returns the number of datagrams successfully written or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern int sendmmsg (int __fd, struct mmsghdr *__vmessages, unsigned int __vlen, int __flags); #endif # 197 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 3 /* Receive a message as described by MESSAGE from socket FD. Returns the number of bytes read or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags); #ifdef __USE_GNU /* Receive up to VLEN messages as described by VMESSAGES from socket FD. Returns the number of bytes read or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern int recvmmsg (int __fd, struct mmsghdr *__vmessages, unsigned int __vlen, int __flags, const struct timespec *__tmo); #endif # 215 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 3 /* Put the current value for socket FD's option OPTNAME at protocol level LEVEL into OPTVAL (which is *OPTLEN bytes long), and set *OPTLEN to the value's actual length. Returns 0 on success, -1 for errors. */ extern int getsockopt (int __fd, int __level, int __optname, void *__restrict __optval, socklen_t *__restrict __optlen) __THROW; /* Set socket FD's option OPTNAME at protocol level LEVEL to *OPTVAL (which is OPTLEN bytes long). Returns 0 on success, -1 for errors. */ extern int setsockopt (int __fd, int __level, int __optname, const void *__optval, socklen_t __optlen) __THROW; /* Prepare to accept connections on socket FD. N connection requests will be queued before further requests are refused. Returns 0 on success, -1 for errors. */ extern int listen (int __fd, int __n) __THROW; /* Await a connection on socket FD. When a connection arrives, open a new socket to communicate with it, set *ADDR (which is *ADDR_LEN bytes long) to the address of the connecting peer and *ADDR_LEN to the address's actual length, and return the new socket's descriptor, or -1 for errors. This function is a cancellation point and therefore not marked with __THROW. */ extern int accept (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len); #ifdef __USE_GNU /* Similar to 'accept' but takes an additional parameter to specify flags. This function is a cancellation point and therefore not marked with __THROW. */ extern int accept4 (int __fd, __SOCKADDR_ARG __addr, socklen_t *__restrict __addr_len, int __flags); #endif # 255 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 3 /* Shut down all or part of the connection open on socket FD. HOW determines what to shut down: SHUT_RD = No more receptions; SHUT_WR = No more transmissions; SHUT_RDWR = No more receptions or transmissions. Returns 0 on success, -1 for errors. */ extern int shutdown (int __fd, int __how) __THROW; #ifdef __USE_XOPEN2K /* Determine wheter socket is at a out-of-band mark. */ extern int sockatmark (int __fd) __THROW; #endif # 269 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 3 #ifdef __USE_MISC /* FDTYPE is S_IFSOCK or another S_IF* macro defined in ; returns 1 if FD is open on an object of the indicated type, 0 if not, or -1 for errors (setting errno). */ extern int isfdtype (int __fd, int __fdtype) __THROW; #endif # 277 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 3 /* Define some macros helping to catch buffer overflows. */ #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 281 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 3 # 282 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 3 #endif # 283 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 3 __END_DECLS #endif /* sys/socket.h */ # 287 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/socket.h" 3 # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 1 3 /* Copyright (C) 1991-2001, 2003, 2004, 2006, 2007, 2008, 2011, 2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _NETINET_IN_H #define _NETINET_IN_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 # 23 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 23 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 # 24 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 24 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 # 25 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 25 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 __BEGIN_DECLS /* Standard well-defined IP protocols. */ enum { IPPROTO_IP = 0, /* Dummy protocol for TCP. */ #define IPPROTO_IP IPPROTO_IP IPPROTO_HOPOPTS = 0, /* IPv6 Hop-by-Hop options. */ #define IPPROTO_HOPOPTS IPPROTO_HOPOPTS IPPROTO_ICMP = 1, /* Internet Control Message Protocol. */ #define IPPROTO_ICMP IPPROTO_ICMP IPPROTO_IGMP = 2, /* Internet Group Management Protocol. */ #define IPPROTO_IGMP IPPROTO_IGMP IPPROTO_IPIP = 4, /* IPIP tunnels (older KA9Q tunnels use 94). */ #define IPPROTO_IPIP IPPROTO_IPIP IPPROTO_TCP = 6, /* Transmission Control Protocol. */ #define IPPROTO_TCP IPPROTO_TCP IPPROTO_EGP = 8, /* Exterior Gateway Protocol. */ #define IPPROTO_EGP IPPROTO_EGP IPPROTO_PUP = 12, /* PUP protocol. */ #define IPPROTO_PUP IPPROTO_PUP IPPROTO_UDP = 17, /* User Datagram Protocol. */ #define IPPROTO_UDP IPPROTO_UDP IPPROTO_IDP = 22, /* XNS IDP protocol. */ #define IPPROTO_IDP IPPROTO_IDP IPPROTO_TP = 29, /* SO Transport Protocol Class 4. */ #define IPPROTO_TP IPPROTO_TP IPPROTO_DCCP = 33, /* Datagram Congestion Control Protocol. */ #define IPPROTO_DCCP IPPROTO_DCCP IPPROTO_IPV6 = 41, /* IPv6 header. */ #define IPPROTO_IPV6 IPPROTO_IPV6 IPPROTO_ROUTING = 43, /* IPv6 routing header. */ #define IPPROTO_ROUTING IPPROTO_ROUTING IPPROTO_FRAGMENT = 44, /* IPv6 fragmentation header. */ #define IPPROTO_FRAGMENT IPPROTO_FRAGMENT IPPROTO_RSVP = 46, /* Reservation Protocol. */ #define IPPROTO_RSVP IPPROTO_RSVP IPPROTO_GRE = 47, /* General Routing Encapsulation. */ #define IPPROTO_GRE IPPROTO_GRE IPPROTO_ESP = 50, /* encapsulating security payload. */ #define IPPROTO_ESP IPPROTO_ESP IPPROTO_AH = 51, /* authentication header. */ #define IPPROTO_AH IPPROTO_AH IPPROTO_ICMPV6 = 58, /* ICMPv6. */ #define IPPROTO_ICMPV6 IPPROTO_ICMPV6 IPPROTO_NONE = 59, /* IPv6 no next header. */ #define IPPROTO_NONE IPPROTO_NONE IPPROTO_DSTOPTS = 60, /* IPv6 destination options. */ #define IPPROTO_DSTOPTS IPPROTO_DSTOPTS IPPROTO_MTP = 92, /* Multicast Transport Protocol. */ #define IPPROTO_MTP IPPROTO_MTP IPPROTO_ENCAP = 98, /* Encapsulation Header. */ #define IPPROTO_ENCAP IPPROTO_ENCAP IPPROTO_PIM = 103, /* Protocol Independent Multicast. */ #define IPPROTO_PIM IPPROTO_PIM IPPROTO_COMP = 108, /* Compression Header Protocol. */ #define IPPROTO_COMP IPPROTO_COMP IPPROTO_SCTP = 132, /* Stream Control Transmission Protocol. */ #define IPPROTO_SCTP IPPROTO_SCTP IPPROTO_UDPLITE = 136, /* UDP-Lite protocol. */ #define IPPROTO_UDPLITE IPPROTO_UDPLITE IPPROTO_RAW = 255, /* Raw IP packets. */ #define IPPROTO_RAW IPPROTO_RAW IPPROTO_MAX }; /* Type to represent a port. */ typedef uint16_t in_port_t; /* Standard well-known ports. */ enum { IPPORT_ECHO = 7, /* Echo service. */ IPPORT_DISCARD = 9, /* Discard transmissions service. */ IPPORT_SYSTAT = 11, /* System status service. */ IPPORT_DAYTIME = 13, /* Time of day service. */ IPPORT_NETSTAT = 15, /* Network status service. */ IPPORT_FTP = 21, /* File Transfer Protocol. */ IPPORT_TELNET = 23, /* Telnet protocol. */ IPPORT_SMTP = 25, /* Simple Mail Transfer Protocol. */ IPPORT_TIMESERVER = 37, /* Timeserver service. */ IPPORT_NAMESERVER = 42, /* Domain Name Service. */ IPPORT_WHOIS = 43, /* Internet Whois service. */ IPPORT_MTP = 57, IPPORT_TFTP = 69, /* Trivial File Transfer Protocol. */ IPPORT_RJE = 77, IPPORT_FINGER = 79, /* Finger service. */ IPPORT_TTYLINK = 87, IPPORT_SUPDUP = 95, /* SUPDUP protocol. */ IPPORT_EXECSERVER = 512, /* execd service. */ IPPORT_LOGINSERVER = 513, /* rlogind service. */ IPPORT_CMDSERVER = 514, IPPORT_EFSSERVER = 520, /* UDP ports. */ IPPORT_BIFFUDP = 512, IPPORT_WHOSERVER = 513, IPPORT_ROUTESERVER = 520, /* Ports less than this value are reserved for privileged processes. */ IPPORT_RESERVED = 1024, /* Ports greater this value are reserved for (non-privileged) servers. */ IPPORT_USERRESERVED = 5000 }; /* Internet address. */ typedef uint32_t in_addr_t; struct in_addr { in_addr_t s_addr; }; /* Definitions of the bits in an Internet address integer. On subnets, host and network parts are found according to the subnet mask, not these masks. */ #define IN_CLASSA(a) ((((in_addr_t)(a)) & 0x80000000) == 0) #define IN_CLASSA_NET 0xff000000 #define IN_CLASSA_NSHIFT 24 #define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET) #define IN_CLASSA_MAX 128 #define IN_CLASSB(a) ((((in_addr_t)(a)) & 0xc0000000) == 0x80000000) #define IN_CLASSB_NET 0xffff0000 #define IN_CLASSB_NSHIFT 16 #define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET) #define IN_CLASSB_MAX 65536 #define IN_CLASSC(a) ((((in_addr_t)(a)) & 0xe0000000) == 0xc0000000) #define IN_CLASSC_NET 0xffffff00 #define IN_CLASSC_NSHIFT 8 #define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET) #define IN_CLASSD(a) ((((in_addr_t)(a)) & 0xf0000000) == 0xe0000000) #define IN_MULTICAST(a) IN_CLASSD(a) #define IN_EXPERIMENTAL(a) ((((in_addr_t)(a)) & 0xe0000000) == 0xe0000000) #define IN_BADCLASS(a) ((((in_addr_t)(a)) & 0xf0000000) == 0xf0000000) /* Address to accept any incoming messages. */ #define INADDR_ANY ((in_addr_t) 0x00000000) /* Address to send to all hosts. */ #define INADDR_BROADCAST ((in_addr_t) 0xffffffff) /* Address indicating an error return. */ #define INADDR_NONE ((in_addr_t) 0xffffffff) /* Network number for local host loopback. */ #define IN_LOOPBACKNET 127 /* Address to loopback in software to local host. */ #ifndef INADDR_LOOPBACK # define INADDR_LOOPBACK ((in_addr_t) 0x7f000001) /* Inet 127.0.0.1. */ #endif # 188 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 /* Defines for Multicast INADDR. */ #define INADDR_UNSPEC_GROUP ((in_addr_t) 0xe0000000) /* 224.0.0.0 */ #define INADDR_ALLHOSTS_GROUP ((in_addr_t) 0xe0000001) /* 224.0.0.1 */ #define INADDR_ALLRTRS_GROUP ((in_addr_t) 0xe0000002) /* 224.0.0.2 */ #define INADDR_MAX_LOCAL_GROUP ((in_addr_t) 0xe00000ff) /* 224.0.0.255 */ /* IPv6 address */ struct in6_addr { union { uint8_t __u6_addr8[16]; #if defined __USE_MISC || defined __USE_GNU uint16_t __u6_addr16[8]; uint32_t __u6_addr32[4]; #endif # 206 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 } __in6_u; #define s6_addr __in6_u.__u6_addr8 #if defined __USE_MISC || defined __USE_GNU # define s6_addr16 __in6_u.__u6_addr16 # define s6_addr32 __in6_u.__u6_addr32 #endif # 212 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 }; extern const struct in6_addr in6addr_any; /* :: */ extern const struct in6_addr in6addr_loopback; /* ::1 */ #define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } } #define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } } #define INET_ADDRSTRLEN 16 #define INET6_ADDRSTRLEN 46 /* Structure describing an Internet socket address. */ struct sockaddr_in { __SOCKADDR_COMMON (sin_); in_port_t sin_port; /* Port number. */ struct in_addr sin_addr; /* Internet address. */ /* Pad to size of `struct sockaddr'. */ unsigned char sin_zero[sizeof (struct sockaddr) - __SOCKADDR_COMMON_SIZE - sizeof (in_port_t) - sizeof (struct in_addr)]; }; /* Ditto, for IPv6. */ struct sockaddr_in6 { __SOCKADDR_COMMON (sin6_); in_port_t sin6_port; /* Transport layer port # */ uint32_t sin6_flowinfo; /* IPv6 flow information */ struct in6_addr sin6_addr; /* IPv6 address */ uint32_t sin6_scope_id; /* IPv6 scope-id */ }; #if defined __USE_MISC || defined __USE_GNU /* IPv4 multicast request. */ struct ip_mreq { /* IP multicast address of group. */ struct in_addr imr_multiaddr; /* Local IP address of interface. */ struct in_addr imr_interface; }; struct ip_mreq_source { /* IP multicast address of group. */ struct in_addr imr_multiaddr; /* IP address of source. */ struct in_addr imr_interface; /* IP address of interface. */ struct in_addr imr_sourceaddr; }; #endif # 271 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 /* Likewise, for IPv6. */ struct ipv6_mreq { /* IPv6 multicast address of group */ struct in6_addr ipv6mr_multiaddr; /* local interface */ unsigned int ipv6mr_interface; }; #if defined __USE_MISC || defined __USE_GNU /* Multicast group request. */ struct group_req { /* Interface index. */ uint32_t gr_interface; /* Group address. */ struct sockaddr_storage gr_group; }; struct group_source_req { /* Interface index. */ uint32_t gsr_interface; /* Group address. */ struct sockaddr_storage gsr_group; /* Source address. */ struct sockaddr_storage gsr_source; }; /* Full-state filter operations. */ struct ip_msfilter { /* IP multicast address of group. */ struct in_addr imsf_multiaddr; /* Local IP address of interface. */ struct in_addr imsf_interface; /* Filter mode. */ uint32_t imsf_fmode; /* Number of source addresses. */ uint32_t imsf_numsrc; /* Source addresses. */ struct in_addr imsf_slist[1]; }; #define IP_MSFILTER_SIZE(numsrc) (sizeof (struct ip_msfilter) \ - sizeof (struct in_addr) \ + (numsrc) * sizeof (struct in_addr)) struct group_filter { /* Interface index. */ uint32_t gf_interface; /* Group address. */ struct sockaddr_storage gf_group; /* Filter mode. */ uint32_t gf_fmode; /* Number of source addresses. */ uint32_t gf_numsrc; /* Source addresses. */ struct sockaddr_storage gf_slist[1]; }; #define GROUP_FILTER_SIZE(numsrc) (sizeof (struct group_filter) \ - sizeof (struct sockaddr_storage) \ + ((numsrc) \ * sizeof (struct sockaddr_storage))) #endif # 352 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 /* Get system-specific definitions. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 355 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/in.h" 1 3 /* Copyright (C) 1991-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* Linux version. */ #ifndef _NETINET_IN_H # error "Never use directly; include instead." #endif # 23 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/in.h" 3 /* Options for use with `getsockopt' and `setsockopt' at the IP level. The first word in the comment at the right is the data type used; "bool" means a boolean value stored in an `int'. */ #define IP_OPTIONS 4 /* ip_opts; IP per-packet options. */ #define IP_HDRINCL 3 /* int; Header is included with data. */ #define IP_TOS 1 /* int; IP type of service and precedence. */ #define IP_TTL 2 /* int; IP time to live. */ #define IP_RECVOPTS 6 /* bool; Receive all IP options w/datagram. */ /* For BSD compatibility. */ #define IP_RECVRETOPTS IP_RETOPTS /* bool; Receive IP options for response. */ #define IP_RETOPTS 7 /* ip_opts; Set/get IP per-packet options. */ #define IP_MULTICAST_IF 32 /* in_addr; set/get IP multicast i/f */ #define IP_MULTICAST_TTL 33 /* u_char; set/get IP multicast ttl */ #define IP_MULTICAST_LOOP 34 /* i_char; set/get IP multicast loopback */ #define IP_ADD_MEMBERSHIP 35 /* ip_mreq; add an IP group membership */ #define IP_DROP_MEMBERSHIP 36 /* ip_mreq; drop an IP group membership */ #define IP_UNBLOCK_SOURCE 37 /* ip_mreq_source: unblock data from source */ #define IP_BLOCK_SOURCE 38 /* ip_mreq_source: block data from source */ #define IP_ADD_SOURCE_MEMBERSHIP 39 /* ip_mreq_source: join source group */ #define IP_DROP_SOURCE_MEMBERSHIP 40 /* ip_mreq_source: leave source group */ #define IP_MSFILTER 41 #if defined __USE_MISC || defined __USE_GNU # define MCAST_JOIN_GROUP 42 /* group_req: join any-source group */ # define MCAST_BLOCK_SOURCE 43 /* group_source_req: block from given group */ # define MCAST_UNBLOCK_SOURCE 44 /* group_source_req: unblock from given group*/ # define MCAST_LEAVE_GROUP 45 /* group_req: leave any-source group */ # define MCAST_JOIN_SOURCE_GROUP 46 /* group_source_req: join source-spec gr */ # define MCAST_LEAVE_SOURCE_GROUP 47 /* group_source_req: leave source-spec gr*/ # define MCAST_MSFILTER 48 # define IP_MULTICAST_ALL 49 # define IP_UNICAST_IF 50 # define MCAST_EXCLUDE 0 # define MCAST_INCLUDE 1 #endif # 59 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/in.h" 3 #define IP_ROUTER_ALERT 5 /* bool */ #define IP_PKTINFO 8 /* bool */ #define IP_PKTOPTIONS 9 #define IP_PMTUDISC 10 /* obsolete name? */ #define IP_MTU_DISCOVER 10 /* int; see below */ #define IP_RECVERR 11 /* bool */ #define IP_RECVTTL 12 /* bool */ #define IP_RECVTOS 13 /* bool */ #define IP_MTU 14 /* int */ #define IP_FREEBIND 15 #define IP_IPSEC_POLICY 16 #define IP_XFRM_POLICY 17 #define IP_PASSSEC 18 #define IP_TRANSPARENT 19 #define IP_MULTICAST_ALL 49 /* bool */ /* TProxy original addresses */ #define IP_ORIGDSTADDR 20 #define IP_RECVORIGDSTADDR IP_ORIGDSTADDR #define IP_MINTTL 21 /* IP_MTU_DISCOVER arguments. */ #define IP_PMTUDISC_DONT 0 /* Never send DF frames. */ #define IP_PMTUDISC_WANT 1 /* Use per route hints. */ #define IP_PMTUDISC_DO 2 /* Always DF. */ #define IP_PMTUDISC_PROBE 3 /* Ignore dst pmtu. */ /* To select the IP level. */ #define SOL_IP 0 #define IP_DEFAULT_MULTICAST_TTL 1 #define IP_DEFAULT_MULTICAST_LOOP 1 #define IP_MAX_MEMBERSHIPS 20 #if defined __USE_MISC || defined __USE_GNU /* Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS. The `ip_dst' field is used for the first-hop gateway when using a source route (this gets put into the header proper). */ struct ip_opts { struct in_addr ip_dst; /* First hop; zero without source route. */ char ip_opts[40]; /* Actually variable in size. */ }; /* Like `struct ip_mreq' but including interface specification by index. */ struct ip_mreqn { struct in_addr imr_multiaddr; /* IP multicast address of group */ struct in_addr imr_address; /* local IP address of interface */ int imr_ifindex; /* Interface index */ }; /* Structure used for IP_PKTINFO. */ struct in_pktinfo { int ipi_ifindex; /* Interface index */ struct in_addr ipi_spec_dst; /* Routing destination address */ struct in_addr ipi_addr; /* Header destination address */ }; #endif # 122 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/in.h" 3 /* Options for use with `getsockopt' and `setsockopt' at the IPv6 level. The first word in the comment at the right is the data type used; "bool" means a boolean value stored in an `int'. */ #define IPV6_ADDRFORM 1 #define IPV6_2292PKTINFO 2 #define IPV6_2292HOPOPTS 3 #define IPV6_2292DSTOPTS 4 #define IPV6_2292RTHDR 5 #define IPV6_2292PKTOPTIONS 6 #define IPV6_CHECKSUM 7 #define IPV6_2292HOPLIMIT 8 #define SCM_SRCRT IPV6_RXSRCRT #define IPV6_NEXTHOP 9 #define IPV6_AUTHHDR 10 #define IPV6_UNICAST_HOPS 16 #define IPV6_MULTICAST_IF 17 #define IPV6_MULTICAST_HOPS 18 #define IPV6_MULTICAST_LOOP 19 #define IPV6_JOIN_GROUP 20 #define IPV6_LEAVE_GROUP 21 #define IPV6_ROUTER_ALERT 22 #define IPV6_MTU_DISCOVER 23 #define IPV6_MTU 24 #define IPV6_RECVERR 25 #define IPV6_V6ONLY 26 #define IPV6_JOIN_ANYCAST 27 #define IPV6_LEAVE_ANYCAST 28 #define IPV6_IPSEC_POLICY 34 #define IPV6_XFRM_POLICY 35 #define IPV6_RECVPKTINFO 49 #define IPV6_PKTINFO 50 #define IPV6_RECVHOPLIMIT 51 #define IPV6_HOPLIMIT 52 #define IPV6_RECVHOPOPTS 53 #define IPV6_HOPOPTS 54 #define IPV6_RTHDRDSTOPTS 55 #define IPV6_RECVRTHDR 56 #define IPV6_RTHDR 57 #define IPV6_RECVDSTOPTS 58 #define IPV6_DSTOPTS 59 #define IPV6_RECVTCLASS 66 #define IPV6_TCLASS 67 /* Obsolete synonyms for the above. */ #define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP #define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP #define IPV6_RXHOPOPTS IPV6_HOPOPTS #define IPV6_RXDSTOPTS IPV6_DSTOPTS /* IPV6_MTU_DISCOVER values. */ #define IPV6_PMTUDISC_DONT 0 /* Never send DF frames. */ #define IPV6_PMTUDISC_WANT 1 /* Use per route hints. */ #define IPV6_PMTUDISC_DO 2 /* Always DF. */ #define IPV6_PMTUDISC_PROBE 3 /* Ignore dst pmtu. */ /* Socket level values for IPv6. */ #define SOL_IPV6 41 #define SOL_ICMPV6 58 /* Routing header options for IPv6. */ #define IPV6_RTHDR_LOOSE 0 /* Hop doesn't need to be neighbour. */ #define IPV6_RTHDR_STRICT 1 /* Hop must be a neighbour. */ #define IPV6_RTHDR_TYPE_0 0 /* IPv6 Routing header type 0. */ # 356 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 2 3 /* Functions to convert between host and network byte order. Please note that these functions normally take `unsigned long int' or `unsigned short int' values as arguments and also return them. But this was a short-sighted decision since on different systems the types may have different representations but the values are always the same. */ /* Done for BGQ. Not sure if this is still needed. */ #undef ntohl #undef ntohs #undef htonl #undef htons extern uint32_t ntohl (uint32_t __netlong) __THROW __attribute__ ((__const__)); extern uint16_t ntohs (uint16_t __netshort) __THROW __attribute__ ((__const__)); extern uint32_t htonl (uint32_t __hostlong) __THROW __attribute__ ((__const__)); extern uint16_t htons (uint16_t __hostshort) __THROW __attribute__ ((__const__)); #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 378 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 # 379 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 /* Get machine dependent optimized versions of byte swapping functions. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 381 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 1 3 /* Macros to swap the order of bytes in integer values. Copyright (C) 1997-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if !defined _BYTESWAP_H && !defined _NETINET_IN_H && !defined _ENDIAN_H # error "Never use directly; include instead." #endif # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 #ifndef _BITS_BYTESWAP_H #define _BITS_BYTESWAP_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 /* Swap bytes in 16 bit value. */ #define __bswap_constant_16(x) \ ((unsigned short int)((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8))) /* Get __bswap_16. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 34 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 # 35 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 /* Swap bytes in 32 bit value. */ #define __bswap_constant_32(x) \ ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | \ (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24)) #ifdef __GNUC__ # if __GNUC_PREREQ (4, 3) static __inline unsigned int __bswap_32 (unsigned int __bsx) { return __builtin_bswap32 (__bsx); } # else # 49 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 # define __bswap_32(x) \ (__extension__ \ ({ register unsigned int __bsx = (x); __bswap_constant_32 (__bsx); })) # endif # 53 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 #else # 54 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 static __inline unsigned int __bswap_32 (unsigned int __bsx) { return __bswap_constant_32 (__bsx); } #endif # 60 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 /* Swap bytes in 64 bit value. */ #if __GNUC_PREREQ (2, 0) # define __bswap_constant_64(x) \ (__extension__ ((((x) & 0xff00000000000000ull) >> 56) \ | (((x) & 0x00ff000000000000ull) >> 40) \ | (((x) & 0x0000ff0000000000ull) >> 24) \ | (((x) & 0x000000ff00000000ull) >> 8) \ | (((x) & 0x00000000ff000000ull) << 8) \ | (((x) & 0x0000000000ff0000ull) << 24) \ | (((x) & 0x000000000000ff00ull) << 40) \ | (((x) & 0x00000000000000ffull) << 56))) # if __GNUC_PREREQ (4, 3) static __inline __uint64_t __bswap_64 (__uint64_t __bsx) { return __builtin_bswap64 (__bsx); } # else # 80 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 # define __bswap_64(x) \ (__extension__ \ ({ union { __extension__ __uint64_t __ll; \ unsigned int __l[2]; } __w, __r; \ if (__builtin_constant_p (x)) \ __r.__ll = __bswap_constant_64 (x); \ else \ { \ __w.__ll = (x); \ __r.__l[0] = __bswap_32 (__w.__l[1]); \ __r.__l[1] = __bswap_32 (__w.__l[0]); \ } \ __r.__ll; })) # endif # 94 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 #elif __GLIBC_HAVE_LONG_LONG # 95 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 # define __bswap_constant_64(x) \ ((((x) & 0xff00000000000000ull) >> 56) \ | (((x) & 0x00ff000000000000ull) >> 40) \ | (((x) & 0x0000ff0000000000ull) >> 24) \ | (((x) & 0x000000ff00000000ull) >> 8) \ | (((x) & 0x00000000ff000000ull) << 8) \ | (((x) & 0x0000000000ff0000ull) << 24) \ | (((x) & 0x000000000000ff00ull) << 40) \ | (((x) & 0x00000000000000ffull) << 56)) static __inline __uint64_t __bswap_64 (__uint64_t __bsx) { return __bswap_constant_64 (__bsx); } #endif # 111 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 #endif /* _BITS_BYTESWAP_H */ # 113 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/byteswap.h" 3 # 382 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 2 3 #ifdef __OPTIMIZE__ /* We can optimize calls to the conversion functions. Either nothing has to be done or we are using directly the byte-swapping functions which often can be inlined. */ # if __BYTE_ORDER == __BIG_ENDIAN /* The host byte order is the same as network byte order, so these functions are all just identity. */ # define ntohl(x) (x) # define ntohs(x) (x) # define htonl(x) (x) # define htons(x) (x) # else # 395 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 # if __BYTE_ORDER == __LITTLE_ENDIAN # define ntohl(x) __bswap_32 (x) # define ntohs(x) __bswap_16 (x) # define htonl(x) __bswap_32 (x) # define htons(x) __bswap_16 (x) # endif # 401 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 # endif # 402 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 #endif # 403 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 #ifdef __GNUC__ # define IN6_IS_ADDR_UNSPECIFIED(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ __a->s6_addr32[0] == 0 \ && __a->s6_addr32[1] == 0 \ && __a->s6_addr32[2] == 0 \ && __a->s6_addr32[3] == 0; })) # define IN6_IS_ADDR_LOOPBACK(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ __a->s6_addr32[0] == 0 \ && __a->s6_addr32[1] == 0 \ && __a->s6_addr32[2] == 0 \ && __a->s6_addr32[3] == htonl (1); })) # define IN6_IS_ADDR_LINKLOCAL(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ (__a->s6_addr32[0] & htonl (0xffc00000)) == htonl (0xfe800000); })) # define IN6_IS_ADDR_SITELOCAL(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ (__a->s6_addr32[0] & htonl (0xffc00000)) == htonl (0xfec00000); })) # define IN6_IS_ADDR_V4MAPPED(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ __a->s6_addr32[0] == 0 \ && __a->s6_addr32[1] == 0 \ && __a->s6_addr32[2] == htonl (0xffff); })) # define IN6_IS_ADDR_V4COMPAT(a) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ __a->s6_addr32[0] == 0 \ && __a->s6_addr32[1] == 0 \ && __a->s6_addr32[2] == 0 \ && ntohl (__a->s6_addr32[3]) > 1; })) # define IN6_ARE_ADDR_EQUAL(a,b) \ (__extension__ \ ({ const struct in6_addr *__a = (const struct in6_addr *) (a); \ const struct in6_addr *__b = (const struct in6_addr *) (b); \ __a->s6_addr32[0] == __b->s6_addr32[0] \ && __a->s6_addr32[1] == __b->s6_addr32[1] \ && __a->s6_addr32[2] == __b->s6_addr32[2] \ && __a->s6_addr32[3] == __b->s6_addr32[3]; })) #else # 455 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 # define IN6_IS_ADDR_UNSPECIFIED(a) \ (((const uint32_t *) (a))[0] == 0 \ && ((const uint32_t *) (a))[1] == 0 \ && ((const uint32_t *) (a))[2] == 0 \ && ((const uint32_t *) (a))[3] == 0) # define IN6_IS_ADDR_LOOPBACK(a) \ (((const uint32_t *) (a))[0] == 0 \ && ((const uint32_t *) (a))[1] == 0 \ && ((const uint32_t *) (a))[2] == 0 \ && ((const uint32_t *) (a))[3] == htonl (1)) # define IN6_IS_ADDR_LINKLOCAL(a) \ ((((const uint32_t *) (a))[0] & htonl (0xffc00000)) \ == htonl (0xfe800000)) # define IN6_IS_ADDR_SITELOCAL(a) \ ((((const uint32_t *) (a))[0] & htonl (0xffc00000)) \ == htonl (0xfec00000)) # define IN6_IS_ADDR_V4MAPPED(a) \ ((((const uint32_t *) (a))[0] == 0) \ && (((const uint32_t *) (a))[1] == 0) \ && (((const uint32_t *) (a))[2] == htonl (0xffff))) # define IN6_IS_ADDR_V4COMPAT(a) \ ((((const uint32_t *) (a))[0] == 0) \ && (((const uint32_t *) (a))[1] == 0) \ && (((const uint32_t *) (a))[2] == 0) \ && (ntohl (((const uint32_t *) (a))[3]) > 1)) # define IN6_ARE_ADDR_EQUAL(a,b) \ ((((const uint32_t *) (a))[0] == ((const uint32_t *) (b))[0]) \ && (((const uint32_t *) (a))[1] == ((const uint32_t *) (b))[1]) \ && (((const uint32_t *) (a))[2] == ((const uint32_t *) (b))[2]) \ && (((const uint32_t *) (a))[3] == ((const uint32_t *) (b))[3])) #endif # 492 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 #define IN6_IS_ADDR_MULTICAST(a) (((const uint8_t *) (a))[0] == 0xff) #if defined __USE_MISC || defined __USE_GNU /* Bind socket to a privileged IP port. */ extern int bindresvport (int __sockfd, struct sockaddr_in *__sock_in) __THROW; /* The IPv6 version of this function. */ extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in) __THROW; #endif # 503 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 #define IN6_IS_ADDR_MC_NODELOCAL(a) \ (IN6_IS_ADDR_MULTICAST(a) \ && ((((const uint8_t *) (a))[1] & 0xf) == 0x1)) #define IN6_IS_ADDR_MC_LINKLOCAL(a) \ (IN6_IS_ADDR_MULTICAST(a) \ && ((((const uint8_t *) (a))[1] & 0xf) == 0x2)) #define IN6_IS_ADDR_MC_SITELOCAL(a) \ (IN6_IS_ADDR_MULTICAST(a) \ && ((((const uint8_t *) (a))[1] & 0xf) == 0x5)) #define IN6_IS_ADDR_MC_ORGLOCAL(a) \ (IN6_IS_ADDR_MULTICAST(a) \ && ((((const uint8_t *) (a))[1] & 0xf) == 0x8)) #define IN6_IS_ADDR_MC_GLOBAL(a) \ (IN6_IS_ADDR_MULTICAST(a) \ && ((((const uint8_t *) (a))[1] & 0xf) == 0xe)) #ifdef __USE_GNU struct cmsghdr; /* Forward declaration. */ /* IPv6 packet information. */ struct in6_pktinfo { struct in6_addr ipi6_addr; /* src/dst IPv6 address */ unsigned int ipi6_ifindex; /* send/recv interface index */ }; /* IPv6 MTU information. */ struct ip6_mtuinfo { struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */ uint32_t ip6m_mtu; /* path MTU in host byte order */ }; /* Obsolete hop-by-hop and Destination Options Processing (RFC 2292). */ extern int inet6_option_space (int __nbytes) __THROW __attribute_deprecated__; extern int inet6_option_init (void *__bp, struct cmsghdr **__cmsgp, int __type) __THROW __attribute_deprecated__; extern int inet6_option_append (struct cmsghdr *__cmsg, const uint8_t *__typep, int __multx, int __plusy) __THROW __attribute_deprecated__; extern uint8_t *inet6_option_alloc (struct cmsghdr *__cmsg, int __datalen, int __multx, int __plusy) __THROW __attribute_deprecated__; extern int inet6_option_next (const struct cmsghdr *__cmsg, uint8_t **__tptrp) __THROW __attribute_deprecated__; extern int inet6_option_find (const struct cmsghdr *__cmsg, uint8_t **__tptrp, int __type) __THROW __attribute_deprecated__; /* Hop-by-Hop and Destination Options Processing (RFC 3542). */ extern int inet6_opt_init (void *__extbuf, socklen_t __extlen) __THROW; extern int inet6_opt_append (void *__extbuf, socklen_t __extlen, int __offset, uint8_t __type, socklen_t __len, uint8_t __align, void **__databufp) __THROW; extern int inet6_opt_finish (void *__extbuf, socklen_t __extlen, int __offset) __THROW; extern int inet6_opt_set_val (void *__databuf, int __offset, void *__val, socklen_t __vallen) __THROW; extern int inet6_opt_next (void *__extbuf, socklen_t __extlen, int __offset, uint8_t *__typep, socklen_t *__lenp, void **__databufp) __THROW; extern int inet6_opt_find (void *__extbuf, socklen_t __extlen, int __offset, uint8_t __type, socklen_t *__lenp, void **__databufp) __THROW; extern int inet6_opt_get_val (void *__databuf, int __offset, void *__val, socklen_t __vallen) __THROW; /* Routing Header Option (RFC 3542). */ extern socklen_t inet6_rth_space (int __type, int __segments) __THROW; extern void *inet6_rth_init (void *__bp, socklen_t __bp_len, int __type, int __segments) __THROW; extern int inet6_rth_add (void *__bp, const struct in6_addr *__addr) __THROW; extern int inet6_rth_reverse (const void *__in, void *__out) __THROW; extern int inet6_rth_segments (const void *__bp) __THROW; extern struct in6_addr *inet6_rth_getaddr (const void *__bp, int __index) __THROW; /* Multicast source filter support. */ /* Get IPv4 source filter. */ extern int getipv4sourcefilter (int __s, struct in_addr __interface_addr, struct in_addr __group, uint32_t *__fmode, uint32_t *__numsrc, struct in_addr *__slist) __THROW; /* Set IPv4 source filter. */ extern int setipv4sourcefilter (int __s, struct in_addr __interface_addr, struct in_addr __group, uint32_t __fmode, uint32_t __numsrc, const struct in_addr *__slist) __THROW; /* Get source filter. */ extern int getsourcefilter (int __s, uint32_t __interface_addr, const struct sockaddr *__group, socklen_t __grouplen, uint32_t *__fmode, uint32_t *__numsrc, struct sockaddr_storage *__slist) __THROW; /* Set source filter. */ extern int setsourcefilter (int __s, uint32_t __interface_addr, const struct sockaddr *__group, socklen_t __grouplen, uint32_t __fmode, uint32_t __numsrc, const struct sockaddr_storage *__slist) __THROW; #endif /* use GNU */ # 623 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 __END_DECLS #endif /* netinet/in.h */ # 627 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/in.h" 3 # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 1 3 /* Copyright (C) 1991,92,93,94,95,96,97,2002 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.5 Errors */ #ifndef _ERRNO_H /* The includer defined __need_Emath if he wants only the definitions of EDOM and ERANGE, and not everything else. */ #ifndef __need_Emath # define _ERRNO_H 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 3 # 29 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 3 #endif # 30 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 3 __BEGIN_DECLS /* Get the error number constants from the system-specific file. This file will test __need_Emath and _ERRNO_H. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/errno.h" 1 3 /* Error constants. Linux specific version. Copyright (C) 1996-1999, 2005, 2009, 2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifdef _ERRNO_H # undef EDOM # undef EILSEQ # undef ERANGE #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 24 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/errno.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/errno.h" 1 3 #ifndef _LINUX_ERRNO_H #define _LINUX_ERRNO_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 4 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/errno.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/errno.h" 1 3 #ifndef _ASM_POWERPC_ERRNO_H #define _ASM_POWERPC_ERRNO_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 4 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/errno.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm-generic/errno.h" 1 3 #ifndef _ASM_GENERIC_ERRNO_H #define _ASM_GENERIC_ERRNO_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 4 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm-generic/errno.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm-generic/errno-base.h" 1 3 #ifndef _ASM_GENERIC_ERRNO_BASE_H #define _ASM_GENERIC_ERRNO_BASE_H #define EPERM 1 /* Operation not permitted */ #define ENOENT 2 /* No such file or directory */ #define ESRCH 3 /* No such process */ #define EINTR 4 /* Interrupted system call */ #define EIO 5 /* I/O error */ #define ENXIO 6 /* No such device or address */ #define E2BIG 7 /* Argument list too long */ #define ENOEXEC 8 /* Exec format error */ #define EBADF 9 /* Bad file number */ #define ECHILD 10 /* No child processes */ #define EAGAIN 11 /* Try again */ #define ENOMEM 12 /* Out of memory */ #define EACCES 13 /* Permission denied */ #define EFAULT 14 /* Bad address */ #define ENOTBLK 15 /* Block device required */ #define EBUSY 16 /* Device or resource busy */ #define EEXIST 17 /* File exists */ #define EXDEV 18 /* Cross-device link */ #define ENODEV 19 /* No such device */ #define ENOTDIR 20 /* Not a directory */ #define EISDIR 21 /* Is a directory */ #define EINVAL 22 /* Invalid argument */ #define ENFILE 23 /* File table overflow */ #define EMFILE 24 /* Too many open files */ #define ENOTTY 25 /* Not a typewriter */ #define ETXTBSY 26 /* Text file busy */ #define EFBIG 27 /* File too large */ #define ENOSPC 28 /* No space left on device */ #define ESPIPE 29 /* Illegal seek */ #define EROFS 30 /* Read-only file system */ #define EMLINK 31 /* Too many links */ #define EPIPE 32 /* Broken pipe */ #define EDOM 33 /* Math argument out of domain of func */ #define ERANGE 34 /* Math result not representable */ #endif # 40 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm-generic/errno-base.h" 3 # 5 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm-generic/errno.h" 2 3 #define EDEADLK 35 /* Resource deadlock would occur */ #define ENAMETOOLONG 36 /* File name too long */ #define ENOLCK 37 /* No record locks available */ #define ENOSYS 38 /* Function not implemented */ #define ENOTEMPTY 39 /* Directory not empty */ #define ELOOP 40 /* Too many symbolic links encountered */ #define EWOULDBLOCK EAGAIN /* Operation would block */ #define ENOMSG 42 /* No message of desired type */ #define EIDRM 43 /* Identifier removed */ #define ECHRNG 44 /* Channel number out of range */ #define EL2NSYNC 45 /* Level 2 not synchronized */ #define EL3HLT 46 /* Level 3 halted */ #define EL3RST 47 /* Level 3 reset */ #define ELNRNG 48 /* Link number out of range */ #define EUNATCH 49 /* Protocol driver not attached */ #define ENOCSI 50 /* No CSI structure available */ #define EL2HLT 51 /* Level 2 halted */ #define EBADE 52 /* Invalid exchange */ #define EBADR 53 /* Invalid request descriptor */ #define EXFULL 54 /* Exchange full */ #define ENOANO 55 /* No anode */ #define EBADRQC 56 /* Invalid request code */ #define EBADSLT 57 /* Invalid slot */ #define EDEADLOCK EDEADLK #define EBFONT 59 /* Bad font file format */ #define ENOSTR 60 /* Device not a stream */ #define ENODATA 61 /* No data available */ #define ETIME 62 /* Timer expired */ #define ENOSR 63 /* Out of streams resources */ #define ENONET 64 /* Machine is not on the network */ #define ENOPKG 65 /* Package not installed */ #define EREMOTE 66 /* Object is remote */ #define ENOLINK 67 /* Link has been severed */ #define EADV 68 /* Advertise error */ #define ESRMNT 69 /* Srmount error */ #define ECOMM 70 /* Communication error on send */ #define EPROTO 71 /* Protocol error */ #define EMULTIHOP 72 /* Multihop attempted */ #define EDOTDOT 73 /* RFS specific error */ #define EBADMSG 74 /* Not a data message */ #define EOVERFLOW 75 /* Value too large for defined data type */ #define ENOTUNIQ 76 /* Name not unique on network */ #define EBADFD 77 /* File descriptor in bad state */ #define EREMCHG 78 /* Remote address changed */ #define ELIBACC 79 /* Can not access a needed shared library */ #define ELIBBAD 80 /* Accessing a corrupted shared library */ #define ELIBSCN 81 /* .lib section in a.out corrupted */ #define ELIBMAX 82 /* Attempting to link in too many shared libraries */ #define ELIBEXEC 83 /* Cannot exec a shared library directly */ #define EILSEQ 84 /* Illegal byte sequence */ #define ERESTART 85 /* Interrupted system call should be restarted */ #define ESTRPIPE 86 /* Streams pipe error */ #define EUSERS 87 /* Too many users */ #define ENOTSOCK 88 /* Socket operation on non-socket */ #define EDESTADDRREQ 89 /* Destination address required */ #define EMSGSIZE 90 /* Message too long */ #define EPROTOTYPE 91 /* Protocol wrong type for socket */ #define ENOPROTOOPT 92 /* Protocol not available */ #define EPROTONOSUPPORT 93 /* Protocol not supported */ #define ESOCKTNOSUPPORT 94 /* Socket type not supported */ #define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ #define EPFNOSUPPORT 96 /* Protocol family not supported */ #define EAFNOSUPPORT 97 /* Address family not supported by protocol */ #define EADDRINUSE 98 /* Address already in use */ #define EADDRNOTAVAIL 99 /* Cannot assign requested address */ #define ENETDOWN 100 /* Network is down */ #define ENETUNREACH 101 /* Network is unreachable */ #define ENETRESET 102 /* Network dropped connection because of reset */ #define ECONNABORTED 103 /* Software caused connection abort */ #define ECONNRESET 104 /* Connection reset by peer */ #define ENOBUFS 105 /* No buffer space available */ #define EISCONN 106 /* Transport endpoint is already connected */ #define ENOTCONN 107 /* Transport endpoint is not connected */ #define ESHUTDOWN 108 /* Cannot send after transport endpoint shutdown */ #define ETOOMANYREFS 109 /* Too many references: cannot splice */ #define ETIMEDOUT 110 /* Connection timed out */ #define ECONNREFUSED 111 /* Connection refused */ #define EHOSTDOWN 112 /* Host is down */ #define EHOSTUNREACH 113 /* No route to host */ #define EALREADY 114 /* Operation already in progress */ #define EINPROGRESS 115 /* Operation now in progress */ #define ESTALE 116 /* Stale NFS file handle */ #define EUCLEAN 117 /* Structure needs cleaning */ #define ENOTNAM 118 /* Not a XENIX named type file */ #define ENAVAIL 119 /* No XENIX semaphores available */ #define EISNAM 120 /* Is a named type file */ #define EREMOTEIO 121 /* Remote I/O error */ #define EDQUOT 122 /* Quota exceeded */ #define ENOMEDIUM 123 /* No medium found */ #define EMEDIUMTYPE 124 /* Wrong medium type */ #define ECANCELED 125 /* Operation Canceled */ #define ENOKEY 126 /* Required key not available */ #define EKEYEXPIRED 127 /* Key has expired */ #define EKEYREVOKED 128 /* Key has been revoked */ #define EKEYREJECTED 129 /* Key was rejected by service */ /* for robust mutexes */ #define EOWNERDEAD 130 /* Owner died */ #define ENOTRECOVERABLE 131 /* State not recoverable */ #define ERFKILL 132 /* Operation not possible due to RF-kill */ #define EHWPOISON 133 /* Memory page has hardware error */ #endif # 114 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm-generic/errno.h" 3 # 5 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/errno.h" 2 3 #undef EDEADLOCK #define EDEADLOCK 58 /* File locking deadlock error */ #define _LAST_ERRNO 516 #endif /* _ASM_POWERPC_ERRNO_H */ # 12 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/asm/errno.h" 3 # 5 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/errno.h" 2 3 #endif # 8 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/linux/errno.h" 3 # 25 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/errno.h" 2 3 /* Linux has no ENOTSUP error code. */ # define ENOTSUP EOPNOTSUPP /* Older Linux versions also had no ECANCELED error code. */ # ifndef ECANCELED # define ECANCELED 125 # endif # 33 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/errno.h" 3 /* Support for error codes to support robust mutexes was added later, too. */ # ifndef EOWNERDEAD # define EOWNERDEAD 130 # define ENOTRECOVERABLE 131 # endif # 39 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/errno.h" 3 # ifndef ERFKILL # define ERFKILL 132 # endif # 43 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/errno.h" 3 # ifndef EHWPOISON # define EHWPOISON 133 # endif # 47 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/errno.h" 3 # ifndef __ASSEMBLER__ /* Function to get address of global `errno' variable. */ extern int *__errno_location (void) __THROW __attribute__ ((__const__)); # if !defined _LIBC || defined _LIBC_REENTRANT /* When using threads, errno is a per-thread value. */ # define errno (*__errno_location ()) # endif # 56 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/errno.h" 3 # endif /* !__ASSEMBLER__ */ # 57 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/errno.h" 3 #endif /* _ERRNO_H */ # 58 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/errno.h" 3 #if !defined _ERRNO_H && defined __need_Emath /* This is ugly but the kernel header is not clean enough. We must define only the values EDOM, EILSEQ and ERANGE in case __need_Emath is defined. */ # define EDOM 33 /* Math argument out of domain of function. */ # define EILSEQ 84 /* Illegal byte sequence. */ # define ERANGE 34 /* Math result not representable. */ #endif /* !_ERRNO_H && __need_Emath */ # 67 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/errno.h" 3 # 36 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 2 3 #undef __need_Emath #ifdef _ERRNO_H /* Declare the `errno' variable, unless it's defined as a macro by bits/errno.h. This is the case in GNU, where it is a per-thread variable. This redeclaration using the macro still works, but it will be a function declaration without a prototype and may trigger a -Wstrict-prototypes warning. */ #ifndef errno extern int errno; #endif # 48 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 3 #ifdef __USE_GNU /* The full and simple forms of the name with which the program was invoked. These variables are set up automatically at startup based on the value of ARGV[0] (this works only if you use GNU ld). */ extern char *program_invocation_name, *program_invocation_short_name; #endif /* __USE_GNU */ # 56 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 3 #endif /* _ERRNO_H */ # 57 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 3 __END_DECLS #endif /* _ERRNO_H */ # 61 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 3 /* The Hurd defines `error_t' as an enumerated type so that printing `error_t' values in the debugger shows the names. We might need this definition sometimes even if this file was included before. */ #if defined __USE_GNU || defined __need_error_t # ifndef __error_t_defined typedef int error_t; # define __error_t_defined 1 # endif # 71 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 3 # undef __need_error_t #endif # 73 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 3 # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/tcp.h" 1 3 /* * Copyright (c) 1982, 1986, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * @(#)tcp.h 8.1 (Berkeley) 6/10/93 */ #ifndef _NETINET_TCP_H #define _NETINET_TCP_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/tcp.h" 3 # 36 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/tcp.h" 3 /* * User-settable options (used with setsockopt). */ #define TCP_NODELAY 1 /* Don't delay send to coalesce packets */ #define TCP_MAXSEG 2 /* Set maximum segment size */ #define TCP_CORK 3 /* Control sending of partial frames */ #define TCP_KEEPIDLE 4 /* Start keeplives after this period */ #define TCP_KEEPINTVL 5 /* Interval between keepalives */ #define TCP_KEEPCNT 6 /* Number of keepalives before death */ #define TCP_SYNCNT 7 /* Number of SYN retransmits */ #define TCP_LINGER2 8 /* Life time of orphaned FIN-WAIT-2 state */ #define TCP_DEFER_ACCEPT 9 /* Wake up listener only when data arrive */ #define TCP_WINDOW_CLAMP 10 /* Bound advertised window */ #define TCP_INFO 11 /* Information about this connection. */ #define TCP_QUICKACK 12 /* Bock/reenable quick ACKs. */ #define TCP_CONGESTION 13 /* Congestion control algorithm. */ #define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */ #ifdef __USE_MISC #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 56 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/tcp.h" 3 # 57 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/tcp.h" 3 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 57 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/tcp.h" 3 # 58 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/tcp.h" 3 # ifdef __FAVOR_BSD typedef u_int32_t tcp_seq; /* * TCP header. * Per RFC 793, September, 1981. */ struct tcphdr { u_int16_t th_sport; /* source port */ u_int16_t th_dport; /* destination port */ tcp_seq th_seq; /* sequence number */ tcp_seq th_ack; /* acknowledgement number */ # if __BYTE_ORDER == __LITTLE_ENDIAN u_int8_t th_x2:4; /* (unused) */ u_int8_t th_off:4; /* data offset */ # endif # 75 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/tcp.h" 3 # if __BYTE_ORDER == __BIG_ENDIAN u_int8_t th_off:4; /* data offset */ u_int8_t th_x2:4; /* (unused) */ # endif # 79 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/tcp.h" 3 u_int8_t th_flags; # define TH_FIN 0x01 # define TH_SYN 0x02 # define TH_RST 0x04 # define TH_PUSH 0x08 # define TH_ACK 0x10 # define TH_URG 0x20 u_int16_t th_win; /* window */ u_int16_t th_sum; /* checksum */ u_int16_t th_urp; /* urgent pointer */ }; # else /* !__FAVOR_BSD */ # 92 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/tcp.h" 3 struct tcphdr { u_int16_t source; u_int16_t dest; u_int32_t seq; u_int32_t ack_seq; # if __BYTE_ORDER == __LITTLE_ENDIAN u_int16_t res1:4; u_int16_t doff:4; u_int16_t fin:1; u_int16_t syn:1; u_int16_t rst:1; u_int16_t psh:1; u_int16_t ack:1; u_int16_t urg:1; u_int16_t res2:2; # elif __BYTE_ORDER == __BIG_ENDIAN # 109 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/tcp.h" 3 u_int16_t doff:4; u_int16_t res1:4; u_int16_t res2:2; u_int16_t urg:1; u_int16_t ack:1; u_int16_t psh:1; u_int16_t rst:1; u_int16_t syn:1; u_int16_t fin:1; # else # 119 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/tcp.h" 3 # error "Adjust your defines" # endif # 121 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/tcp.h" 3 u_int16_t window; u_int16_t check; u_int16_t urg_ptr; }; # endif /* __FAVOR_BSD */ # 126 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/tcp.h" 3 enum { TCP_ESTABLISHED = 1, TCP_SYN_SENT, TCP_SYN_RECV, TCP_FIN_WAIT1, TCP_FIN_WAIT2, TCP_TIME_WAIT, TCP_CLOSE, TCP_CLOSE_WAIT, TCP_LAST_ACK, TCP_LISTEN, TCP_CLOSING /* now a valid state */ }; # define TCPOPT_EOL 0 # define TCPOPT_NOP 1 # define TCPOPT_MAXSEG 2 # define TCPOLEN_MAXSEG 4 # define TCPOPT_WINDOW 3 # define TCPOLEN_WINDOW 3 # define TCPOPT_SACK_PERMITTED 4 /* Experimental */ # define TCPOLEN_SACK_PERMITTED 2 # define TCPOPT_SACK 5 /* Experimental */ # define TCPOPT_TIMESTAMP 8 # define TCPOLEN_TIMESTAMP 10 # define TCPOLEN_TSTAMP_APPA (TCPOLEN_TIMESTAMP+2) /* appendix A */ # define TCPOPT_TSTAMP_HDR \ (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP) /* * Default maximum segment size for TCP. * With an IP MSS of 576, this is 536, * but 512 is probably more convenient. * This should be defined as MIN(512, IP_MSS - sizeof (struct tcpiphdr)). */ # define TCP_MSS 512 # define TCP_MAXWIN 65535 /* largest value for (unscaled) window */ # define TCP_MAX_WINSHIFT 14 /* maximum window shift */ # define SOL_TCP 6 /* TCP level */ # define TCPI_OPT_TIMESTAMPS 1 # define TCPI_OPT_SACK 2 # define TCPI_OPT_WSCALE 4 # define TCPI_OPT_ECN 8 /* Values for tcpi_state. */ enum tcp_ca_state { TCP_CA_Open = 0, TCP_CA_Disorder = 1, TCP_CA_CWR = 2, TCP_CA_Recovery = 3, TCP_CA_Loss = 4 }; struct tcp_info { u_int8_t tcpi_state; u_int8_t tcpi_ca_state; u_int8_t tcpi_retransmits; u_int8_t tcpi_probes; u_int8_t tcpi_backoff; u_int8_t tcpi_options; u_int8_t tcpi_snd_wscale : 4, tcpi_rcv_wscale : 4; u_int32_t tcpi_rto; u_int32_t tcpi_ato; u_int32_t tcpi_snd_mss; u_int32_t tcpi_rcv_mss; u_int32_t tcpi_unacked; u_int32_t tcpi_sacked; u_int32_t tcpi_lost; u_int32_t tcpi_retrans; u_int32_t tcpi_fackets; /* Times. */ u_int32_t tcpi_last_data_sent; u_int32_t tcpi_last_ack_sent; /* Not remembered, sorry. */ u_int32_t tcpi_last_data_recv; u_int32_t tcpi_last_ack_recv; /* Metrics. */ u_int32_t tcpi_pmtu; u_int32_t tcpi_rcv_ssthresh; u_int32_t tcpi_rtt; u_int32_t tcpi_rttvar; u_int32_t tcpi_snd_ssthresh; u_int32_t tcpi_snd_cwnd; u_int32_t tcpi_advmss; u_int32_t tcpi_reordering; u_int32_t tcpi_rcv_rtt; u_int32_t tcpi_rcv_space; u_int32_t tcpi_total_retrans; }; /* For TCP_MD5SIG socket option. */ #define TCP_MD5SIG_MAXKEYLEN 80 struct tcp_md5sig { struct sockaddr_storage tcpm_addr; /* Address associated. */ u_int16_t __tcpm_pad1; /* Zero. */ u_int16_t tcpm_keylen; /* Key length. */ u_int32_t __tcpm_pad2; /* Zero. */ u_int8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* Key (binary). */ }; #endif /* Misc. */ # 245 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/tcp.h" 3 #endif /* netinet/tcp.h */ # 247 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netinet/tcp.h" 3 # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 1 3 /* Copyright (C) 1996-2004, 2009-2011, 2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* All data returned by the network data base library are supplied in host order and returned in network order (suitable for use in system calls). */ #ifndef _NETDB_H #define _NETDB_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 25 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 # 29 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 #ifdef __USE_MISC /* This is necessary to make this include file properly replace the Sun version. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 32 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/rpc/netdb.h" 1 3 /* @(#)netdb.h 2.1 88/07/29 3.9 RPCSRC */ /* * Copyright (c) 2010, Oracle America, Inc. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials * provided with the distribution. * * Neither the name of the "Oracle America, Inc." nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Cleaned up for GNU C library roland@gnu.ai.mit.edu: added multiple inclusion protection and use of . In GNU this file is #include'd by . */ #ifndef _RPC_NETDB_H #define _RPC_NETDB_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/rpc/netdb.h" 3 # 40 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/rpc/netdb.h" 3 #define __need_size_t #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 42 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/rpc/netdb.h" 3 # 1 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 1 3 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) /* Always define miscellaneous pieces when modules are available. */ #if !__has_feature(modules) #define __STDDEF_H #endif # 37 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 44 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_ptrdiff_t) #if !defined(_PTRDIFF_T) || __has_feature(modules) /* Always define ptrdiff_t when modules are available. */ #if !__has_feature(modules) #define _PTRDIFF_T #endif # 51 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 53 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 55 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_size_t) #if !defined(_SIZE_T) || __has_feature(modules) /* Always define size_t when modules are available. */ #if !__has_feature(modules) #define _SIZE_T #endif # 62 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ size_t; #endif # 64 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_size_t #endif /*defined(__need_size_t) */ # 66 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) /* Always define rsize_t when modules are available. */ #if !__has_feature(modules) #define _RSIZE_T #endif # 76 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ rsize_t; #endif # 78 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif /* defined(__need_STDDEF_H_misc) */ # 79 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_wchar_t) #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if !defined(_WCHAR_T) || __has_feature(modules) #if !__has_feature(modules) #define _WCHAR_T #if defined(_MSC_EXTENSIONS) #define _WCHAR_T_DEFINED #endif # 89 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 90 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WCHAR_TYPE__ wchar_t; #endif # 92 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 93 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 95 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_NULL) #undef NULL #ifdef __cplusplus # if !defined(__MINGW32__) && !defined(_MSC_VER) # define NULL __null # else # 102 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL 0 # endif # 104 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #else # 105 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL ((void*)0) #endif # 107 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #ifdef __cplusplus #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 112 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 113 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_NULL #endif /* defined(__need_NULL) */ # 115 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 118 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 119 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 120 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 123 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if defined(__need_wint_t) /* Always define wint_t when modules are available. */ #if !defined(_WINT_T) || __has_feature(modules) #if !__has_feature(modules) #define _WINT_T #endif # 132 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WINT_TYPE__ wint_t; #endif # 134 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wint_t #endif /* __need_wint_t */ # 136 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 138 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 43 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/rpc/netdb.h" 2 3 __BEGIN_DECLS struct rpcent { char *r_name; /* Name of server for this rpc program. */ char **r_aliases; /* Alias list. */ int r_number; /* RPC program number. */ }; extern void setrpcent (int __stayopen) __THROW; extern void endrpcent (void) __THROW; extern struct rpcent *getrpcbyname (const char *__name) __THROW; extern struct rpcent *getrpcbynumber (int __number) __THROW; extern struct rpcent *getrpcent (void) __THROW; #ifdef __USE_MISC extern int getrpcbyname_r (const char *__name, struct rpcent *__result_buf, char *__buffer, size_t __buflen, struct rpcent **__result) __THROW; extern int getrpcbynumber_r (int __number, struct rpcent *__result_buf, char *__buffer, size_t __buflen, struct rpcent **__result) __THROW; extern int getrpcent_r (struct rpcent *__result_buf, char *__buffer, size_t __buflen, struct rpcent **__result) __THROW; #endif # 71 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/rpc/netdb.h" 3 __END_DECLS #endif /* rpc/netdb.h */ # 75 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/rpc/netdb.h" 3 # 33 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 2 3 #endif # 34 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 #ifdef __USE_GNU # define __need_sigevent_t #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 37 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 # 38 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 # define __need_timespec #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 39 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 # 40 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 #endif # 41 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 42 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/netdb.h" 1 3 /* Copyright (C) 1996, 1997, 1998, 1999, 2000 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _NETDB_H # error "Never include directly; use instead." #endif # 21 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/netdb.h" 3 /* Description of data base entry for a single network. NOTE: here a poor assumption is made. The network number is expected to fit into an unsigned long int variable. */ struct netent { char *n_name; /* Official name of network. */ char **n_aliases; /* Alias list. */ int n_addrtype; /* Net address type. */ uint32_t n_net; /* Network number. */ }; # 43 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 2 3 /* Absolute file name for network data base files. */ #define _PATH_HEQUIV "/etc/hosts.equiv" #define _PATH_HOSTS "/etc/hosts" #define _PATH_NETWORKS "/etc/networks" #define _PATH_NSSWITCH_CONF "/etc/nsswitch.conf" #define _PATH_PROTOCOLS "/etc/protocols" #define _PATH_SERVICES "/etc/services" __BEGIN_DECLS #if defined __USE_MISC || !defined __USE_XOPEN2K8 /* Error status for non-reentrant lookup functions. We use a macro to access always the thread-specific `h_errno' variable. */ # define h_errno (*__h_errno_location ()) /* Function to get address of global `h_errno' variable. */ extern int *__h_errno_location (void) __THROW __attribute__ ((__const__)); /* Possible values left in `h_errno'. */ # define HOST_NOT_FOUND 1 /* Authoritative Answer Host not found. */ # define TRY_AGAIN 2 /* Non-Authoritative Host not found, or SERVERFAIL. */ # define NO_RECOVERY 3 /* Non recoverable errors, FORMERR, REFUSED, NOTIMP. */ # define NO_DATA 4 /* Valid name, no data record of requested type. */ #endif # 73 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 #if defined __USE_MISC || defined __USE_GNU # define NETDB_INTERNAL -1 /* See errno. */ # define NETDB_SUCCESS 0 /* No problem. */ # define NO_ADDRESS NO_DATA /* No address, look for MX record. */ #endif # 78 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 #if defined __USE_XOPEN2K || defined __USE_XOPEN_EXTENDED /* Highest reserved Internet port number. */ # define IPPORT_RESERVED 1024 #endif # 83 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 #ifdef __USE_GNU /* Scope delimiter for getaddrinfo(), getnameinfo(). */ # define SCOPE_DELIMITER '%' #endif # 88 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 #ifdef __USE_MISC /* Print error indicated by `h_errno' variable on standard error. STR if non-null is printed before the error string. */ extern void herror (const char *__str) __THROW; /* Return string associated with error ERR_NUM. */ extern const char *hstrerror (int __err_num) __THROW; #endif # 97 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 /* Description of data base entry for a single host. */ struct hostent { char *h_name; /* Official name of host. */ char **h_aliases; /* Alias list. */ int h_addrtype; /* Host address type. */ int h_length; /* Length of address. */ char **h_addr_list; /* List of addresses from name server. */ #if defined __USE_MISC || defined __USE_GNU # define h_addr h_addr_list[0] /* Address, for backward compatibility.*/ #endif # 110 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 }; /* Open host data base files and mark them as staying open even after a later search if STAY_OPEN is non-zero. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void sethostent (int __stay_open); /* Close host data base files and clear `stay open' flag. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void endhostent (void); /* Get next entry from host data base file. Open data base if necessary. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct hostent *gethostent (void); /* Return entry from host data base which address match ADDR with length LEN and type TYPE. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct hostent *gethostbyaddr (const void *__addr, __socklen_t __len, int __type); /* Return entry from host data base for host with NAME. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct hostent *gethostbyname (const char *__name); #ifdef __USE_MISC /* Return entry from host data base for host with NAME. AF must be set to the address type which is `AF_INET' for IPv4 or `AF_INET6' for IPv6. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern struct hostent *gethostbyname2 (const char *__name, int __af); /* Reentrant versions of the functions above. The additional arguments specify a buffer of BUFLEN starting at BUF. The last argument is a pointer to a variable which gets the value which would be stored in the global variable `herrno' by the non-reentrant functions. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern int gethostent_r (struct hostent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct hostent **__restrict __result, int *__restrict __h_errnop); extern int gethostbyaddr_r (const void *__restrict __addr, __socklen_t __len, int __type, struct hostent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct hostent **__restrict __result, int *__restrict __h_errnop); extern int gethostbyname_r (const char *__restrict __name, struct hostent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct hostent **__restrict __result, int *__restrict __h_errnop); extern int gethostbyname2_r (const char *__restrict __name, int __af, struct hostent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct hostent **__restrict __result, int *__restrict __h_errnop); #endif /* misc */ # 191 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 /* Open network data base files and mark them as staying open even after a later search if STAY_OPEN is non-zero. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void setnetent (int __stay_open); /* Close network data base files and clear `stay open' flag. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void endnetent (void); /* Get next entry from network data base file. Open data base if necessary. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct netent *getnetent (void); /* Return entry from network data base which address match NET and type TYPE. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct netent *getnetbyaddr (uint32_t __net, int __type); /* Return entry from network data base for network with NAME. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct netent *getnetbyname (const char *__name); #ifdef __USE_MISC /* Reentrant versions of the functions above. The additional arguments specify a buffer of BUFLEN starting at BUF. The last argument is a pointer to a variable which gets the value which would be stored in the global variable `herrno' by the non-reentrant functions. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern int getnetent_r (struct netent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct netent **__restrict __result, int *__restrict __h_errnop); extern int getnetbyaddr_r (uint32_t __net, int __type, struct netent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct netent **__restrict __result, int *__restrict __h_errnop); extern int getnetbyname_r (const char *__restrict __name, struct netent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct netent **__restrict __result, int *__restrict __h_errnop); #endif /* misc */ # 254 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 /* Description of data base entry for a single service. */ struct servent { char *s_name; /* Official service name. */ char **s_aliases; /* Alias list. */ int s_port; /* Port number. */ char *s_proto; /* Protocol to use. */ }; /* Open service data base files and mark them as staying open even after a later search if STAY_OPEN is non-zero. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void setservent (int __stay_open); /* Close service data base files and clear `stay open' flag. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void endservent (void); /* Get next entry from service data base file. Open data base if necessary. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct servent *getservent (void); /* Return entry from network data base for network with NAME and protocol PROTO. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct servent *getservbyname (const char *__name, const char *__proto); /* Return entry from service data base which matches port PORT and protocol PROTO. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct servent *getservbyport (int __port, const char *__proto); #ifdef __USE_MISC /* Reentrant versions of the functions above. The additional arguments specify a buffer of BUFLEN starting at BUF. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern int getservent_r (struct servent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct servent **__restrict __result); extern int getservbyname_r (const char *__restrict __name, const char *__restrict __proto, struct servent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct servent **__restrict __result); extern int getservbyport_r (int __port, const char *__restrict __proto, struct servent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct servent **__restrict __result); #endif /* misc */ # 323 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 /* Description of data base entry for a single service. */ struct protoent { char *p_name; /* Official protocol name. */ char **p_aliases; /* Alias list. */ int p_proto; /* Protocol number. */ }; /* Open protocol data base files and mark them as staying open even after a later search if STAY_OPEN is non-zero. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void setprotoent (int __stay_open); /* Close protocol data base files and clear `stay open' flag. This function is a possible cancellation point and therefore not marked with __THROW. */ extern void endprotoent (void); /* Get next entry from protocol data base file. Open data base if necessary. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct protoent *getprotoent (void); /* Return entry from protocol data base for network with NAME. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct protoent *getprotobyname (const char *__name); /* Return entry from protocol data base which number is PROTO. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct protoent *getprotobynumber (int __proto); #ifdef __USE_MISC /* Reentrant versions of the functions above. The additional arguments specify a buffer of BUFLEN starting at BUF. These functions are not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation they are cancellation points and therefore not marked with __THROW. */ extern int getprotoent_r (struct protoent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct protoent **__restrict __result); extern int getprotobyname_r (const char *__restrict __name, struct protoent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct protoent **__restrict __result); extern int getprotobynumber_r (int __proto, struct protoent *__restrict __result_buf, char *__restrict __buf, size_t __buflen, struct protoent **__restrict __result); /* Establish network group NETGROUP for enumeration. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int setnetgrent (const char *__netgroup); /* Free all space allocated by previous `setnetgrent' call. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern void endnetgrent (void); /* Get next member of netgroup established by last `setnetgrent' call and return pointers to elements in HOSTP, USERP, and DOMAINP. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int getnetgrent (char **__restrict __hostp, char **__restrict __userp, char **__restrict __domainp); /* Test whether NETGROUP contains the triple (HOST,USER,DOMAIN). This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int innetgr (const char *__netgroup, const char *__host, const char *__user, const char *__domain); /* Reentrant version of `getnetgrent' where result is placed in BUFFER. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int getnetgrent_r (char **__restrict __hostp, char **__restrict __userp, char **__restrict __domainp, char *__restrict __buffer, size_t __buflen); #endif /* misc */ # 437 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 #ifdef __USE_BSD /* Call `rshd' at port RPORT on remote machine *AHOST to execute CMD. The local user is LOCUSER, on the remote machine the command is executed as REMUSER. In *FD2P the descriptor to the socket for the connection is returned. The caller must have the right to use a reserved port. When the function returns *AHOST contains the official host name. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int rcmd (char **__restrict __ahost, unsigned short int __rport, const char *__restrict __locuser, const char *__restrict __remuser, const char *__restrict __cmd, int *__restrict __fd2p); /* This is the equivalent function where the protocol can be selected and which therefore can be used for IPv6. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int rcmd_af (char **__restrict __ahost, unsigned short int __rport, const char *__restrict __locuser, const char *__restrict __remuser, const char *__restrict __cmd, int *__restrict __fd2p, sa_family_t __af); /* Call `rexecd' at port RPORT on remote machine *AHOST to execute CMD. The process runs at the remote machine using the ID of user NAME whose cleartext password is PASSWD. In *FD2P the descriptor to the socket for the connection is returned. When the function returns *AHOST contains the official host name. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int rexec (char **__restrict __ahost, int __rport, const char *__restrict __name, const char *__restrict __pass, const char *__restrict __cmd, int *__restrict __fd2p); /* This is the equivalent function where the protocol can be selected and which therefore can be used for IPv6. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int rexec_af (char **__restrict __ahost, int __rport, const char *__restrict __name, const char *__restrict __pass, const char *__restrict __cmd, int *__restrict __fd2p, sa_family_t __af); /* Check whether user REMUSER on system RHOST is allowed to login as LOCUSER. If SUSER is not zero the user tries to become superuser. Return 0 if it is possible. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int ruserok (const char *__rhost, int __suser, const char *__remuser, const char *__locuser); /* This is the equivalent function where the protocol can be selected and which therefore can be used for IPv6. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int ruserok_af (const char *__rhost, int __suser, const char *__remuser, const char *__locuser, sa_family_t __af); /* Check whether user REMUSER on system indicated by IPv4 address RADDR is allowed to login as LOCUSER. Non-IPv4 (e.g., IPv6) are not supported. If SUSER is not zero the user tries to become superuser. Return 0 if it is possible. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int iruserok (uint32_t __raddr, int __suser, const char *__remuser, const char *__locuser); /* This is the equivalent function where the pfamiliy if the address pointed to by RADDR is determined by the value of AF. It therefore can be used for IPv6 This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int iruserok_af (const void *__raddr, int __suser, const char *__remuser, const char *__locuser, sa_family_t __af); /* Try to allocate reserved port, returning a descriptor for a socket opened at this port or -1 if unsuccessful. The search for an available port will start at ALPORT and continues with lower numbers. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int rresvport (int *__alport); /* This is the equivalent function where the protocol can be selected and which therefore can be used for IPv6. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int rresvport_af (int *__alport, sa_family_t __af); #endif # 562 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 /* Extension from POSIX.1g. */ #ifdef __USE_POSIX /* Structure to contain information about address of a service provider. */ struct addrinfo { int ai_flags; /* Input flags. */ int ai_family; /* Protocol family for socket. */ int ai_socktype; /* Socket type. */ int ai_protocol; /* Protocol for socket. */ socklen_t ai_addrlen; /* Length of socket address. */ struct sockaddr *ai_addr; /* Socket address for socket. */ char *ai_canonname; /* Canonical name for service location. */ struct addrinfo *ai_next; /* Pointer to next in list. */ }; # ifdef __USE_GNU /* Structure used as control block for asynchronous lookup. */ struct gaicb { const char *ar_name; /* Name to look up. */ const char *ar_service; /* Service name. */ const struct addrinfo *ar_request; /* Additional request specification. */ struct addrinfo *ar_result; /* Pointer to result. */ /* The following are internal elements. */ int __return; int __unused[5]; }; /* Lookup mode. */ # define GAI_WAIT 0 # define GAI_NOWAIT 1 # endif # 596 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 /* Possible values for `ai_flags' field in `addrinfo' structure. */ # define AI_PASSIVE 0x0001 /* Socket address is intended for `bind'. */ # define AI_CANONNAME 0x0002 /* Request for canonical name. */ # define AI_NUMERICHOST 0x0004 /* Don't use name resolution. */ # define AI_V4MAPPED 0x0008 /* IPv4 mapped addresses are acceptable. */ # define AI_ALL 0x0010 /* Return IPv4 mapped and IPv6 addresses. */ # define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose returned address type.. */ # ifdef __USE_GNU # define AI_IDN 0x0040 /* IDN encode input (assuming it is encoded in the current locale's character set) before looking it up. */ # define AI_CANONIDN 0x0080 /* Translate canonical name from IDN format. */ # define AI_IDN_ALLOW_UNASSIGNED 0x0100 /* Don't reject unassigned Unicode code points. */ # define AI_IDN_USE_STD3_ASCII_RULES 0x0200 /* Validate strings according to STD3 rules. */ # endif # 615 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 # define AI_NUMERICSERV 0x0400 /* Don't use name resolution. */ /* Error values for `getaddrinfo' function. */ # define EAI_BADFLAGS -1 /* Invalid value for `ai_flags' field. */ # define EAI_NONAME -2 /* NAME or SERVICE is unknown. */ # define EAI_AGAIN -3 /* Temporary failure in name resolution. */ # define EAI_FAIL -4 /* Non-recoverable failure in name res. */ # define EAI_FAMILY -6 /* `ai_family' not supported. */ # define EAI_SOCKTYPE -7 /* `ai_socktype' not supported. */ # define EAI_SERVICE -8 /* SERVICE not supported for `ai_socktype'. */ # define EAI_MEMORY -10 /* Memory allocation failure. */ # define EAI_SYSTEM -11 /* System error returned in `errno'. */ # define EAI_OVERFLOW -12 /* Argument buffer overflow. */ # ifdef __USE_GNU # define EAI_NODATA -5 /* No address associated with NAME. */ # define EAI_ADDRFAMILY -9 /* Address family for NAME not supported. */ # define EAI_INPROGRESS -100 /* Processing request in progress. */ # define EAI_CANCELED -101 /* Request canceled. */ # define EAI_NOTCANCELED -102 /* Request not canceled. */ # define EAI_ALLDONE -103 /* All requests done. */ # define EAI_INTR -104 /* Interrupted by a signal. */ # define EAI_IDN_ENCODE -105 /* IDN encoding failed. */ # endif # 638 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 # ifdef __USE_MISC # define NI_MAXHOST 1025 # define NI_MAXSERV 32 # endif # 643 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 # define NI_NUMERICHOST 1 /* Don't try to look up hostname. */ # define NI_NUMERICSERV 2 /* Don't convert port number to name. */ # define NI_NOFQDN 4 /* Only return nodename portion. */ # define NI_NAMEREQD 8 /* Don't return numeric addresses. */ # define NI_DGRAM 16 /* Look up UDP service rather than TCP. */ # ifdef __USE_GNU # define NI_IDN 32 /* Convert name from IDN format. */ # define NI_IDN_ALLOW_UNASSIGNED 64 /* Don't reject unassigned Unicode code points. */ # define NI_IDN_USE_STD3_ASCII_RULES 128 /* Validate strings according to STD3 rules. */ # endif # 656 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 /* Translate name of a service location and/or a service name to set of socket addresses. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int getaddrinfo (const char *__restrict __name, const char *__restrict __service, const struct addrinfo *__restrict __req, struct addrinfo **__restrict __pai); /* Free `addrinfo' structure AI including associated storage. */ extern void freeaddrinfo (struct addrinfo *__ai) __THROW; /* Convert error return from getaddrinfo() to a string. */ extern const char *gai_strerror (int __ecode) __THROW; /* Translate a socket address to a location and service name. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int getnameinfo (const struct sockaddr *__restrict __sa, socklen_t __salen, char *__restrict __host, socklen_t __hostlen, char *__restrict __serv, socklen_t __servlen, int __flags); #endif /* POSIX */ # 682 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 #ifdef __USE_GNU /* Enqueue ENT requests from the LIST. If MODE is GAI_WAIT wait until all requests are handled. If WAIT is GAI_NOWAIT return immediately after queueing the requests and signal completion according to SIG. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int getaddrinfo_a (int __mode, struct gaicb *__list[__restrict_arr], int __ent, struct sigevent *__restrict __sig); /* Suspend execution of the thread until at least one of the ENT requests in LIST is handled. If TIMEOUT is not a null pointer it specifies the longest time the function keeps waiting before returning with an error. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int gai_suspend (const struct gaicb *const __list[], int __ent, const struct timespec *__timeout); /* Get the error status of the request REQ. */ extern int gai_error (struct gaicb *__req) __THROW; /* Cancel the requests associated with GAICBP. */ extern int gai_cancel (struct gaicb *__gaicbp) __THROW; #endif /* GNU */ # 712 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 __END_DECLS #endif /* netdb.h */ # 716 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/netdb.h" 3 # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 1 3 /* Copyright (C) 1991, 1992, 1996, 1997, 1998, 1999, 2000, 2005 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types */ #ifndef _LIBC_LIMITS_H_ #define _LIBC_LIMITS_H_ 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 /* Maximum length of any multibyte character in any locale. We define this value here since the gcc header does not define the correct value. */ #define MB_LEN_MAX 16 /* If we are not using GNU CC we have to define all the symbols ourself. Otherwise use gcc's definitions (see below). */ #if !defined __GNUC__ || __GNUC__ < 2 /* We only protect from multiple inclusion here, because all the other #include's protect themselves, and in GCC 2 we may #include_next through multiple copies of this file before we get to GCC's. */ # ifndef _LIMITS_H # define _LIMITS_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 45 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 46 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 /* We don't have #include_next. Define ANSI for standard 32-bit words. */ /* These assume 8-bit `char's, 16-bit `short int's, and 32-bit `int's and `long int's. */ /* Number of bits in a `char'. */ # define CHAR_BIT 8 /* Minimum and maximum values a `signed char' can hold. */ # define SCHAR_MIN (-128) # define SCHAR_MAX 127 /* Maximum value an `unsigned char' can hold. (Minimum is 0.) */ # define UCHAR_MAX 255 /* Minimum and maximum values a `char' can hold. */ # ifdef __CHAR_UNSIGNED__ # define CHAR_MIN 0 # define CHAR_MAX UCHAR_MAX # else # 68 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # define CHAR_MIN SCHAR_MIN # define CHAR_MAX SCHAR_MAX # endif # 71 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 /* Minimum and maximum values a `signed short int' can hold. */ # define SHRT_MIN (-32768) # define SHRT_MAX 32767 /* Maximum value an `unsigned short int' can hold. (Minimum is 0.) */ # define USHRT_MAX 65535 /* Minimum and maximum values a `signed int' can hold. */ # define INT_MIN (-INT_MAX - 1) # define INT_MAX 2147483647 /* Maximum value an `unsigned int' can hold. (Minimum is 0.) */ # define UINT_MAX 4294967295U /* Minimum and maximum values a `signed long int' can hold. */ # if __WORDSIZE == 64 # define LONG_MAX 9223372036854775807L # else # 90 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # define LONG_MAX 2147483647L # endif # 92 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # define LONG_MIN (-LONG_MAX - 1L) /* Maximum value an `unsigned long int' can hold. (Minimum is 0.) */ # if __WORDSIZE == 64 # define ULONG_MAX 18446744073709551615UL # else # 98 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # define ULONG_MAX 4294967295UL # endif # 100 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # ifdef __USE_ISOC99 /* Minimum and maximum values a `signed long long int' can hold. */ # define LLONG_MAX 9223372036854775807LL # define LLONG_MIN (-LLONG_MAX - 1LL) /* Maximum value an `unsigned long long int' can hold. (Minimum is 0.) */ # define ULLONG_MAX 18446744073709551615ULL # endif /* ISO C99 */ # 111 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # endif /* limits.h */ # 113 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif /* GCC 2. */ # 114 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif /* !_LIBC_LIMITS_H_ */ # 116 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 /* Get the compiler's limits.h, which defines almost all the ISO constants. We put this #include_next outside the double inclusion check because it should be possible to include this file more than once and still get the definitions from gcc's header. */ #if defined __GNUC__ && !defined _GCC_LIMITS_H_ /* `_GCC_LIMITS_H_' is what GCC's file defines. */ #if 0 /* expanded by -frewrite-includes */ # include_next #endif /* expanded by -frewrite-includes */ # 124 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 125 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif # 126 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 /* The files in some gcc versions don't define LLONG_MIN, LLONG_MAX, and ULLONG_MAX. Instead only the values gcc defined for ages are available. */ #if defined __USE_ISOC99 && defined __GNUC__ # ifndef LLONG_MIN # define LLONG_MIN (-LLONG_MAX-1) # endif # 134 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # ifndef LLONG_MAX # define LLONG_MAX __LONG_LONG_MAX__ # endif # 137 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # ifndef ULLONG_MAX # define ULLONG_MAX (LLONG_MAX * 2ULL + 1) # endif # 140 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif # 141 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #ifdef __USE_POSIX /* POSIX adds things to . */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 144 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 145 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif # 146 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #ifdef __USE_POSIX2 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 148 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 149 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif # 150 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #ifdef __USE_XOPEN #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 152 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 153 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif # 154 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" 2 #ifdef MPL_HAVE_SYS_TYPES_H #if 0 /* expanded by -frewrite-includes */ #include /* macs need sys/types.h before uio.h can be included */ #endif /* expanded by -frewrite-includes */ # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" # 22 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" #endif # 23 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" #ifdef MPL_HAVE_SYS_UIO_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 24 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" #endif # 26 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" #if !defined(MPL_HAVE_SYS_UIO_H) struct iovec; #endif # 30 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" /* *INDENT-ON* */ #if defined(__cplusplus) extern "C" { #endif # 35 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" /* *INDENT-OFF* */ ssize_t MPL_large_writev(int fd, const struct iovec *iov, int iovcnt); ssize_t MPL_large_readv(int fd, const struct iovec *iov, int iovcnt); /* *INDENT-ON* */ #if defined(__cplusplus) } #endif # 44 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" /* *INDENT-OFF* */ #endif /* !defined(MPL_SOCK_H_INCLUDED) */ # 47 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_sock.h" # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpl_msg.h" #endif /* expanded by -frewrite-includes */ # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_msg.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2005 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPL_MSG_H_INCLUDED) #define MPL_MSG_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpl.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_msg.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPL_H_INCLUDED) #define MPL_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpl_base.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" /* must come before mpltrmem.h */ #if 0 /* expanded by -frewrite-includes */ #include "mpl_valgrind.h" #endif /* expanded by -frewrite-includes */ # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_argstr.h" #endif /* expanded by -frewrite-includes */ # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_str.h" #endif /* expanded by -frewrite-includes */ # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_trmem.h" #endif /* expanded by -frewrite-includes */ # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_env.h" #endif /* expanded by -frewrite-includes */ # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_sock.h" #endif /* expanded by -frewrite-includes */ # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_msg.h" #endif /* expanded by -frewrite-includes */ # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_iov.h" #endif /* expanded by -frewrite-includes */ # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_bt.h" #endif /* expanded by -frewrite-includes */ # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_thread.h" #endif /* expanded by -frewrite-includes */ # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 22 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_timer.h" #endif /* expanded by -frewrite-includes */ # 22 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 23 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_yield.h" #endif /* expanded by -frewrite-includes */ # 23 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 24 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_dbg.h" #endif /* expanded by -frewrite-includes */ # 24 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_shm.h" #endif /* expanded by -frewrite-includes */ # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 26 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #endif /* !defined(MPL_H_INCLUDED) */ # 28 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_msg.h" 2 #if defined(MPL_HAVE_MACRO_VA_ARGS) #define MPL_error_printf(...) fprintf(stderr,__VA_ARGS__) #else # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_msg.h" #define MPL_error_printf printf #endif # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_msg.h" /* These routines are used to ensure that messages are sent to the * appropriate output and (eventually) are properly * internationalized */ int MPL_usage_printf(mpl_const char *str, ...) ATTRIBUTE((format(printf, 1, 2))); int MPL_msg_printf(mpl_const char *str, ...) ATTRIBUTE((format(printf, 1, 2))); int MPL_internal_error_printf(mpl_const char *str, ...) ATTRIBUTE((format(printf, 1, 2))); int MPL_internal_sys_error_printf(mpl_const char *, int, mpl_const char *str, ...) ATTRIBUTE((format(printf, 3, 4))); void MPL_exit(int); #endif /* !defined(MPL_MSG_H_INCLUDED) */ # 29 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_msg.h" # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpl_iov.h" #endif /* expanded by -frewrite-includes */ # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_iov.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPL_IOV_H_INCLUDED) #define MPL_IOV_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_iov.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_iov.h" /* IOVs */ /* The basic channel interface uses IOVs */ #ifdef MPL_HAVE_WINDOWS_H #define MPL_IOV_BUF_CAST char * #else # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_iov.h" #define MPL_IOV_BUF_CAST void * #endif # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_iov.h" #ifdef MPL_HAVE_WINDOWS_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_iov.h" # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_iov.h" #define MPL_IOV WSABUF #define MPL_IOV_LEN len #define MPL_IOV_BUF buf #else # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_iov.h" #ifdef MPL_HAVE_SYS_TYPES_H #if 0 /* expanded by -frewrite-includes */ #include /* macs need sys/types.h before uio.h can be included */ #endif /* expanded by -frewrite-includes */ # 26 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_iov.h" # 27 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_iov.h" #endif # 28 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_iov.h" #ifdef MPL_HAVE_SYS_UIO_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 29 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_iov.h" # 30 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_iov.h" #endif # 31 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_iov.h" #define MPL_IOV struct iovec #define MPL_IOV_LEN iov_len #define MPL_IOV_BUF iov_base #endif # 35 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_iov.h" /* FIXME: How is IOV_LIMIT chosen? */ #define MPL_IOV_LIMIT 16 #endif /* !defined(MPL_IOV_H_INCLUDED) */ # 39 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_iov.h" # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpl_bt.h" #endif /* expanded by -frewrite-includes */ # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_bt.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2015 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPL_BT_H_INCLUDED) #define MPL_BT_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mplconfig.h" #endif /* expanded by -frewrite-includes */ # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_bt.h" # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_bt.h" #if defined(__cplusplus) extern "C" { #endif # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_bt.h" #if !MPL_HAVE_DECL_BACKTRACE_CREATE_STATE struct backtrace_state; typedef void (*backtrace_error_callback)(void *data, const char *msg, int errnum); extern struct backtrace_state *backtrace_create_state( const char *filename, int threaded, backtrace_error_callback error_callback, void *data); #endif # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_bt.h" #if !MPL_HAVE_DECL_BACKTRACE_PRINT extern void backtrace_print(struct backtrace_state *state, int skip, FILE *); #endif # 28 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_bt.h" #define MPL_BACKTRACE_BUFFER_LEN 1024 #define MPL_MAX_TRACE_DEPTH 32 void MPL_backtrace_show(FILE *output); #if defined(__cplusplus) } #endif # 37 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_bt.h" #endif /* !defined(MPL_BT_H_INCLUDED) */ # 39 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_bt.h" # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpl_thread.h" #endif /* expanded by -frewrite-includes */ # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPL_THREAD_H_INCLUDED) #define MPL_THREAD_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mplconfig.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread.h" /* _INVALID exists to avoid accidental macro evaluations to 0 */ #define MPL_THREAD_PACKAGE_INVALID 0 #define MPL_THREAD_PACKAGE_NONE 1 #define MPL_THREAD_PACKAGE_POSIX 2 #define MPL_THREAD_PACKAGE_SOLARIS 3 #define MPL_THREAD_PACKAGE_WIN 4 #if defined(MPL_THREAD_PACKAGE_NAME) && (MPL_THREAD_PACKAGE_NAME == MPL_THREAD_PACKAGE_POSIX) #if 0 /* expanded by -frewrite-includes */ # include "mpl_thread_posix.h" #endif /* expanded by -frewrite-includes */ # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread_posix.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ /* * Threads */ #ifndef MPL_THREAD_POSIX_H_INCLUDED #define MPL_THREAD_POSIX_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpl.h" /* for MPL_sched_yield */ #endif /* expanded by -frewrite-includes */ # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread_posix.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPL_H_INCLUDED) #define MPL_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpl_base.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" /* must come before mpltrmem.h */ #if 0 /* expanded by -frewrite-includes */ #include "mpl_valgrind.h" #endif /* expanded by -frewrite-includes */ # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_argstr.h" #endif /* expanded by -frewrite-includes */ # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_str.h" #endif /* expanded by -frewrite-includes */ # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_trmem.h" #endif /* expanded by -frewrite-includes */ # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_env.h" #endif /* expanded by -frewrite-includes */ # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_sock.h" #endif /* expanded by -frewrite-includes */ # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_msg.h" #endif /* expanded by -frewrite-includes */ # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_iov.h" #endif /* expanded by -frewrite-includes */ # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_bt.h" #endif /* expanded by -frewrite-includes */ # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_thread.h" #endif /* expanded by -frewrite-includes */ # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 22 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_timer.h" #endif /* expanded by -frewrite-includes */ # 22 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 23 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_yield.h" #endif /* expanded by -frewrite-includes */ # 23 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 24 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_dbg.h" #endif /* expanded by -frewrite-includes */ # 24 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_shm.h" #endif /* expanded by -frewrite-includes */ # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 26 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #endif /* !defined(MPL_H_INCLUDED) */ # 28 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread_posix.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread_posix.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 1 3 /* Copyright (C) 1991,92,93,94,95,96,97,2002 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.5 Errors */ #ifndef _ERRNO_H /* The includer defined __need_Emath if he wants only the definitions of EDOM and ERANGE, and not everything else. */ #ifndef __need_Emath # define _ERRNO_H 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 3 # 29 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 3 #endif # 30 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 3 __BEGIN_DECLS /* Get the error number constants from the system-specific file. This file will test __need_Emath and _ERRNO_H. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 3 # 36 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 3 #undef __need_Emath #ifdef _ERRNO_H /* Declare the `errno' variable, unless it's defined as a macro by bits/errno.h. This is the case in GNU, where it is a per-thread variable. This redeclaration using the macro still works, but it will be a function declaration without a prototype and may trigger a -Wstrict-prototypes warning. */ #ifndef errno extern int errno; #endif # 48 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 3 #ifdef __USE_GNU /* The full and simple forms of the name with which the program was invoked. These variables are set up automatically at startup based on the value of ARGV[0] (this works only if you use GNU ld). */ extern char *program_invocation_name, *program_invocation_short_name; #endif /* __USE_GNU */ # 56 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 3 #endif /* _ERRNO_H */ # 57 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 3 __END_DECLS #endif /* _ERRNO_H */ # 61 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 3 /* The Hurd defines `error_t' as an enumerated type so that printing `error_t' values in the debugger shows the names. We might need this definition sometimes even if this file was included before. */ #if defined __USE_GNU || defined __need_error_t # ifndef __error_t_defined typedef int error_t; # define __error_t_defined 1 # endif # 71 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 3 # undef __need_error_t #endif # 73 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/errno.h" 3 # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread_posix.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread_posix.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 1 3 /* Copyright (C) 2002-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _PTHREAD_H #define _PTHREAD_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 21 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 # 23 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 23 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sched.h" 1 3 /* Definitions for POSIX 1003.1b-1993 (aka POSIX.4) scheduling interface. Copyright (C) 1996,1997,1999,2001-2004,2007,2010,2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SCHED_H #define _SCHED_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 23 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sched.h" 3 # 24 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sched.h" 3 /* Get type definitions. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sched.h" 3 # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sched.h" 3 #define __need_size_t #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 29 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sched.h" 3 # 1 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 1 3 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) /* Always define miscellaneous pieces when modules are available. */ #if !__has_feature(modules) #define __STDDEF_H #endif # 37 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 44 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_ptrdiff_t) #if !defined(_PTRDIFF_T) || __has_feature(modules) /* Always define ptrdiff_t when modules are available. */ #if !__has_feature(modules) #define _PTRDIFF_T #endif # 51 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 53 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 55 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_size_t) #if !defined(_SIZE_T) || __has_feature(modules) /* Always define size_t when modules are available. */ #if !__has_feature(modules) #define _SIZE_T #endif # 62 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ size_t; #endif # 64 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_size_t #endif /*defined(__need_size_t) */ # 66 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) /* Always define rsize_t when modules are available. */ #if !__has_feature(modules) #define _RSIZE_T #endif # 76 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ rsize_t; #endif # 78 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif /* defined(__need_STDDEF_H_misc) */ # 79 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_wchar_t) #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if !defined(_WCHAR_T) || __has_feature(modules) #if !__has_feature(modules) #define _WCHAR_T #if defined(_MSC_EXTENSIONS) #define _WCHAR_T_DEFINED #endif # 89 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 90 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WCHAR_TYPE__ wchar_t; #endif # 92 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 93 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 95 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_NULL) #undef NULL #ifdef __cplusplus # if !defined(__MINGW32__) && !defined(_MSC_VER) # define NULL __null # else # 102 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL 0 # endif # 104 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #else # 105 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL ((void*)0) #endif # 107 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #ifdef __cplusplus #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 112 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 113 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_NULL #endif /* defined(__need_NULL) */ # 115 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 118 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 119 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 120 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 123 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if defined(__need_wint_t) /* Always define wint_t when modules are available. */ #if !defined(_WINT_T) || __has_feature(modules) #if !__has_feature(modules) #define _WINT_T #endif # 132 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WINT_TYPE__ wint_t; #endif # 134 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wint_t #endif /* __need_wint_t */ # 136 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 138 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 30 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sched.h" 2 3 #define __need_time_t #define __need_timespec #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 33 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sched.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 1 3 /* Copyright (C) 1991-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.23 Date and time */ #ifndef _TIME_H #if (! defined __need_time_t && !defined __need_clock_t && \ ! defined __need_timespec) # define _TIME_H 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_DECLS #endif # 32 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #ifdef _TIME_H /* Get size_t and NULL from . */ # define __need_size_t # define __need_NULL #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 37 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 38 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* This defines CLOCKS_PER_SEC, which is the number of processor clock ticks per second. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 41 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 42 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* This is the obsolete POSIX.1-1988 name for the same constant. */ # if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K # ifndef CLK_TCK # define CLK_TCK CLOCKS_PER_SEC # endif # 48 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # endif # 49 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #endif /* included. */ # 51 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #if !defined __clock_t_defined && (defined _TIME_H || defined __need_clock_t) # define __clock_t_defined 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 55 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 56 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Returned by `clock'. */ typedef __clock_t clock_t; __END_NAMESPACE_STD #if defined __USE_XOPEN || defined __USE_POSIX || defined __USE_MISC __USING_NAMESPACE_STD(clock_t) #endif # 64 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #endif /* clock_t not defined and or need clock_t. */ # 66 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __need_clock_t #if !defined __time_t_defined && (defined _TIME_H || defined __need_time_t) # define __time_t_defined 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 71 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 72 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Returned by `time'. */ typedef __time_t time_t; __END_NAMESPACE_STD #if defined __USE_POSIX || defined __USE_MISC || defined __USE_SVID __USING_NAMESPACE_STD(time_t) #endif # 80 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #endif /* time_t not defined and or need time_t. */ # 82 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __need_time_t #if !defined __clockid_t_defined && \ ((defined _TIME_H && defined __USE_POSIX199309) || defined __need_clockid_t) # define __clockid_t_defined 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 88 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 89 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Clock ID used in clock and timer functions. */ typedef __clockid_t clockid_t; #endif /* clockid_t not defined and or need clockid_t. */ # 94 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __clockid_time_t #if !defined __timer_t_defined && \ ((defined _TIME_H && defined __USE_POSIX199309) || defined __need_timer_t) # define __timer_t_defined 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 100 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 101 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Timer ID returned by `timer_create'. */ typedef __timer_t timer_t; #endif /* timer_t not defined and or need timer_t. */ # 106 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __need_timer_t #if (!defined __timespec_defined \ && ((defined _TIME_H \ && (defined __USE_POSIX199309 || defined __USE_MISC \ || defined __USE_ISOC11)) \ || defined __need_timespec)) # define __timespec_defined 1 #if 0 /* expanded by -frewrite-includes */ # include /* This defines __time_t for us. */ #endif /* expanded by -frewrite-includes */ # 116 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 117 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* POSIX.1b structure for a time value. This is like a `struct timeval' but has nanoseconds instead of microseconds. */ struct timespec { __time_t tv_sec; /* Seconds. */ __syscall_slong_t tv_nsec; /* Nanoseconds. */ }; #endif /* timespec not defined and or need timespec. */ # 127 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __need_timespec #ifdef _TIME_H __BEGIN_NAMESPACE_STD /* Used by other time functions. */ struct tm { int tm_sec; /* Seconds. [0-60] (1 leap second) */ int tm_min; /* Minutes. [0-59] */ int tm_hour; /* Hours. [0-23] */ int tm_mday; /* Day. [1-31] */ int tm_mon; /* Month. [0-11] */ int tm_year; /* Year - 1900. */ int tm_wday; /* Day of week. [0-6] */ int tm_yday; /* Days in year.[0-365] */ int tm_isdst; /* DST. [-1/0/1]*/ # ifdef __USE_BSD long int tm_gmtoff; /* Seconds east of UTC. */ const char *tm_zone; /* Timezone abbreviation. */ # else # 149 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 long int __tm_gmtoff; /* Seconds east of UTC. */ const char *__tm_zone; /* Timezone abbreviation. */ # endif # 152 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 }; __END_NAMESPACE_STD #if defined __USE_XOPEN || defined __USE_POSIX || defined __USE_MISC __USING_NAMESPACE_STD(tm) #endif # 157 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_POSIX199309 /* POSIX.1b structure for timer start values and intervals. */ struct itimerspec { struct timespec it_interval; struct timespec it_value; }; /* We can use a simple forward declaration. */ struct sigevent; # endif /* POSIX.1b */ # 171 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_XOPEN2K # ifndef __pid_t_defined typedef __pid_t pid_t; # define __pid_t_defined # endif # 177 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # endif # 178 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_ISOC11 /* Time base values for timespec_get. */ # define TIME_UTC 1 # endif # 184 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Time used by the program so far (user time + system time). The result / CLOCKS_PER_SECOND is program time in seconds. */ extern clock_t clock (void) __THROW; /* Return the current time and put it in *TIMER if TIMER is not NULL. */ extern time_t time (time_t *__timer) __THROW; /* Return the difference between TIME1 and TIME0. */ extern double difftime (time_t __time1, time_t __time0) __THROW __attribute__ ((__const__)); /* Return the `time_t' representation of TP and normalize TP. */ extern time_t mktime (struct tm *__tp) __THROW; /* Format TP into S according to FORMAT. Write no more than MAXSIZE characters and return the number of characters written, or 0 if it would exceed MAXSIZE. */ extern size_t strftime (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp) __THROW; __END_NAMESPACE_STD # ifdef __USE_XOPEN /* Parse S according to FORMAT and store binary time information in TP. The return value is a pointer to the first unparsed character in S. */ extern char *strptime (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp) __THROW; # endif # 217 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_XOPEN2K8 /* Similar to the two functions above but take the information from the provided locale and not the global locale. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 221 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 222 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 extern size_t strftime_l (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp, __locale_t __loc) __THROW; # endif # 228 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_GNU extern char *strptime_l (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp, __locale_t __loc) __THROW; # endif # 234 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Return the `struct tm' representation of *TIMER in Universal Coordinated Time (aka Greenwich Mean Time). */ extern struct tm *gmtime (const time_t *__timer) __THROW; /* Return the `struct tm' representation of *TIMER in the local timezone. */ extern struct tm *localtime (const time_t *__timer) __THROW; __END_NAMESPACE_STD # if defined __USE_POSIX || defined __USE_MISC /* Return the `struct tm' representation of *TIMER in UTC, using *TP to store the result. */ extern struct tm *gmtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) __THROW; /* Return the `struct tm' representation of *TIMER in local time, using *TP to store the result. */ extern struct tm *localtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) __THROW; # endif /* POSIX or misc */ # 257 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ extern char *asctime (const struct tm *__tp) __THROW; /* Equivalent to `asctime (localtime (timer))'. */ extern char *ctime (const time_t *__timer) __THROW; __END_NAMESPACE_STD # if defined __USE_POSIX || defined __USE_MISC /* Reentrant versions of the above functions. */ /* Return in BUF a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ extern char *asctime_r (const struct tm *__restrict __tp, char *__restrict __buf) __THROW; /* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */ extern char *ctime_r (const time_t *__restrict __timer, char *__restrict __buf) __THROW; # endif /* POSIX or misc */ # 279 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Defined in localtime.c. */ extern char *__tzname[2]; /* Current timezone names. */ extern int __daylight; /* If daylight-saving time is ever in use. */ extern long int __timezone; /* Seconds west of UTC. */ # ifdef __USE_POSIX /* Same as above. */ extern char *tzname[2]; /* Set time conversion information from the TZ environment variable. If TZ is not defined, a locale-dependent default is used. */ extern void tzset (void) __THROW; # endif # 295 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # if defined __USE_SVID || defined __USE_XOPEN extern int daylight; extern long int timezone; # endif # 300 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_SVID /* Set the system time to *WHEN. This call is restricted to the superuser. */ extern int stime (const time_t *__when) __THROW; # endif # 306 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Nonzero if YEAR is a leap year (every 4 years, except every 100th isn't, and every 400th is). */ # define __isleap(year) \ ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) # ifdef __USE_MISC /* Miscellaneous functions many Unices inherited from the public domain localtime package. These are included only for compatibility. */ /* Like `mktime', but for TP represents Universal Time, not local time. */ extern time_t timegm (struct tm *__tp) __THROW; /* Another name for `mktime'. */ extern time_t timelocal (struct tm *__tp) __THROW; /* Return the number of days in YEAR. */ extern int dysize (int __year) __THROW __attribute__ ((__const__)); # endif # 327 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_POSIX199309 /* Pause execution for a number of nanoseconds. This function is a cancellation point and therefore not marked with __THROW. */ extern int nanosleep (const struct timespec *__requested_time, struct timespec *__remaining); /* Get resolution of clock CLOCK_ID. */ extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __THROW; /* Get current value of clock CLOCK_ID and store it in TP. */ extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW; /* Set clock CLOCK_ID to value TP. */ extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp) __THROW; # ifdef __USE_XOPEN2K /* High-resolution sleep with the specified clock. This function is a cancellation point and therefore not marked with __THROW. */ extern int clock_nanosleep (clockid_t __clock_id, int __flags, const struct timespec *__req, struct timespec *__rem); /* Return clock ID for CPU-time clock. */ extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW; # endif # 360 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Create new per-process timer using CLOCK_ID. */ extern int timer_create (clockid_t __clock_id, struct sigevent *__restrict __evp, timer_t *__restrict __timerid) __THROW; /* Delete timer TIMERID. */ extern int timer_delete (timer_t __timerid) __THROW; /* Set timer TIMERID to VALUE, returning old value in OVALUE. */ extern int timer_settime (timer_t __timerid, int __flags, const struct itimerspec *__restrict __value, struct itimerspec *__restrict __ovalue) __THROW; /* Get current value of timer TIMERID and store it in VALUE. */ extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) __THROW; /* Get expiration overrun for timer TIMERID. */ extern int timer_getoverrun (timer_t __timerid) __THROW; # endif # 382 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_ISOC11 /* Set TS to calendar time based in time base BASE. */ extern int timespec_get (struct timespec *__ts, int __base) __THROW __nonnull ((1)); # endif # 389 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_XOPEN_EXTENDED /* Set to one of the following values to indicate an error. 1 the DATEMSK environment variable is null or undefined, 2 the template file cannot be opened for reading, 3 failed to get file status information, 4 the template file is not a regular file, 5 an error is encountered while reading the template file, 6 memory allication failed (not enough memory available), 7 there is no line in the template that matches the input, 8 invalid input specification Example: February 31 or a time is specified that can not be represented in a time_t (representing the time in seconds since 00:00:00 UTC, January 1, 1970) */ extern int getdate_err; /* Parse the given string as a date specification and return a value representing the value. The templates from the file identified by the environment variable DATEMSK are used. In case of an error `getdate_err' is set. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct tm *getdate (const char *__string); # endif # 414 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_GNU /* Since `getdate' is not reentrant because of the use of `getdate_err' and the static buffer to return the result in, we provide a thread-safe variant. The functionality is the same. The result is returned in the buffer pointed to by RESBUFP and in case of an error the return value is != 0 with the same values as given above for `getdate_err'. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int getdate_r (const char *__restrict __string, struct tm *__restrict __resbufp); # endif # 429 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __END_DECLS #endif /* included. */ # 433 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #endif /* not already included. */ # 435 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 34 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sched.h" 2 3 #ifndef __pid_t_defined typedef __pid_t pid_t; # define __pid_t_defined #endif # 39 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sched.h" 3 /* Get system specific constant and data structure definitions. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 42 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sched.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sched.h" 1 3 /* Definitions of constants and data structure for POSIX 1003.1b-1993 scheduling interface. Copyright (C) 1996-1999,2001-2003,2005,2006,2007,2008,2009,2011,2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef __need_schedparam #ifndef _SCHED_H # error "Never include directly; use instead." #endif # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sched.h" 3 /* Scheduling algorithms. */ #define SCHED_OTHER 0 #define SCHED_FIFO 1 #define SCHED_RR 2 #ifdef __USE_GNU # define SCHED_BATCH 3 # define SCHED_IDLE 5 # define SCHED_RESET_ON_FORK 0x40000000 #endif # 38 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sched.h" 3 #ifdef __USE_GNU /* Cloning flags. */ # define CSIGNAL 0x000000ff /* Signal mask to be sent at exit. */ # define CLONE_VM 0x00000100 /* Set if VM shared between processes. */ # define CLONE_FS 0x00000200 /* Set if fs info shared between processes. */ # define CLONE_FILES 0x00000400 /* Set if open files shared between processes. */ # define CLONE_SIGHAND 0x00000800 /* Set if signal handlers shared. */ # define CLONE_PTRACE 0x00002000 /* Set if tracing continues on the child. */ # define CLONE_VFORK 0x00004000 /* Set if the parent wants the child to wake it up on mm_release. */ # define CLONE_PARENT 0x00008000 /* Set if we want to have the same parent as the cloner. */ # define CLONE_THREAD 0x00010000 /* Set to add to same thread group. */ # define CLONE_NEWNS 0x00020000 /* Set to create new namespace. */ # define CLONE_SYSVSEM 0x00040000 /* Set to shared SVID SEM_UNDO semantics. */ # define CLONE_SETTLS 0x00080000 /* Set TLS info. */ # define CLONE_PARENT_SETTID 0x00100000 /* Store TID in userlevel buffer before MM copy. */ # define CLONE_CHILD_CLEARTID 0x00200000 /* Register exit futex and memory location to clear. */ # define CLONE_DETACHED 0x00400000 /* Create clone detached. */ # define CLONE_UNTRACED 0x00800000 /* Set if the tracing process can't force CLONE_PTRACE on this clone. */ # define CLONE_CHILD_SETTID 0x01000000 /* Store TID in userlevel buffer in the child. */ # define CLONE_NEWUTS 0x04000000 /* New utsname group. */ # define CLONE_NEWIPC 0x08000000 /* New ipcs. */ # define CLONE_NEWUSER 0x10000000 /* New user namespace. */ # define CLONE_NEWPID 0x20000000 /* New pid namespace. */ # define CLONE_NEWNET 0x40000000 /* New network namespace. */ # define CLONE_IO 0x80000000 /* Clone I/O context. */ #endif # 71 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sched.h" 3 /* The official definition. */ struct sched_param { int __sched_priority; }; __BEGIN_DECLS #ifdef __USE_GNU /* Clone current process. */ extern int clone (int (*__fn) (void *__arg), void *__child_stack, int __flags, void *__arg, ...) __THROW; /* Unshare the specified resources. */ extern int unshare (int __flags) __THROW; /* Get index of currently used CPU. */ extern int sched_getcpu (void) __THROW; /* Switch process to namespace of type NSTYPE indicated by FD. */ extern int setns (int __fd, int __nstype) __THROW; #endif # 94 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sched.h" 3 __END_DECLS #endif /* need schedparam */ # 99 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sched.h" 3 #if !defined __defined_schedparam \ && (defined __need_schedparam || defined _SCHED_H) # define __defined_schedparam 1 /* Data structure to describe a process' schedulability. */ struct __sched_param { int __sched_priority; }; # undef __need_schedparam #endif # 110 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sched.h" 3 #if defined _SCHED_H && !defined __cpu_set_t_defined # define __cpu_set_t_defined /* Size definition for CPU sets. */ # define __CPU_SETSIZE 1024 # define __NCPUBITS (8 * sizeof (__cpu_mask)) /* Type for array elements in 'cpu_set_t'. */ typedef unsigned long int __cpu_mask; /* Basic access functions. */ # define __CPUELT(cpu) ((cpu) / __NCPUBITS) # define __CPUMASK(cpu) ((__cpu_mask) 1 << ((cpu) % __NCPUBITS)) /* Data structure to describe CPU mask. */ typedef struct { __cpu_mask __bits[__CPU_SETSIZE / __NCPUBITS]; } cpu_set_t; /* Access functions for CPU masks. */ # if __GNUC_PREREQ (2, 91) # define __CPU_ZERO_S(setsize, cpusetp) \ do __builtin_memset (cpusetp, '\0', setsize); while (0) # else # 136 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sched.h" 3 # define __CPU_ZERO_S(setsize, cpusetp) \ do { \ size_t __i; \ size_t __imax = (setsize) / sizeof (__cpu_mask); \ __cpu_mask *__bits = (cpusetp)->__bits; \ for (__i = 0; __i < __imax; ++__i) \ __bits[__i] = 0; \ } while (0) # endif # 145 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sched.h" 3 # define __CPU_SET_S(cpu, setsize, cpusetp) \ (__extension__ \ ({ size_t __cpu = (cpu); \ __cpu < 8 * (setsize) \ ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \ |= __CPUMASK (__cpu)) \ : 0; })) # define __CPU_CLR_S(cpu, setsize, cpusetp) \ (__extension__ \ ({ size_t __cpu = (cpu); \ __cpu < 8 * (setsize) \ ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \ &= ~__CPUMASK (__cpu)) \ : 0; })) # define __CPU_ISSET_S(cpu, setsize, cpusetp) \ (__extension__ \ ({ size_t __cpu = (cpu); \ __cpu < 8 * (setsize) \ ? ((((const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] \ & __CPUMASK (__cpu))) != 0 \ : 0; })) # define __CPU_COUNT_S(setsize, cpusetp) \ __sched_cpucount (setsize, cpusetp) # if __GNUC_PREREQ (2, 91) # define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \ (__builtin_memcmp (cpusetp1, cpusetp2, setsize) == 0) # else # 174 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sched.h" 3 # define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \ (__extension__ \ ({ const __cpu_mask *__arr1 = (cpusetp1)->__bits; \ const __cpu_mask *__arr2 = (cpusetp2)->__bits; \ size_t __imax = (setsize) / sizeof (__cpu_mask); \ size_t __i; \ for (__i = 0; __i < __imax; ++__i) \ if (__arr1[__i] != __arr2[__i]) \ break; \ __i == __imax; })) # endif # 185 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sched.h" 3 # define __CPU_OP_S(setsize, destset, srcset1, srcset2, op) \ (__extension__ \ ({ cpu_set_t *__dest = (destset); \ const __cpu_mask *__arr1 = (srcset1)->__bits; \ const __cpu_mask *__arr2 = (srcset2)->__bits; \ size_t __imax = (setsize) / sizeof (__cpu_mask); \ size_t __i; \ for (__i = 0; __i < __imax; ++__i) \ ((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i]; \ __dest; })) # define __CPU_ALLOC_SIZE(count) \ ((((count) + __NCPUBITS - 1) / __NCPUBITS) * sizeof (__cpu_mask)) # define __CPU_ALLOC(count) __sched_cpualloc (count) # define __CPU_FREE(cpuset) __sched_cpufree (cpuset) __BEGIN_DECLS extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp) __THROW; extern cpu_set_t *__sched_cpualloc (size_t __count) __THROW __wur; extern void __sched_cpufree (cpu_set_t *__set) __THROW; __END_DECLS #endif # 212 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/sched.h" 3 # 43 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sched.h" 2 3 /* Define the real names for the elements of `struct sched_param'. */ #define sched_priority __sched_priority __BEGIN_DECLS /* Set scheduling parameters for a process. */ extern int sched_setparam (__pid_t __pid, const struct sched_param *__param) __THROW; /* Retrieve scheduling parameters for a particular process. */ extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __THROW; /* Set scheduling algorithm and/or parameters for a process. */ extern int sched_setscheduler (__pid_t __pid, int __policy, const struct sched_param *__param) __THROW; /* Retrieve scheduling algorithm for a particular purpose. */ extern int sched_getscheduler (__pid_t __pid) __THROW; /* Yield the processor. */ extern int sched_yield (void) __THROW; /* Get maximum priority value for a scheduler. */ extern int sched_get_priority_max (int __algorithm) __THROW; /* Get minimum priority value for a scheduler. */ extern int sched_get_priority_min (int __algorithm) __THROW; /* Get the SCHED_RR interval for the named process. */ extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW; #ifdef __USE_GNU /* Access macros for `cpu_set'. */ # define CPU_SETSIZE __CPU_SETSIZE # define CPU_SET(cpu, cpusetp) __CPU_SET_S (cpu, sizeof (cpu_set_t), cpusetp) # define CPU_CLR(cpu, cpusetp) __CPU_CLR_S (cpu, sizeof (cpu_set_t), cpusetp) # define CPU_ISSET(cpu, cpusetp) __CPU_ISSET_S (cpu, sizeof (cpu_set_t), \ cpusetp) # define CPU_ZERO(cpusetp) __CPU_ZERO_S (sizeof (cpu_set_t), cpusetp) # define CPU_COUNT(cpusetp) __CPU_COUNT_S (sizeof (cpu_set_t), cpusetp) # define CPU_SET_S(cpu, setsize, cpusetp) __CPU_SET_S (cpu, setsize, cpusetp) # define CPU_CLR_S(cpu, setsize, cpusetp) __CPU_CLR_S (cpu, setsize, cpusetp) # define CPU_ISSET_S(cpu, setsize, cpusetp) __CPU_ISSET_S (cpu, setsize, \ cpusetp) # define CPU_ZERO_S(setsize, cpusetp) __CPU_ZERO_S (setsize, cpusetp) # define CPU_COUNT_S(setsize, cpusetp) __CPU_COUNT_S (setsize, cpusetp) # define CPU_EQUAL(cpusetp1, cpusetp2) \ __CPU_EQUAL_S (sizeof (cpu_set_t), cpusetp1, cpusetp2) # define CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \ __CPU_EQUAL_S (setsize, cpusetp1, cpusetp2) # define CPU_AND(destset, srcset1, srcset2) \ __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, &) # define CPU_OR(destset, srcset1, srcset2) \ __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, |) # define CPU_XOR(destset, srcset1, srcset2) \ __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, ^) # define CPU_AND_S(setsize, destset, srcset1, srcset2) \ __CPU_OP_S (setsize, destset, srcset1, srcset2, &) # define CPU_OR_S(setsize, destset, srcset1, srcset2) \ __CPU_OP_S (setsize, destset, srcset1, srcset2, |) # define CPU_XOR_S(setsize, destset, srcset1, srcset2) \ __CPU_OP_S (setsize, destset, srcset1, srcset2, ^) # define CPU_ALLOC_SIZE(count) __CPU_ALLOC_SIZE (count) # define CPU_ALLOC(count) __CPU_ALLOC (count) # define CPU_FREE(cpuset) __CPU_FREE (cpuset) /* Set the CPU affinity for a task */ extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize, const cpu_set_t *__cpuset) __THROW; /* Get the CPU affinity for a task */ extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize, cpu_set_t *__cpuset) __THROW; #endif # 124 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sched.h" 3 __END_DECLS #endif /* sched.h */ # 128 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sched.h" 3 # 24 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 24 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 1 3 /* Copyright (C) 1991-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.23 Date and time */ #ifndef _TIME_H #if (! defined __need_time_t && !defined __need_clock_t && \ ! defined __need_timespec) # define _TIME_H 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_DECLS #endif # 32 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #ifdef _TIME_H /* Get size_t and NULL from . */ # define __need_size_t # define __need_NULL #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 37 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 1 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 1 3 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) /* Always define miscellaneous pieces when modules are available. */ #if !__has_feature(modules) #define __STDDEF_H #endif # 37 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 44 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_ptrdiff_t) #if !defined(_PTRDIFF_T) || __has_feature(modules) /* Always define ptrdiff_t when modules are available. */ #if !__has_feature(modules) #define _PTRDIFF_T #endif # 51 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 53 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 55 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_size_t) #if !defined(_SIZE_T) || __has_feature(modules) /* Always define size_t when modules are available. */ #if !__has_feature(modules) #define _SIZE_T #endif # 62 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ size_t; #endif # 64 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_size_t #endif /*defined(__need_size_t) */ # 66 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) /* Always define rsize_t when modules are available. */ #if !__has_feature(modules) #define _RSIZE_T #endif # 76 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ rsize_t; #endif # 78 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif /* defined(__need_STDDEF_H_misc) */ # 79 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_wchar_t) #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if !defined(_WCHAR_T) || __has_feature(modules) #if !__has_feature(modules) #define _WCHAR_T #if defined(_MSC_EXTENSIONS) #define _WCHAR_T_DEFINED #endif # 89 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 90 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WCHAR_TYPE__ wchar_t; #endif # 92 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 93 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 95 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_NULL) #undef NULL #ifdef __cplusplus # if !defined(__MINGW32__) && !defined(_MSC_VER) # define NULL __null # else # 102 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL 0 # endif # 104 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #else # 105 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL ((void*)0) #endif # 107 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #ifdef __cplusplus #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 112 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 113 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_NULL #endif /* defined(__need_NULL) */ # 115 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 118 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 119 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 120 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 123 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if defined(__need_wint_t) /* Always define wint_t when modules are available. */ #if !defined(_WINT_T) || __has_feature(modules) #if !__has_feature(modules) #define _WINT_T #endif # 132 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WINT_TYPE__ wint_t; #endif # 134 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wint_t #endif /* __need_wint_t */ # 136 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 138 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 38 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 2 3 /* This defines CLOCKS_PER_SEC, which is the number of processor clock ticks per second. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 41 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 1 3 /* System-dependent timing definitions. Linux version. Copyright (C) 1996,1997,1999-2003,2010,2011,2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * Never include this file directly; use instead. */ #if defined __need_timeval || defined __USE_GNU # ifndef _STRUCT_TIMEVAL # define _STRUCT_TIMEVAL 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 /* A time value that is accurate to the nearest microsecond but also has a range of years. */ struct timeval { __time_t tv_sec; /* Seconds. */ __suseconds_t tv_usec; /* Microseconds. */ }; # endif /* struct timeval */ # 36 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 #endif # 37 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 #ifndef __need_timeval # ifndef _BITS_TIME_H # define _BITS_TIME_H 1 /* ISO/IEC 9899:1990 7.12.1: The macro `CLOCKS_PER_SEC' is the number per second of the value returned by the `clock' function. */ /* CAE XSH, Issue 4, Version 2: The value of CLOCKS_PER_SEC is required to be 1 million on all XSI-conformant systems. */ # define CLOCKS_PER_SEC 1000000l # if (!defined __STRICT_ANSI__ || defined __USE_POSIX) \ && !defined __USE_XOPEN2K /* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK presents the real value for clock ticks per second for the system. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 54 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 # 55 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 extern long int __sysconf (int); # define CLK_TCK ((__clock_t) __sysconf (2)) /* 2 is _SC_CLK_TCK */ # endif # 58 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 # ifdef __USE_POSIX199309 /* Identifier for system-wide realtime clock. */ # define CLOCK_REALTIME 0 /* Monotonic system-wide clock. */ # define CLOCK_MONOTONIC 1 /* High-resolution timer from the CPU. */ # define CLOCK_PROCESS_CPUTIME_ID 2 /* Thread-specific CPU-time clock. */ # define CLOCK_THREAD_CPUTIME_ID 3 /* Monotonic system-wide clock, not adjusted for frequency scaling. */ # define CLOCK_MONOTONIC_RAW 4 /* Identifier for system-wide realtime clock, updated only on ticks. */ # define CLOCK_REALTIME_COARSE 5 /* Monotonic system-wide clock, updated only on ticks. */ # define CLOCK_MONOTONIC_COARSE 6 /* Monotonic system-wide clock that includes time spent in suspension. */ # define CLOCK_BOOTTIME 7 /* Like CLOCK_REALTIME but also wakes suspended system. */ # define CLOCK_REALTIME_ALARM 8 /* Like CLOCK_BOOTTIME but also wakes suspended system. */ # define CLOCK_BOOTTIME_ALARM 9 /* Flag to indicate time is absolute. */ # define TIMER_ABSTIME 1 # endif # 84 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 # ifdef __USE_GNU #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 86 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 # 87 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 __BEGIN_DECLS /* Tune a POSIX clock. */ extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW; __END_DECLS # endif /* use GNU */ # 95 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 # endif /* bits/time.h */ # 97 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 #endif # 98 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/time.h" 3 #undef __need_timeval # 42 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 2 3 /* This is the obsolete POSIX.1-1988 name for the same constant. */ # if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K # ifndef CLK_TCK # define CLK_TCK CLOCKS_PER_SEC # endif # 48 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # endif # 49 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #endif /* included. */ # 51 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #if !defined __clock_t_defined && (defined _TIME_H || defined __need_clock_t) # define __clock_t_defined 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 55 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 56 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Returned by `clock'. */ typedef __clock_t clock_t; __END_NAMESPACE_STD #if defined __USE_XOPEN || defined __USE_POSIX || defined __USE_MISC __USING_NAMESPACE_STD(clock_t) #endif # 64 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #endif /* clock_t not defined and or need clock_t. */ # 66 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __need_clock_t #if !defined __time_t_defined && (defined _TIME_H || defined __need_time_t) # define __time_t_defined 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 71 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 72 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Returned by `time'. */ typedef __time_t time_t; __END_NAMESPACE_STD #if defined __USE_POSIX || defined __USE_MISC || defined __USE_SVID __USING_NAMESPACE_STD(time_t) #endif # 80 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #endif /* time_t not defined and or need time_t. */ # 82 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __need_time_t #if !defined __clockid_t_defined && \ ((defined _TIME_H && defined __USE_POSIX199309) || defined __need_clockid_t) # define __clockid_t_defined 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 88 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 89 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Clock ID used in clock and timer functions. */ typedef __clockid_t clockid_t; #endif /* clockid_t not defined and or need clockid_t. */ # 94 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __clockid_time_t #if !defined __timer_t_defined && \ ((defined _TIME_H && defined __USE_POSIX199309) || defined __need_timer_t) # define __timer_t_defined 1 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 100 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 101 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Timer ID returned by `timer_create'. */ typedef __timer_t timer_t; #endif /* timer_t not defined and or need timer_t. */ # 106 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __need_timer_t #if (!defined __timespec_defined \ && ((defined _TIME_H \ && (defined __USE_POSIX199309 || defined __USE_MISC \ || defined __USE_ISOC11)) \ || defined __need_timespec)) # define __timespec_defined 1 #if 0 /* expanded by -frewrite-includes */ # include /* This defines __time_t for us. */ #endif /* expanded by -frewrite-includes */ # 116 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 117 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* POSIX.1b structure for a time value. This is like a `struct timeval' but has nanoseconds instead of microseconds. */ struct timespec { __time_t tv_sec; /* Seconds. */ __syscall_slong_t tv_nsec; /* Nanoseconds. */ }; #endif /* timespec not defined and or need timespec. */ # 127 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #undef __need_timespec #ifdef _TIME_H __BEGIN_NAMESPACE_STD /* Used by other time functions. */ struct tm { int tm_sec; /* Seconds. [0-60] (1 leap second) */ int tm_min; /* Minutes. [0-59] */ int tm_hour; /* Hours. [0-23] */ int tm_mday; /* Day. [1-31] */ int tm_mon; /* Month. [0-11] */ int tm_year; /* Year - 1900. */ int tm_wday; /* Day of week. [0-6] */ int tm_yday; /* Days in year.[0-365] */ int tm_isdst; /* DST. [-1/0/1]*/ # ifdef __USE_BSD long int tm_gmtoff; /* Seconds east of UTC. */ const char *tm_zone; /* Timezone abbreviation. */ # else # 149 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 long int __tm_gmtoff; /* Seconds east of UTC. */ const char *__tm_zone; /* Timezone abbreviation. */ # endif # 152 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 }; __END_NAMESPACE_STD #if defined __USE_XOPEN || defined __USE_POSIX || defined __USE_MISC __USING_NAMESPACE_STD(tm) #endif # 157 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_POSIX199309 /* POSIX.1b structure for timer start values and intervals. */ struct itimerspec { struct timespec it_interval; struct timespec it_value; }; /* We can use a simple forward declaration. */ struct sigevent; # endif /* POSIX.1b */ # 171 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_XOPEN2K # ifndef __pid_t_defined typedef __pid_t pid_t; # define __pid_t_defined # endif # 177 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # endif # 178 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_ISOC11 /* Time base values for timespec_get. */ # define TIME_UTC 1 # endif # 184 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Time used by the program so far (user time + system time). The result / CLOCKS_PER_SECOND is program time in seconds. */ extern clock_t clock (void) __THROW; /* Return the current time and put it in *TIMER if TIMER is not NULL. */ extern time_t time (time_t *__timer) __THROW; /* Return the difference between TIME1 and TIME0. */ extern double difftime (time_t __time1, time_t __time0) __THROW __attribute__ ((__const__)); /* Return the `time_t' representation of TP and normalize TP. */ extern time_t mktime (struct tm *__tp) __THROW; /* Format TP into S according to FORMAT. Write no more than MAXSIZE characters and return the number of characters written, or 0 if it would exceed MAXSIZE. */ extern size_t strftime (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp) __THROW; __END_NAMESPACE_STD # ifdef __USE_XOPEN /* Parse S according to FORMAT and store binary time information in TP. The return value is a pointer to the first unparsed character in S. */ extern char *strptime (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp) __THROW; # endif # 217 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_XOPEN2K8 /* Similar to the two functions above but take the information from the provided locale and not the global locale. */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 221 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 222 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 extern size_t strftime_l (char *__restrict __s, size_t __maxsize, const char *__restrict __format, const struct tm *__restrict __tp, __locale_t __loc) __THROW; # endif # 228 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_GNU extern char *strptime_l (const char *__restrict __s, const char *__restrict __fmt, struct tm *__tp, __locale_t __loc) __THROW; # endif # 234 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Return the `struct tm' representation of *TIMER in Universal Coordinated Time (aka Greenwich Mean Time). */ extern struct tm *gmtime (const time_t *__timer) __THROW; /* Return the `struct tm' representation of *TIMER in the local timezone. */ extern struct tm *localtime (const time_t *__timer) __THROW; __END_NAMESPACE_STD # if defined __USE_POSIX || defined __USE_MISC /* Return the `struct tm' representation of *TIMER in UTC, using *TP to store the result. */ extern struct tm *gmtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) __THROW; /* Return the `struct tm' representation of *TIMER in local time, using *TP to store the result. */ extern struct tm *localtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp) __THROW; # endif /* POSIX or misc */ # 257 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __BEGIN_NAMESPACE_STD /* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ extern char *asctime (const struct tm *__tp) __THROW; /* Equivalent to `asctime (localtime (timer))'. */ extern char *ctime (const time_t *__timer) __THROW; __END_NAMESPACE_STD # if defined __USE_POSIX || defined __USE_MISC /* Reentrant versions of the above functions. */ /* Return in BUF a string of the form "Day Mon dd hh:mm:ss yyyy\n" that is the representation of TP in this format. */ extern char *asctime_r (const struct tm *__restrict __tp, char *__restrict __buf) __THROW; /* Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'. */ extern char *ctime_r (const time_t *__restrict __timer, char *__restrict __buf) __THROW; # endif /* POSIX or misc */ # 279 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Defined in localtime.c. */ extern char *__tzname[2]; /* Current timezone names. */ extern int __daylight; /* If daylight-saving time is ever in use. */ extern long int __timezone; /* Seconds west of UTC. */ # ifdef __USE_POSIX /* Same as above. */ extern char *tzname[2]; /* Set time conversion information from the TZ environment variable. If TZ is not defined, a locale-dependent default is used. */ extern void tzset (void) __THROW; # endif # 295 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # if defined __USE_SVID || defined __USE_XOPEN extern int daylight; extern long int timezone; # endif # 300 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_SVID /* Set the system time to *WHEN. This call is restricted to the superuser. */ extern int stime (const time_t *__when) __THROW; # endif # 306 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Nonzero if YEAR is a leap year (every 4 years, except every 100th isn't, and every 400th is). */ # define __isleap(year) \ ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0)) # ifdef __USE_MISC /* Miscellaneous functions many Unices inherited from the public domain localtime package. These are included only for compatibility. */ /* Like `mktime', but for TP represents Universal Time, not local time. */ extern time_t timegm (struct tm *__tp) __THROW; /* Another name for `mktime'. */ extern time_t timelocal (struct tm *__tp) __THROW; /* Return the number of days in YEAR. */ extern int dysize (int __year) __THROW __attribute__ ((__const__)); # endif # 327 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_POSIX199309 /* Pause execution for a number of nanoseconds. This function is a cancellation point and therefore not marked with __THROW. */ extern int nanosleep (const struct timespec *__requested_time, struct timespec *__remaining); /* Get resolution of clock CLOCK_ID. */ extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __THROW; /* Get current value of clock CLOCK_ID and store it in TP. */ extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __THROW; /* Set clock CLOCK_ID to value TP. */ extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp) __THROW; # ifdef __USE_XOPEN2K /* High-resolution sleep with the specified clock. This function is a cancellation point and therefore not marked with __THROW. */ extern int clock_nanosleep (clockid_t __clock_id, int __flags, const struct timespec *__req, struct timespec *__rem); /* Return clock ID for CPU-time clock. */ extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __THROW; # endif # 360 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 /* Create new per-process timer using CLOCK_ID. */ extern int timer_create (clockid_t __clock_id, struct sigevent *__restrict __evp, timer_t *__restrict __timerid) __THROW; /* Delete timer TIMERID. */ extern int timer_delete (timer_t __timerid) __THROW; /* Set timer TIMERID to VALUE, returning old value in OVALUE. */ extern int timer_settime (timer_t __timerid, int __flags, const struct itimerspec *__restrict __value, struct itimerspec *__restrict __ovalue) __THROW; /* Get current value of timer TIMERID and store it in VALUE. */ extern int timer_gettime (timer_t __timerid, struct itimerspec *__value) __THROW; /* Get expiration overrun for timer TIMERID. */ extern int timer_getoverrun (timer_t __timerid) __THROW; # endif # 382 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_ISOC11 /* Set TS to calendar time based in time base BASE. */ extern int timespec_get (struct timespec *__ts, int __base) __THROW __nonnull ((1)); # endif # 389 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_XOPEN_EXTENDED /* Set to one of the following values to indicate an error. 1 the DATEMSK environment variable is null or undefined, 2 the template file cannot be opened for reading, 3 failed to get file status information, 4 the template file is not a regular file, 5 an error is encountered while reading the template file, 6 memory allication failed (not enough memory available), 7 there is no line in the template that matches the input, 8 invalid input specification Example: February 31 or a time is specified that can not be represented in a time_t (representing the time in seconds since 00:00:00 UTC, January 1, 1970) */ extern int getdate_err; /* Parse the given string as a date specification and return a value representing the value. The templates from the file identified by the environment variable DATEMSK are used. In case of an error `getdate_err' is set. This function is a possible cancellation point and therefore not marked with __THROW. */ extern struct tm *getdate (const char *__string); # endif # 414 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # ifdef __USE_GNU /* Since `getdate' is not reentrant because of the use of `getdate_err' and the static buffer to return the result in, we provide a thread-safe variant. The functionality is the same. The result is returned in the buffer pointed to by RESBUFP and in case of an error the return value is != 0 with the same values as given above for `getdate_err'. This function is not part of POSIX and therefore no official cancellation point. But due to similarity with an POSIX interface or due to the implementation it is a cancellation point and therefore not marked with __THROW. */ extern int getdate_r (const char *__restrict __string, struct tm *__restrict __resbufp); # endif # 429 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 __END_DECLS #endif /* included. */ # 433 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 #endif /* not already included. */ # 435 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/time.h" 3 # 25 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/setjmp.h" 1 3 /* Copyright (C) 1997,1998,2000,2003,2004,2005,2006 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* Define the machine-dependent type `jmp_buf'. PowerPC version. */ #ifndef _BITS_SETJMP_H #define _BITS_SETJMP_H 1 #if !defined _SETJMP_H && !defined _PTHREAD_H # error "Never include directly; use instead." #endif # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/setjmp.h" 3 /* The previous bits/setjmp.h had __jmp_buf defined as a structure. We use an array of 'long int' instead, to make writing the assembler easier. Naturally, user code should not depend on either representation. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 32 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/setjmp.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 1 3 /* Determine the wordsize from the preprocessor defines. */ #if defined __powerpc64__ # define __WORDSIZE 64 # define __WORDSIZE_TIME64_COMPAT32 1 #else # 7 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 # define __WORDSIZE 32 #endif # 9 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 #if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL /* Signal the glibc ABI didn't used to have a `long double'. The changes all the `long double' function variants to be redirects to the double functions. */ # define __LONG_DOUBLE_MATH_OPTIONAL 1 # ifndef __LONG_DOUBLE_128__ # define __NO_LONG_DOUBLE_MATH 1 # endif # 19 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 #endif # 20 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 # 33 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/setjmp.h" 2 3 /* The current powerpc 32-bit Altivec ABI specifies for SVR4 ABI and EABI the vrsave must be at byte 248 & v20 at byte 256. So we must pad this correctly on 32 bit. It also insists that vecregs are only gauranteed 4 byte alignment so we need to use vperm in the setjmp/longjmp routines. We have to version the code because members like int __mask_was_saved in the jmp_buf will move as jmp_buf is now larger than 248 bytes. We cannot keep the altivec jmp_buf backward compatible with the jmp_buf. */ #ifndef _ASM # if __WORDSIZE == 64 typedef long int __jmp_buf[64] __attribute__ ((__aligned__ (16))); # else # 45 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/setjmp.h" 3 /* The alignment is not essential, i.e.the buffer can be copied to a 4 byte aligned buffer as per the ABI it is just added for performance reasons. */ typedef long int __jmp_buf[64 + (12 * 4)] __attribute__ ((__aligned__ (16))); # endif # 49 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/setjmp.h" 3 #endif # 50 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/setjmp.h" 3 #endif /* bits/setjmp.h */ # 52 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/setjmp.h" 3 # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 2 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 1 3 /* Determine the wordsize from the preprocessor defines. */ #if defined __powerpc64__ # define __WORDSIZE 64 # define __WORDSIZE_TIME64_COMPAT32 1 #else # 7 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 # define __WORDSIZE 32 #endif # 9 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 #if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL /* Signal the glibc ABI didn't used to have a `long double'. The changes all the `long double' function variants to be redirects to the double functions. */ # define __LONG_DOUBLE_MATH_OPTIONAL 1 # ifndef __LONG_DOUBLE_128__ # define __NO_LONG_DOUBLE_MATH 1 # endif # 19 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 #endif # 20 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 # 29 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 2 3 /* Detach state. */ enum { PTHREAD_CREATE_JOINABLE, #define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_DETACHED #define PTHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED }; /* Mutex types. */ enum { PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_ADAPTIVE_NP #if defined __USE_UNIX98 || defined __USE_XOPEN2K8 , PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP, PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP, PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP, PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL #endif # 55 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 #ifdef __USE_GNU /* For compatibility. */ , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP #endif # 59 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 }; #ifdef __USE_XOPEN2K /* Robust mutex or not flags. */ enum { PTHREAD_MUTEX_STALLED, PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED, PTHREAD_MUTEX_ROBUST, PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST }; #endif # 72 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 #if defined __USE_POSIX199506 || defined __USE_UNIX98 /* Mutex protocols. */ enum { PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, PTHREAD_PRIO_PROTECT }; #endif # 83 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 /* Mutex initializers. */ #ifdef __PTHREAD_MUTEX_HAVE_PREV # define PTHREAD_MUTEX_INITIALIZER \ { { 0, 0, 0, 0, 0, 0, { 0, 0 } } } # ifdef __USE_GNU # define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0, 0 } } } # define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0, { 0, 0 } } } # define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \ { { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0, { 0, 0 } } } # endif # 97 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 #else # 98 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 # define PTHREAD_MUTEX_INITIALIZER \ { { 0, 0, 0, 0, 0, { 0 } } } # ifdef __USE_GNU # define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \ { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0 } } } # define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \ { { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, 0, { 0 } } } # define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \ { { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, 0, { 0 } } } # endif # 108 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 #endif # 109 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 /* Read-write lock types. */ #if defined __USE_UNIX98 || defined __USE_XOPEN2K enum { PTHREAD_RWLOCK_PREFER_READER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NP, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP }; /* Define __PTHREAD_RWLOCK_INT_FLAGS_SHARED to 1 if pthread_rwlock_t has the shared field. All 64-bit architectures have the shared field in pthread_rwlock_t. */ #ifndef __PTHREAD_RWLOCK_INT_FLAGS_SHARED # if __WORDSIZE == 64 # define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1 # endif # 128 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 #endif # 129 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 /* Read-write lock initializers. */ # define PTHREAD_RWLOCK_INITIALIZER \ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } } # ifdef __USE_GNU # ifdef __PTHREAD_RWLOCK_INT_FLAGS_SHARED # define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \ PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } } # else # 139 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 # if __BYTE_ORDER == __LITTLE_ENDIAN # define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \ { { 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP, \ 0, 0, 0, 0 } } # else # 144 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 # define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,\ 0 } } # endif # 148 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 # endif # 149 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 # endif # 150 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 #endif /* Unix98 or XOpen2K */ # 151 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 /* Scheduler inheritance. */ enum { PTHREAD_INHERIT_SCHED, #define PTHREAD_INHERIT_SCHED PTHREAD_INHERIT_SCHED PTHREAD_EXPLICIT_SCHED #define PTHREAD_EXPLICIT_SCHED PTHREAD_EXPLICIT_SCHED }; /* Scope handling. */ enum { PTHREAD_SCOPE_SYSTEM, #define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_PROCESS #define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS }; /* Process shared or private flag. */ enum { PTHREAD_PROCESS_PRIVATE, #define PTHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_SHARED #define PTHREAD_PROCESS_SHARED PTHREAD_PROCESS_SHARED }; /* Conditional variable handling. */ #define PTHREAD_COND_INITIALIZER { { 0, 0, 0, 0, 0, (void *) 0, 0, 0 } } /* Cleanup buffers */ struct _pthread_cleanup_buffer { void (*__routine) (void *); /* Function to call. */ void *__arg; /* Its argument. */ int __canceltype; /* Saved cancellation type. */ struct _pthread_cleanup_buffer *__prev; /* Chaining of cleanup functions. */ }; /* Cancellation */ enum { PTHREAD_CANCEL_ENABLE, #define PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_DISABLE #define PTHREAD_CANCEL_DISABLE PTHREAD_CANCEL_DISABLE }; enum { PTHREAD_CANCEL_DEFERRED, #define PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_ASYNCHRONOUS #define PTHREAD_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS }; #define PTHREAD_CANCELED ((void *) -1) /* Single execution handling. */ #define PTHREAD_ONCE_INIT 0 #ifdef __USE_XOPEN2K /* Value returned by 'pthread_barrier_wait' for one of the threads after the required number of threads have called this function. -1 is distinct from 0 and all errno constants */ # define PTHREAD_BARRIER_SERIAL_THREAD -1 #endif # 225 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 __BEGIN_DECLS /* Create a new thread, starting with execution of START-ROUTINE getting passed ARG. Creation attributed come from ATTR. The new handle is stored in *NEWTHREAD. */ extern int pthread_create (pthread_t *__restrict __newthread, const pthread_attr_t *__restrict __attr, void *(*__start_routine) (void *), void *__restrict __arg) __THROWNL __nonnull ((1, 3)); /* Terminate calling thread. The registered cleanup handlers are called via exception handling so we cannot mark this function with __THROW.*/ extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__)); /* Make calling thread wait for termination of the thread TH. The exit status of the thread is stored in *THREAD_RETURN, if THREAD_RETURN is not NULL. This function is a cancellation point and therefore not marked with __THROW. */ extern int pthread_join (pthread_t __th, void **__thread_return); #ifdef __USE_GNU /* Check whether thread TH has terminated. If yes return the status of the thread in *THREAD_RETURN, if THREAD_RETURN is not NULL. */ extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __THROW; /* Make calling thread wait for termination of the thread TH, but only until TIMEOUT. The exit status of the thread is stored in *THREAD_RETURN, if THREAD_RETURN is not NULL. This function is a cancellation point and therefore not marked with __THROW. */ extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return, const struct timespec *__abstime); #endif # 265 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 /* Indicate that the thread TH is never to be joined with PTHREAD_JOIN. The resources of TH will therefore be freed immediately when it terminates, instead of waiting for another thread to perform PTHREAD_JOIN on it. */ extern int pthread_detach (pthread_t __th) __THROW; /* Obtain the identifier of the current thread. */ extern pthread_t pthread_self (void) __THROW __attribute__ ((__const__)); /* Compare two thread identifiers. */ extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __THROW __attribute__ ((__const__)); /* Thread attribute handling. */ /* Initialize thread attribute *ATTR with default attributes (detachstate is PTHREAD_JOINABLE, scheduling policy is SCHED_OTHER, no user-provided stack). */ extern int pthread_attr_init (pthread_attr_t *__attr) __THROW __nonnull ((1)); /* Destroy thread attribute *ATTR. */ extern int pthread_attr_destroy (pthread_attr_t *__attr) __THROW __nonnull ((1)); /* Get detach state attribute. */ extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr, int *__detachstate) __THROW __nonnull ((1, 2)); /* Set detach state attribute. */ extern int pthread_attr_setdetachstate (pthread_attr_t *__attr, int __detachstate) __THROW __nonnull ((1)); /* Get the size of the guard area created for stack overflow protection. */ extern int pthread_attr_getguardsize (const pthread_attr_t *__attr, size_t *__guardsize) __THROW __nonnull ((1, 2)); /* Set the size of the guard area created for stack overflow protection. */ extern int pthread_attr_setguardsize (pthread_attr_t *__attr, size_t __guardsize) __THROW __nonnull ((1)); /* Return in *PARAM the scheduling parameters of *ATTR. */ extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr, struct sched_param *__restrict __param) __THROW __nonnull ((1, 2)); /* Set scheduling parameters (priority, etc) in *ATTR according to PARAM. */ extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr, const struct sched_param *__restrict __param) __THROW __nonnull ((1, 2)); /* Return in *POLICY the scheduling policy of *ATTR. */ extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict __attr, int *__restrict __policy) __THROW __nonnull ((1, 2)); /* Set scheduling policy in *ATTR according to POLICY. */ extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy) __THROW __nonnull ((1)); /* Return in *INHERIT the scheduling inheritance mode of *ATTR. */ extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict __attr, int *__restrict __inherit) __THROW __nonnull ((1, 2)); /* Set scheduling inheritance mode in *ATTR according to INHERIT. */ extern int pthread_attr_setinheritsched (pthread_attr_t *__attr, int __inherit) __THROW __nonnull ((1)); /* Return in *SCOPE the scheduling contention scope of *ATTR. */ extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr, int *__restrict __scope) __THROW __nonnull ((1, 2)); /* Set scheduling contention scope in *ATTR according to SCOPE. */ extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope) __THROW __nonnull ((1)); /* Return the previously set address for the stack. */ extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr) __THROW __nonnull ((1, 2)) __attribute_deprecated__; /* Set the starting address of the stack of the thread to be created. Depending on whether the stack grows up or down the value must either be higher or lower than all the address in the memory block. The minimal size of the block must be PTHREAD_STACK_MIN. */ extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, void *__stackaddr) __THROW __nonnull ((1)) __attribute_deprecated__; /* Return the currently used minimal stack size. */ extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict __attr, size_t *__restrict __stacksize) __THROW __nonnull ((1, 2)); /* Add information about the minimum stack size needed for the thread to be started. This size must never be less than PTHREAD_STACK_MIN and must also not exceed the system limits. */ extern int pthread_attr_setstacksize (pthread_attr_t *__attr, size_t __stacksize) __THROW __nonnull ((1)); #ifdef __USE_XOPEN2K /* Return the previously set address for the stack. */ extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr, size_t *__restrict __stacksize) __THROW __nonnull ((1, 2, 3)); /* The following two interfaces are intended to replace the last two. They require setting the address as well as the size since only setting the address will make the implementation on some architectures impossible. */ extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize) __THROW __nonnull ((1)); #endif # 391 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 #ifdef __USE_GNU /* Thread created with attribute ATTR will be limited to run only on the processors represented in CPUSET. */ extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr, size_t __cpusetsize, const cpu_set_t *__cpuset) __THROW __nonnull ((1, 3)); /* Get bit set in CPUSET representing the processors threads created with ATTR can run on. */ extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr, size_t __cpusetsize, cpu_set_t *__cpuset) __THROW __nonnull ((1, 3)); /* Initialize thread attribute *ATTR with attributes corresponding to the already running thread TH. It shall be called on uninitialized ATTR and destroyed with pthread_attr_destroy when no longer needed. */ extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr) __THROW __nonnull ((2)); #endif # 414 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 /* Functions for scheduling control. */ /* Set the scheduling parameters for TARGET_THREAD according to POLICY and *PARAM. */ extern int pthread_setschedparam (pthread_t __target_thread, int __policy, const struct sched_param *__param) __THROW __nonnull ((3)); /* Return in *POLICY and *PARAM the scheduling parameters for TARGET_THREAD. */ extern int pthread_getschedparam (pthread_t __target_thread, int *__restrict __policy, struct sched_param *__restrict __param) __THROW __nonnull ((2, 3)); /* Set the scheduling priority for TARGET_THREAD. */ extern int pthread_setschedprio (pthread_t __target_thread, int __prio) __THROW; #ifdef __USE_GNU /* Get thread name visible in the kernel and its interfaces. */ extern int pthread_getname_np (pthread_t __target_thread, char *__buf, size_t __buflen) __THROW __nonnull ((2)); /* Set thread name visible in the kernel and its interfaces. */ extern int pthread_setname_np (pthread_t __target_thread, const char *__name) __THROW __nonnull ((2)); #endif # 445 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 #ifdef __USE_UNIX98 /* Determine level of concurrency. */ extern int pthread_getconcurrency (void) __THROW; /* Set new concurrency level to LEVEL. */ extern int pthread_setconcurrency (int __level) __THROW; #endif # 454 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 #ifdef __USE_GNU /* Yield the processor to another thread or process. This function is similar to the POSIX `sched_yield' function but might be differently implemented in the case of a m-on-n thread implementation. */ extern int pthread_yield (void) __THROW; /* Limit specified thread TH to run only on the processors represented in CPUSET. */ extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize, const cpu_set_t *__cpuset) __THROW __nonnull ((3)); /* Get bit set in CPUSET representing the processors TH can run on. */ extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize, cpu_set_t *__cpuset) __THROW __nonnull ((3)); #endif # 474 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 /* Functions for handling initialization. */ /* Guarantee that the initialization function INIT_ROUTINE will be called only once, even if pthread_once is executed several times with the same ONCE_CONTROL argument. ONCE_CONTROL must point to a static or extern variable initialized to PTHREAD_ONCE_INIT. The initialization functions might throw exception which is why this function is not marked with __THROW. */ extern int pthread_once (pthread_once_t *__once_control, void (*__init_routine) (void)) __nonnull ((1, 2)); /* Functions for handling cancellation. Note that these functions are explicitly not marked to not throw an exception in C++ code. If cancellation is implemented by unwinding this is necessary to have the compiler generate the unwind information. */ /* Set cancelability state of current thread to STATE, returning old state in *OLDSTATE if OLDSTATE is not NULL. */ extern int pthread_setcancelstate (int __state, int *__oldstate); /* Set cancellation state of current thread to TYPE, returning the old type in *OLDTYPE if OLDTYPE is not NULL. */ extern int pthread_setcanceltype (int __type, int *__oldtype); /* Cancel THREAD immediately or at the next possibility. */ extern int pthread_cancel (pthread_t __th); /* Test for pending cancellation for the current thread and terminate the thread as per pthread_exit(PTHREAD_CANCELED) if it has been cancelled. */ extern void pthread_testcancel (void); /* Cancellation handling with integration into exception handling. */ typedef struct { struct { __jmp_buf __cancel_jmp_buf; int __mask_was_saved; } __cancel_jmp_buf[1]; void *__pad[4]; } __pthread_unwind_buf_t __attribute__ ((__aligned__)); /* No special attributes by default. */ #ifndef __cleanup_fct_attribute # define __cleanup_fct_attribute #endif # 528 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 /* Structure to hold the cleanup handler information. */ struct __pthread_cleanup_frame { void (*__cancel_routine) (void *); void *__cancel_arg; int __do_it; int __cancel_type; }; #if defined __GNUC__ && defined __EXCEPTIONS # ifdef __cplusplus /* Class to handle cancellation handler invocation. */ class __pthread_cleanup_class { void (*__cancel_routine) (void *); void *__cancel_arg; int __do_it; int __cancel_type; public: __pthread_cleanup_class (void (*__fct) (void *), void *__arg) : __cancel_routine (__fct), __cancel_arg (__arg), __do_it (1) { } ~__pthread_cleanup_class () { if (__do_it) __cancel_routine (__cancel_arg); } void __setdoit (int __newval) { __do_it = __newval; } void __defer () { pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, &__cancel_type); } void __restore () const { pthread_setcanceltype (__cancel_type, 0); } }; /* Install a cleanup handler: ROUTINE will be called with arguments ARG when the thread is canceled or calls pthread_exit. ROUTINE will also be called with arguments ARG when the matching pthread_cleanup_pop is executed with non-zero EXECUTE argument. pthread_cleanup_push and pthread_cleanup_pop are macros and must always be used in matching pairs at the same nesting level of braces. */ # define pthread_cleanup_push(routine, arg) \ do { \ __pthread_cleanup_class __clframe (routine, arg) /* Remove a cleanup handler installed by the matching pthread_cleanup_push. If EXECUTE is non-zero, the handler function is called. */ # define pthread_cleanup_pop(execute) \ __clframe.__setdoit (execute); \ } while (0) # ifdef __USE_GNU /* Install a cleanup handler as pthread_cleanup_push does, but also saves the current cancellation type and sets it to deferred cancellation. */ # define pthread_cleanup_push_defer_np(routine, arg) \ do { \ __pthread_cleanup_class __clframe (routine, arg); \ __clframe.__defer () /* Remove a cleanup handler as pthread_cleanup_pop does, but also restores the cancellation type that was in effect when the matching pthread_cleanup_push_defer was called. */ # define pthread_cleanup_pop_restore_np(execute) \ __clframe.__restore (); \ __clframe.__setdoit (execute); \ } while (0) # endif # 593 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 # else # 594 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 /* Function called to call the cleanup handler. As an extern inline function the compiler is free to decide inlining the change when needed or fall back on the copy which must exist somewhere else. */ __extern_inline void __pthread_cleanup_routine (struct __pthread_cleanup_frame *__frame) { if (__frame->__do_it) __frame->__cancel_routine (__frame->__cancel_arg); } /* Install a cleanup handler: ROUTINE will be called with arguments ARG when the thread is canceled or calls pthread_exit. ROUTINE will also be called with arguments ARG when the matching pthread_cleanup_pop is executed with non-zero EXECUTE argument. pthread_cleanup_push and pthread_cleanup_pop are macros and must always be used in matching pairs at the same nesting level of braces. */ # define pthread_cleanup_push(routine, arg) \ do { \ struct __pthread_cleanup_frame __clframe \ __attribute__ ((__cleanup__ (__pthread_cleanup_routine))) \ = { .__cancel_routine = (routine), .__cancel_arg = (arg), \ .__do_it = 1 }; /* Remove a cleanup handler installed by the matching pthread_cleanup_push. If EXECUTE is non-zero, the handler function is called. */ # define pthread_cleanup_pop(execute) \ __clframe.__do_it = (execute); \ } while (0) # ifdef __USE_GNU /* Install a cleanup handler as pthread_cleanup_push does, but also saves the current cancellation type and sets it to deferred cancellation. */ # define pthread_cleanup_push_defer_np(routine, arg) \ do { \ struct __pthread_cleanup_frame __clframe \ __attribute__ ((__cleanup__ (__pthread_cleanup_routine))) \ = { .__cancel_routine = (routine), .__cancel_arg = (arg), \ .__do_it = 1 }; \ (void) pthread_setcanceltype (PTHREAD_CANCEL_DEFERRED, \ &__clframe.__cancel_type) /* Remove a cleanup handler as pthread_cleanup_pop does, but also restores the cancellation type that was in effect when the matching pthread_cleanup_push_defer was called. */ # define pthread_cleanup_pop_restore_np(execute) \ (void) pthread_setcanceltype (__clframe.__cancel_type, NULL); \ __clframe.__do_it = (execute); \ } while (0) # endif # 646 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 # endif # 647 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 #else # 648 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 /* Install a cleanup handler: ROUTINE will be called with arguments ARG when the thread is canceled or calls pthread_exit. ROUTINE will also be called with arguments ARG when the matching pthread_cleanup_pop is executed with non-zero EXECUTE argument. pthread_cleanup_push and pthread_cleanup_pop are macros and must always be used in matching pairs at the same nesting level of braces. */ # define pthread_cleanup_push(routine, arg) \ do { \ __pthread_unwind_buf_t __cancel_buf; \ void (*__cancel_routine) (void *) = (routine); \ void *__cancel_arg = (arg); \ int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \ __cancel_buf.__cancel_jmp_buf, 0); \ if (__glibc_unlikely (__not_first_call)) \ { \ __cancel_routine (__cancel_arg); \ __pthread_unwind_next (&__cancel_buf); \ /* NOTREACHED */ \ } \ \ __pthread_register_cancel (&__cancel_buf); \ do { extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf) __cleanup_fct_attribute; /* Remove a cleanup handler installed by the matching pthread_cleanup_push. If EXECUTE is non-zero, the handler function is called. */ # define pthread_cleanup_pop(execute) \ do { } while (0);/* Empty to allow label before pthread_cleanup_pop. */\ } while (0); \ __pthread_unregister_cancel (&__cancel_buf); \ if (execute) \ __cancel_routine (__cancel_arg); \ } while (0) extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf) __cleanup_fct_attribute; # ifdef __USE_GNU /* Install a cleanup handler as pthread_cleanup_push does, but also saves the current cancellation type and sets it to deferred cancellation. */ # define pthread_cleanup_push_defer_np(routine, arg) \ do { \ __pthread_unwind_buf_t __cancel_buf; \ void (*__cancel_routine) (void *) = (routine); \ void *__cancel_arg = (arg); \ int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) \ __cancel_buf.__cancel_jmp_buf, 0); \ if (__glibc_unlikely (__not_first_call)) \ { \ __cancel_routine (__cancel_arg); \ __pthread_unwind_next (&__cancel_buf); \ /* NOTREACHED */ \ } \ \ __pthread_register_cancel_defer (&__cancel_buf); \ do { extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf) __cleanup_fct_attribute; /* Remove a cleanup handler as pthread_cleanup_pop does, but also restores the cancellation type that was in effect when the matching pthread_cleanup_push_defer was called. */ # define pthread_cleanup_pop_restore_np(execute) \ do { } while (0);/* Empty to allow label before pthread_cleanup_pop. */\ } while (0); \ __pthread_unregister_cancel_restore (&__cancel_buf); \ if (execute) \ __cancel_routine (__cancel_arg); \ } while (0) extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf) __cleanup_fct_attribute; # endif # 722 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 /* Internal interface to initiate cleanup. */ extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf) __cleanup_fct_attribute __attribute__ ((__noreturn__)) # ifndef SHARED __attribute__ ((__weak__)) # endif # 729 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 ; #endif # 731 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 /* Function used in the macros. */ struct __jmp_buf_tag; extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROWNL; /* Mutex handling. */ /* Initialize a mutex. */ extern int pthread_mutex_init (pthread_mutex_t *__mutex, const pthread_mutexattr_t *__mutexattr) __THROW __nonnull ((1)); /* Destroy a mutex. */ extern int pthread_mutex_destroy (pthread_mutex_t *__mutex) __THROW __nonnull ((1)); /* Try locking a mutex. */ extern int pthread_mutex_trylock (pthread_mutex_t *__mutex) __THROWNL __nonnull ((1)); /* Lock a mutex. */ extern int pthread_mutex_lock (pthread_mutex_t *__mutex) __THROWNL __nonnull ((1)); #ifdef __USE_XOPEN2K /* Wait until lock becomes available, or specified time passes. */ extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex, const struct timespec *__restrict __abstime) __THROWNL __nonnull ((1, 2)); #endif # 762 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 /* Unlock a mutex. */ extern int pthread_mutex_unlock (pthread_mutex_t *__mutex) __THROWNL __nonnull ((1)); /* Get the priority ceiling of MUTEX. */ extern int pthread_mutex_getprioceiling (const pthread_mutex_t * __restrict __mutex, int *__restrict __prioceiling) __THROW __nonnull ((1, 2)); /* Set the priority ceiling of MUTEX to PRIOCEILING, return old priority ceiling value in *OLD_CEILING. */ extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex, int __prioceiling, int *__restrict __old_ceiling) __THROW __nonnull ((1, 3)); #ifdef __USE_XOPEN2K8 /* Declare the state protected by MUTEX as consistent. */ extern int pthread_mutex_consistent (pthread_mutex_t *__mutex) __THROW __nonnull ((1)); # ifdef __USE_GNU extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex) __THROW __nonnull ((1)); # endif # 790 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 #endif # 791 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 /* Functions for handling mutex attributes. */ /* Initialize mutex attribute object ATTR with default attributes (kind is PTHREAD_MUTEX_TIMED_NP). */ extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr) __THROW __nonnull ((1)); /* Destroy mutex attribute object ATTR. */ extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr) __THROW __nonnull ((1)); /* Get the process-shared flag of the mutex attribute ATTR. */ extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t * __restrict __attr, int *__restrict __pshared) __THROW __nonnull ((1, 2)); /* Set the process-shared flag of the mutex attribute ATTR. */ extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr, int __pshared) __THROW __nonnull ((1)); #if defined __USE_UNIX98 || defined __USE_XOPEN2K8 /* Return in *KIND the mutex kind attribute in *ATTR. */ extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict __attr, int *__restrict __kind) __THROW __nonnull ((1, 2)); /* Set the mutex kind attribute in *ATTR to KIND (either PTHREAD_MUTEX_NORMAL, PTHREAD_MUTEX_RECURSIVE, PTHREAD_MUTEX_ERRORCHECK, or PTHREAD_MUTEX_DEFAULT). */ extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind) __THROW __nonnull ((1)); #endif # 827 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 /* Return in *PROTOCOL the mutex protocol attribute in *ATTR. */ extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t * __restrict __attr, int *__restrict __protocol) __THROW __nonnull ((1, 2)); /* Set the mutex protocol attribute in *ATTR to PROTOCOL (either PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT, or PTHREAD_PRIO_PROTECT). */ extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr, int __protocol) __THROW __nonnull ((1)); /* Return in *PRIOCEILING the mutex prioceiling attribute in *ATTR. */ extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t * __restrict __attr, int *__restrict __prioceiling) __THROW __nonnull ((1, 2)); /* Set the mutex prioceiling attribute in *ATTR to PRIOCEILING. */ extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr, int __prioceiling) __THROW __nonnull ((1)); #ifdef __USE_XOPEN2K /* Get the robustness flag of the mutex attribute ATTR. */ extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr, int *__robustness) __THROW __nonnull ((1, 2)); # ifdef __USE_GNU extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr, int *__robustness) __THROW __nonnull ((1, 2)); # endif # 861 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 /* Set the robustness flag of the mutex attribute ATTR. */ extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr, int __robustness) __THROW __nonnull ((1)); # ifdef __USE_GNU extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr, int __robustness) __THROW __nonnull ((1)); # endif # 871 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 #endif # 872 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 #if defined __USE_UNIX98 || defined __USE_XOPEN2K /* Functions for handling read-write locks. */ /* Initialize read-write lock RWLOCK using attributes ATTR, or use the default values if later is NULL. */ extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock, const pthread_rwlockattr_t *__restrict __attr) __THROW __nonnull ((1)); /* Destroy read-write lock RWLOCK. */ extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock) __THROW __nonnull ((1)); /* Acquire read lock for RWLOCK. */ extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock) __THROWNL __nonnull ((1)); /* Try to acquire read lock for RWLOCK. */ extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock) __THROWNL __nonnull ((1)); # ifdef __USE_XOPEN2K /* Try to acquire read lock for RWLOCK or return after specfied time. */ extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock, const struct timespec *__restrict __abstime) __THROWNL __nonnull ((1, 2)); # endif # 901 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 /* Acquire write lock for RWLOCK. */ extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock) __THROWNL __nonnull ((1)); /* Try to acquire write lock for RWLOCK. */ extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock) __THROWNL __nonnull ((1)); # ifdef __USE_XOPEN2K /* Try to acquire write lock for RWLOCK or return after specfied time. */ extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock, const struct timespec *__restrict __abstime) __THROWNL __nonnull ((1, 2)); # endif # 916 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 /* Unlock RWLOCK. */ extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock) __THROWNL __nonnull ((1)); /* Functions for handling read-write lock attributes. */ /* Initialize attribute object ATTR with default values. */ extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr) __THROW __nonnull ((1)); /* Destroy attribute object ATTR. */ extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr) __THROW __nonnull ((1)); /* Return current setting of process-shared attribute of ATTR in PSHARED. */ extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pshared) __THROW __nonnull ((1, 2)); /* Set process-shared attribute of ATTR to PSHARED. */ extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr, int __pshared) __THROW __nonnull ((1)); /* Return current setting of reader/writer preference. */ extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t * __restrict __attr, int *__restrict __pref) __THROW __nonnull ((1, 2)); /* Set reader/write preference. */ extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr, int __pref) __THROW __nonnull ((1)); #endif # 953 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 /* Functions for handling conditional variables. */ /* Initialize condition variable COND using attributes ATTR, or use the default values if later is NULL. */ extern int pthread_cond_init (pthread_cond_t *__restrict __cond, const pthread_condattr_t *__restrict __cond_attr) __THROW __nonnull ((1)); /* Destroy condition variable COND. */ extern int pthread_cond_destroy (pthread_cond_t *__cond) __THROW __nonnull ((1)); /* Wake up one thread waiting for condition variable COND. */ extern int pthread_cond_signal (pthread_cond_t *__cond) __THROWNL __nonnull ((1)); /* Wake up all threads waiting for condition variables COND. */ extern int pthread_cond_broadcast (pthread_cond_t *__cond) __THROWNL __nonnull ((1)); /* Wait for condition variable COND to be signaled or broadcast. MUTEX is assumed to be locked before. This function is a cancellation point and therefore not marked with __THROW. */ extern int pthread_cond_wait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex) __nonnull ((1, 2)); /* Wait for condition variable COND to be signaled or broadcast until ABSTIME. MUTEX is assumed to be locked before. ABSTIME is an absolute time specification; zero is the beginning of the epoch (00:00:00 GMT, January 1, 1970). This function is a cancellation point and therefore not marked with __THROW. */ extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond, pthread_mutex_t *__restrict __mutex, const struct timespec *__restrict __abstime) __nonnull ((1, 2, 3)); /* Functions for handling condition variable attributes. */ /* Initialize condition variable attribute ATTR. */ extern int pthread_condattr_init (pthread_condattr_t *__attr) __THROW __nonnull ((1)); /* Destroy condition variable attribute ATTR. */ extern int pthread_condattr_destroy (pthread_condattr_t *__attr) __THROW __nonnull ((1)); /* Get the process-shared flag of the condition variable attribute ATTR. */ extern int pthread_condattr_getpshared (const pthread_condattr_t * __restrict __attr, int *__restrict __pshared) __THROW __nonnull ((1, 2)); /* Set the process-shared flag of the condition variable attribute ATTR. */ extern int pthread_condattr_setpshared (pthread_condattr_t *__attr, int __pshared) __THROW __nonnull ((1)); #ifdef __USE_XOPEN2K /* Get the clock selected for the conditon variable attribute ATTR. */ extern int pthread_condattr_getclock (const pthread_condattr_t * __restrict __attr, __clockid_t *__restrict __clock_id) __THROW __nonnull ((1, 2)); /* Set the clock selected for the conditon variable attribute ATTR. */ extern int pthread_condattr_setclock (pthread_condattr_t *__attr, __clockid_t __clock_id) __THROW __nonnull ((1)); #endif # 1028 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 #ifdef __USE_XOPEN2K /* Functions to handle spinlocks. */ /* Initialize the spinlock LOCK. If PSHARED is nonzero the spinlock can be shared between different processes. */ extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared) __THROW __nonnull ((1)); /* Destroy the spinlock LOCK. */ extern int pthread_spin_destroy (pthread_spinlock_t *__lock) __THROW __nonnull ((1)); /* Wait until spinlock LOCK is retrieved. */ extern int pthread_spin_lock (pthread_spinlock_t *__lock) __THROWNL __nonnull ((1)); /* Try to lock spinlock LOCK. */ extern int pthread_spin_trylock (pthread_spinlock_t *__lock) __THROWNL __nonnull ((1)); /* Release spinlock LOCK. */ extern int pthread_spin_unlock (pthread_spinlock_t *__lock) __THROWNL __nonnull ((1)); /* Functions to handle barriers. */ /* Initialize BARRIER with the attributes in ATTR. The barrier is opened when COUNT waiters arrived. */ extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier, const pthread_barrierattr_t *__restrict __attr, unsigned int __count) __THROW __nonnull ((1)); /* Destroy a previously dynamically initialized barrier BARRIER. */ extern int pthread_barrier_destroy (pthread_barrier_t *__barrier) __THROW __nonnull ((1)); /* Wait on barrier BARRIER. */ extern int pthread_barrier_wait (pthread_barrier_t *__barrier) __THROWNL __nonnull ((1)); /* Initialize barrier attribute ATTR. */ extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr) __THROW __nonnull ((1)); /* Destroy previously dynamically initialized barrier attribute ATTR. */ extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr) __THROW __nonnull ((1)); /* Get the process-shared flag of the barrier attribute ATTR. */ extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t * __restrict __attr, int *__restrict __pshared) __THROW __nonnull ((1, 2)); /* Set the process-shared flag of the barrier attribute ATTR. */ extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr, int __pshared) __THROW __nonnull ((1)); #endif # 1092 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 /* Functions for handling thread-specific data. */ /* Create a key value identifying a location in the thread-specific data area. Each thread maintains a distinct thread-specific data area. DESTR_FUNCTION, if non-NULL, is called with the value associated to that key when the key is destroyed. DESTR_FUNCTION is not called if the value associated is NULL when the key is destroyed. */ extern int pthread_key_create (pthread_key_t *__key, void (*__destr_function) (void *)) __THROW __nonnull ((1)); /* Destroy KEY. */ extern int pthread_key_delete (pthread_key_t __key) __THROW; /* Return current value of the thread-specific data slot identified by KEY. */ extern void *pthread_getspecific (pthread_key_t __key) __THROW; /* Store POINTER in the thread-specific data slot identified by KEY. */ extern int pthread_setspecific (pthread_key_t __key, const void *__pointer) __THROW ; #ifdef __USE_XOPEN2K /* Get ID of CPU-time clock for thread THREAD_ID. */ extern int pthread_getcpuclockid (pthread_t __thread_id, __clockid_t *__clock_id) __THROW __nonnull ((2)); #endif # 1123 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 /* Install handlers to be called when a new process is created with FORK. The PREPARE handler is called in the parent process just before performing FORK. The PARENT handler is called in the parent process just after FORK. The CHILD handler is called in the child process. Each of the three handlers can be NULL, meaning that no handler needs to be called at that point. PTHREAD_ATFORK can be called several times, in which case the PREPARE handlers are called in LIFO order (last added with PTHREAD_ATFORK, first called before FORK), and the PARENT and CHILD handlers are called in FIFO (first added, first called). */ extern int pthread_atfork (void (*__prepare) (void), void (*__parent) (void), void (*__child) (void)) __THROW; #ifdef __USE_EXTERN_INLINES /* Optimizations. */ __extern_inline int __NTH (pthread_equal (pthread_t __thread1, pthread_t __thread2)) { return __thread1 == __thread2; } #endif # 1149 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 __END_DECLS #endif /* pthread.h */ # 1153 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/pthread.h" 3 # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread_posix.h" 2 typedef pthread_mutex_t MPL_thread_mutex_t; typedef pthread_cond_t MPL_thread_cond_t; typedef pthread_t MPL_thread_id_t; typedef pthread_key_t MPL_thread_tls_t; #if defined(MPL_NEEDS_PTHREAD_MUTEXATTR_SETTYPE_DECL) int pthread_mutexattr_settype(pthread_mutexattr_t * attr, int kind); #endif /* MPL_NEEDS_PTHREAD_MUTEXATTR_SETTYPE_DECL */ # 27 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread_posix.h" typedef void (*MPL_thread_func_t) (void *data); void MPL_thread_create(MPL_thread_func_t func, void *data, MPL_thread_id_t * id, int *err); #define MPL_thread_exit() \ do { \ pthread_exit(NULL); \ } while (0) #define MPL_thread_self(id_) \ do { \ *(id_) = pthread_self(); \ } while (0) #define MPL_thread_same(id1_, id2_, same_) \ do { \ *(same_) = pthread_equal(*(id1_), *(id2_)) ? TRUE : FALSE; \ } while (0) #define MPL_thread_yield MPL_sched_yield /* * Mutexes */ /* FIXME: mutex creation and destruction should be implemented as routines because there is no reason to use macros (these are not on the performance critical path). Making these macros requires that any code that might use these must load all of the pthread.h (or other thread library) support. */ /* FIXME: using constant initializer if available */ /* FIXME: convert errors to an MPL_THREAD_ERR value */ #if !defined(MPL_PTHREAD_MUTEX_ERRORCHECK_VALUE) #define MPL_thread_mutex_create(mutex_ptr_, err_ptr_) \ do { \ int err__; \ \ err__ = pthread_mutex_init(mutex_ptr_, NULL); \ if (unlikely(err__)) \ MPL_internal_sys_error_printf("pthread_mutex_init", err__, \ " %s:%d\n", __FILE__, __LINE__); \ *(int *)(err_ptr_) = err__; \ } while (0) #else /* defined(MPL_PTHREAD_MUTEX_ERRORCHECK_VALUE) */ # 77 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread_posix.h" #define MPL_thread_mutex_create(mutex_ptr_, err_ptr_) \ do { \ int err__; \ pthread_mutexattr_t attr__; \ \ pthread_mutexattr_init(&attr__); \ pthread_mutexattr_settype(&attr__, MPL_PTHREAD_MUTEX_ERRORCHECK_VALUE); \ err__ = pthread_mutex_init(mutex_ptr_, &attr__); \ if (unlikely(err__)) \ MPL_internal_sys_error_printf("pthread_mutex_init", err__, \ " %s:%d\n", __FILE__, __LINE__); \ *(int *)(err_ptr_) = err__; \ } while (0) #endif /* defined(MPL_PTHREAD_MUTEX_ERRORCHECK_VALUE) */ # 93 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread_posix.h" #define MPL_thread_mutex_destroy(mutex_ptr_, err_ptr_) \ do { \ int err__; \ \ err__ = pthread_mutex_destroy(mutex_ptr_); \ if (unlikely(err__)) \ MPL_internal_sys_error_printf("pthread_mutex_destroy", err__, \ " %s:%d\n", __FILE__, __LINE__); \ *(int *)(err_ptr_) = err__; \ } while (0) #define MPL_thread_mutex_lock(mutex_ptr_, err_ptr_) \ do { \ int err__; \ err__ = pthread_mutex_lock(mutex_ptr_); \ if (unlikely(err__)) { \ MPL_internal_sys_error_printf("pthread_mutex_lock", err__, \ " %s:%d\n", __FILE__, __LINE__); \ } \ *(int *)(err_ptr_) = err__; \ } while (0) #define MPL_thread_mutex_unlock(mutex_ptr_, err_ptr_) \ do { \ int err__; \ \ err__ = pthread_mutex_unlock(mutex_ptr_); \ if (unlikely(err__)) { \ MPL_internal_sys_error_printf("pthread_mutex_unlock", err__, \ " %s:%d\n", __FILE__, __LINE__); \ } \ *(int *)(err_ptr_) = err__; \ } while (0) /* * Condition Variables */ #define MPL_thread_cond_create(cond_ptr_, err_ptr_) \ do { \ int err__; \ \ err__ = pthread_cond_init((cond_ptr_), NULL); \ if (unlikely(err__)) \ MPL_internal_sys_error_printf("pthread_cond_init", err__, \ " %s:%d\n", __FILE__, __LINE__); \ *(int *)(err_ptr_) = err__; \ } while (0) #define MPL_thread_cond_destroy(cond_ptr_, err_ptr_) \ do { \ int err__; \ \ err__ = pthread_cond_destroy(cond_ptr_); \ if (unlikely(err__)) \ MPL_internal_sys_error_printf("pthread_cond_destroy", err__, \ " %s:%d\n", __FILE__, __LINE__); \ *(int *)(err_ptr_) = err__; \ } while (0) #define MPL_thread_cond_wait(cond_ptr_, mutex_ptr_, err_ptr_) \ do { \ int err__; \ \ /* The latest pthread specification says that cond_wait \ * routines aren't allowed to return EINTR, but some of the \ * older implementations still do. */ \ do { \ err__ = pthread_cond_wait((cond_ptr_), mutex_ptr_); \ } while (err__ == EINTR); \ if (unlikely(err__)) \ MPL_internal_sys_error_printf("pthread_cond_wait", err__, \ " %s:%d\n", __FILE__, __LINE__); \ \ *(int *)(err_ptr_) = err__; \ } while (0) #define MPL_thread_cond_broadcast(cond_ptr_, err_ptr_) \ do { \ int err__; \ \ err__ = pthread_cond_broadcast(cond_ptr_); \ if (unlikely(err__)) \ MPL_internal_sys_error_printf("pthread_cond_broadcast", err__, \ " %s:%d\n", __FILE__, __LINE__); \ \ *(int *)(err_ptr_) = err__; \ } while (0) #define MPL_thread_cond_signal(cond_ptr_, err_ptr_) \ do { \ int err__; \ \ err__ = pthread_cond_signal(cond_ptr_); \ if (unlikely(err__)) \ MPL_internal_sys_error_printf("pthread_cond_signal", err__, \ " %s:%d\n", __FILE__, __LINE__); \ \ *(int *)(err_ptr_) = err__; \ } while (0) /* * Thread Local Storage */ #define MPL_thread_tls_create(exit_func_ptr_, tls_ptr_, err_ptr_) \ do { \ int err__; \ \ err__ = pthread_key_create((tls_ptr_), (exit_func_ptr_)); \ if (unlikely(err__)) \ MPL_internal_sys_error_printf("pthread_key_create", err__, \ " %s:%d\n", __FILE__, __LINE__); \ \ *(int *)(err_ptr_) = err__; \ } while (0) #define MPL_thread_tls_destroy(tls_ptr_, err_ptr_) \ do { \ int err__; \ \ err__ = pthread_key_delete(*(tls_ptr_)); \ if (unlikely(err__)) \ MPL_internal_sys_error_printf("pthread_key_delete", err__, \ " %s:%d\n", __FILE__, __LINE__); \ \ *(int *)(err_ptr_) = err__; \ } while (0) #define MPL_thread_tls_set(tls_ptr_, value_, err_ptr_) \ do { \ int err__; \ \ err__ = pthread_setspecific(*(tls_ptr_), (value_)); \ if (unlikely(err__)) \ MPL_internal_sys_error_printf("pthread_setspecific", err__, \ " %s:%d\n", __FILE__, __LINE__); \ \ *(int *)(err_ptr_) = err__; \ } while (0) #define MPL_thread_tls_get(tls_ptr_, value_ptr_, err_ptr_) \ do { \ *(value_ptr_) = pthread_getspecific(*(tls_ptr_)); \ \ *(int *)(err_ptr_) = MPL_THREAD_SUCCESS; \ } while (0) #endif /* MPL_THREAD_POSIX_H_INCLUDED */ # 247 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread_posix.h" # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread.h" 2 #elif defined(MPL_THREAD_PACKAGE_NAME) && (MPL_THREAD_PACKAGE_NAME == MPL_THREAD_PACKAGE_SOLARIS) # 22 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread.h" #if 0 /* expanded by -frewrite-includes */ # include "mpl_thread_solaris.h" #endif /* expanded by -frewrite-includes */ # 22 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread.h" # 23 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread.h" #elif defined(MPL_THREAD_PACKAGE_NAME) && (MPL_THREAD_PACKAGE_NAME == MPL_THREAD_PACKAGE_WIN) # 24 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread.h" #if 0 /* expanded by -frewrite-includes */ # include "mpl_thread_win.h" #endif /* expanded by -frewrite-includes */ # 24 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread.h" # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread.h" #elif defined(MPL_THREAD_PACKAGE_NAME) && (MPL_THREAD_PACKAGE_NAME == MPL_THREAD_PACKAGE_NONE) # 26 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread.h" typedef int MPL_thread_mutex_t; typedef int MPL_thread_cond_t; typedef int MPL_thread_id_t; typedef int MPL_thread_tls_t; typedef void (*MPL_thread_func_t) (void *data); #define MPL_thread_mutex_create(mutex_ptr_, err_ptr_) { *((int*)err_ptr_) = 0;} #define MPL_thread_mutex_destroy(mutex_ptr_, err_ptr_) { *((int*)err_ptr_) = 0;} #else # 34 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread.h" # error "thread package not defined or unknown" #endif # 36 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread.h" /* Error values */ #define MPL_THREAD_SUCCESS 0 #define MPL_THREAD_ERROR 1 /* FIXME: Define other error codes. For now, any non-zero value is an error. */ #if 0 /* expanded by -frewrite-includes */ #include "mpl_thread_priv.h" #endif /* expanded by -frewrite-includes */ # 42 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread_priv.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPL_THREAD_PRIV_H_INCLUDED) #define MPL_THREAD_PRIV_H_INCLUDED #if MPL_THREAD_PACKAGE_NAME != MPL_THREAD_PACKAGE_NONE && !defined(MPL_TLS_SPECIFIER) /* We need to provide a function that will cleanup the storage attached * to the key. */ void MPLI_cleanup_tls(void *a); /* In the case where the thread level is set in MPI_Init_thread, we need a blended version of the non-threaded and the thread-multiple definitions. The approach is to have TWO MPLI_per_thread_t pointers. One is local (The MPL_THREADPRIV_DECL is used in the routines local definitions), as in the threaded version of these macros. This is set by using a routine to get thread-private storage. The second is a preallocated, extern MPLI_per_thread_t struct, as in the single threaded case. Based on whether MPL is initialized with thread safety, one or the other is used. */ #define MPL_THREADPRIV_KEY_CREATE(key, var, err_ptr_) \ do { \ void *thread_ptr; \ \ MPL_thread_tls_create(MPLI_cleanup_tls, &(key) , err_ptr_); \ if (unlikely(*((int *) err_ptr_))) \ break; \ thread_ptr = MPL_calloc(1, sizeof(var)); \ if (unlikely(!thread_ptr)) { \ *((int *) err_ptr_) = MPL_THREAD_ERROR; \ break; \ } \ MPL_thread_tls_set(&(key), thread_ptr, err_ptr_); \ } while (0) #define MPL_THREADPRIV_KEY_GET_ADDR(is_threaded, key, var, addr, err_ptr_) \ do { \ if (is_threaded) { \ void *thread_ptr; \ MPL_thread_tls_get(&(key), &thread_ptr, err_ptr_); \ if (unlikely(*((int *) err_ptr_))) \ break; \ if (!thread_ptr) { \ thread_ptr = MPL_calloc(1, sizeof(var)); \ if (unlikely(!thread_ptr)) { \ *((int *) err_ptr_) = MPL_THREAD_ERROR; \ break; \ } \ MPL_thread_tls_set(&(key), thread_ptr, err_ptr_); \ if (unlikely(*((int *) err_ptr_))) \ break; \ } \ addr = thread_ptr; \ } \ else { \ addr = &(var); \ } \ } while (0) #define MPL_THREADPRIV_KEY_DESTROY(key, err_ptr_) \ do { \ void *thread_ptr; \ \ MPL_thread_tls_get(&(key), &thread_ptr, err_ptr_); \ if (unlikely(*((int *) err_ptr_))) \ break; \ \ if (thread_ptr) \ MPL_free(thread_ptr); \ \ MPL_thread_tls_set(&(key), NULL, err_ptr_); \ if (unlikely(*((int *) err_ptr_))) \ break; \ \ MPL_thread_tls_destroy(&(key), err_ptr_); \ } while (0) #else /* MPL_THREAD_PACKAGE_NAME != MPL_THREAD_PACKAGE_NONE || defined(MPL_TLS_SPECIFIER) */ # 85 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread_priv.h" /* We have proper thread-local storage (TLS) support from the compiler, which * should yield the best performance and simplest code, so we'll use that. */ #define MPL_THREADPRIV_KEY_CREATE(...) #define MPL_THREADPRIV_KEY_GET_ADDR(is_threaded, key, var, addr, err_ptr_) \ do { \ addr = &(var); \ *((int *) err_ptr_) = MPL_THREAD_SUCCESS; \ } while (0) #define MPL_THREADPRIV_KEY_DESTROY(...) #endif # 97 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread_priv.h" #endif /* !defined(MPL_THREAD_PRIV_H_INCLUDED) */ # 99 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread_priv.h" # 43 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread.h" 2 #endif /* !defined(MPL_THREAD_H_INCLUDED) */ # 45 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_thread.h" # 22 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpl_timer.h" #endif /* expanded by -frewrite-includes */ # 22 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 1 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" 1 /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPL_TIMER_H_INCLUDED) #define MPL_TIMER_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mplconfig.h" #endif /* expanded by -frewrite-includes */ # 10 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" # 11 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" #if defined (MPL_HAVE_UNISTD_H) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 13 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 1 3 /* Copyright (C) 1991-2009, 2010, 2011, 2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 2.10 Symbolic Constants */ #ifndef _UNISTD_H #define _UNISTD_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 25 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 __BEGIN_DECLS /* These may be used to determine what facilities are present at compile time. Their values can be obtained at run time from `sysconf'. */ #ifdef __USE_XOPEN2K8 /* POSIX Standard approved as ISO/IEC 9945-1 as of September 2008. */ # define _POSIX_VERSION 200809L #elif defined __USE_XOPEN2K # 36 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* POSIX Standard approved as ISO/IEC 9945-1 as of December 2001. */ # define _POSIX_VERSION 200112L #elif defined __USE_POSIX199506 # 39 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* POSIX Standard approved as ISO/IEC 9945-1 as of June 1995. */ # define _POSIX_VERSION 199506L #elif defined __USE_POSIX199309 # 42 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* POSIX Standard approved as ISO/IEC 9945-1 as of September 1993. */ # define _POSIX_VERSION 199309L #else # 45 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* POSIX Standard approved as ISO/IEC 9945-1 as of September 1990. */ # define _POSIX_VERSION 199009L #endif # 48 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* These are not #ifdef __USE_POSIX2 because they are in the theoretically application-owned namespace. */ #ifdef __USE_XOPEN2K8 # define __POSIX2_THIS_VERSION 200809L /* The utilities on GNU systems also correspond to this version. */ #elif defined __USE_XOPEN2K # 56 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* The utilities on GNU systems also correspond to this version. */ # define __POSIX2_THIS_VERSION 200112L #elif defined __USE_POSIX199506 # 59 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* The utilities on GNU systems also correspond to this version. */ # define __POSIX2_THIS_VERSION 199506L #else # 62 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* The utilities on GNU systems also correspond to this version. */ # define __POSIX2_THIS_VERSION 199209L #endif # 65 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* The utilities on GNU systems also correspond to this version. */ #define _POSIX2_VERSION __POSIX2_THIS_VERSION /* If defined, the implementation supports the C Language Bindings Option. */ #define _POSIX2_C_BIND __POSIX2_THIS_VERSION /* If defined, the implementation supports the C Language Development Utilities Option. */ #define _POSIX2_C_DEV __POSIX2_THIS_VERSION /* If defined, the implementation supports the Software Development Utilities Option. */ #define _POSIX2_SW_DEV __POSIX2_THIS_VERSION /* If defined, the implementation supports the creation of locales with the localedef utility. */ #define _POSIX2_LOCALEDEF __POSIX2_THIS_VERSION /* X/Open version number to which the library conforms. It is selectable. */ #ifdef __USE_XOPEN2K8 # define _XOPEN_VERSION 700 #elif defined __USE_XOPEN2K # 89 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # define _XOPEN_VERSION 600 #elif defined __USE_UNIX98 # 91 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # define _XOPEN_VERSION 500 #else # 93 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # define _XOPEN_VERSION 4 #endif # 95 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Commands and utilities from XPG4 are available. */ #define _XOPEN_XCU_VERSION 4 /* We are compatible with the old published standards as well. */ #define _XOPEN_XPG2 1 #define _XOPEN_XPG3 1 #define _XOPEN_XPG4 1 /* The X/Open Unix extensions are available. */ #define _XOPEN_UNIX 1 /* Encryption is present. */ #define _XOPEN_CRYPT 1 /* The enhanced internationalization capabilities according to XPG4.2 are present. */ #define _XOPEN_ENH_I18N 1 /* The legacy interfaces are also available. */ #define _XOPEN_LEGACY 1 /* Get values of POSIX options: If these symbols are defined, the corresponding features are always available. If not, they may be available sometimes. The current values can be obtained with `sysconf'. _POSIX_JOB_CONTROL Job control is supported. _POSIX_SAVED_IDS Processes have a saved set-user-ID and a saved set-group-ID. _POSIX_REALTIME_SIGNALS Real-time, queued signals are supported. _POSIX_PRIORITY_SCHEDULING Priority scheduling is supported. _POSIX_TIMERS POSIX.4 clocks and timers are supported. _POSIX_ASYNCHRONOUS_IO Asynchronous I/O is supported. _POSIX_PRIORITIZED_IO Prioritized asynchronous I/O is supported. _POSIX_SYNCHRONIZED_IO Synchronizing file data is supported. _POSIX_FSYNC The fsync function is present. _POSIX_MAPPED_FILES Mapping of files to memory is supported. _POSIX_MEMLOCK Locking of all memory is supported. _POSIX_MEMLOCK_RANGE Locking of ranges of memory is supported. _POSIX_MEMORY_PROTECTION Setting of memory protections is supported. _POSIX_MESSAGE_PASSING POSIX.4 message queues are supported. _POSIX_SEMAPHORES POSIX.4 counting semaphores are supported. _POSIX_SHARED_MEMORY_OBJECTS POSIX.4 shared memory objects are supported. _POSIX_THREADS POSIX.1c pthreads are supported. _POSIX_THREAD_ATTR_STACKADDR Thread stack address attribute option supported. _POSIX_THREAD_ATTR_STACKSIZE Thread stack size attribute option supported. _POSIX_THREAD_SAFE_FUNCTIONS Thread-safe functions are supported. _POSIX_THREAD_PRIORITY_SCHEDULING POSIX.1c thread execution scheduling supported. _POSIX_THREAD_PRIO_INHERIT Thread priority inheritance option supported. _POSIX_THREAD_PRIO_PROTECT Thread priority protection option supported. _POSIX_THREAD_PROCESS_SHARED Process-shared synchronization supported. _POSIX_PII Protocol-independent interfaces are supported. _POSIX_PII_XTI XTI protocol-indep. interfaces are supported. _POSIX_PII_SOCKET Socket protocol-indep. interfaces are supported. _POSIX_PII_INTERNET Internet family of protocols supported. _POSIX_PII_INTERNET_STREAM Connection-mode Internet protocol supported. _POSIX_PII_INTERNET_DGRAM Connectionless Internet protocol supported. _POSIX_PII_OSI ISO/OSI family of protocols supported. _POSIX_PII_OSI_COTS Connection-mode ISO/OSI service supported. _POSIX_PII_OSI_CLTS Connectionless ISO/OSI service supported. _POSIX_POLL Implementation supports `poll' function. _POSIX_SELECT Implementation supports `select' and `pselect'. _XOPEN_REALTIME X/Open realtime support is available. _XOPEN_REALTIME_THREADS X/Open realtime thread support is available. _XOPEN_SHM Shared memory interface according to XPG4.2. _XBS5_ILP32_OFF32 Implementation provides environment with 32-bit int, long, pointer, and off_t types. _XBS5_ILP32_OFFBIG Implementation provides environment with 32-bit int, long, and pointer and off_t with at least 64 bits. _XBS5_LP64_OFF64 Implementation provides environment with 32-bit int, and 64-bit long, pointer, and off_t types. _XBS5_LPBIG_OFFBIG Implementation provides environment with at least 32 bits int and long, pointer, and off_t with at least 64 bits. If any of these symbols is defined as -1, the corresponding option is not true for any file. If any is defined as other than -1, the corresponding option is true for all files. If a symbol is not defined at all, the value for a specific file can be obtained from `pathconf' and `fpathconf'. _POSIX_CHOWN_RESTRICTED Only the super user can use `chown' to change the owner of a file. `chown' can only be used to change the group ID of a file to a group of which the calling process is a member. _POSIX_NO_TRUNC Pathname components longer than NAME_MAX generate an error. _POSIX_VDISABLE If defined, if the value of an element of the `c_cc' member of `struct termios' is _POSIX_VDISABLE, no character will have the effect associated with that element. _POSIX_SYNC_IO Synchronous I/O may be performed. _POSIX_ASYNC_IO Asynchronous I/O may be performed. _POSIX_PRIO_IO Prioritized Asynchronous I/O may be performed. Support for the Large File Support interface is not generally available. If it is available the following constants are defined to one. _LFS64_LARGEFILE Low-level I/O supports large files. _LFS64_STDIO Standard I/O supports large files. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 202 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix_opt.h" 1 3 /* Define POSIX options for Linux. Copyright (C) 1996-2004, 2006, 2008, 2009 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; see the file COPYING.LIB. If not, see . */ #ifndef _BITS_POSIX_OPT_H #define _BITS_POSIX_OPT_H 1 /* Job control is supported. */ #define _POSIX_JOB_CONTROL 1 /* Processes have a saved set-user-ID and a saved set-group-ID. */ #define _POSIX_SAVED_IDS 1 /* Priority scheduling is supported. */ #define _POSIX_PRIORITY_SCHEDULING 200809L /* Synchronizing file data is supported. */ #define _POSIX_SYNCHRONIZED_IO 200809L /* The fsync function is present. */ #define _POSIX_FSYNC 200809L /* Mapping of files to memory is supported. */ #define _POSIX_MAPPED_FILES 200809L /* Locking of all memory is supported. */ #define _POSIX_MEMLOCK 200809L /* Locking of ranges of memory is supported. */ #define _POSIX_MEMLOCK_RANGE 200809L /* Setting of memory protections is supported. */ #define _POSIX_MEMORY_PROTECTION 200809L /* Some filesystems allow all users to change file ownership. */ #define _POSIX_CHOWN_RESTRICTED 0 /* `c_cc' member of 'struct termios' structure can be disabled by using the value _POSIX_VDISABLE. */ #define _POSIX_VDISABLE '\0' /* Filenames are not silently truncated. */ #define _POSIX_NO_TRUNC 1 /* X/Open realtime support is available. */ #define _XOPEN_REALTIME 1 /* X/Open thread realtime support is available. */ #define _XOPEN_REALTIME_THREADS 1 /* XPG4.2 shared memory is supported. */ #define _XOPEN_SHM 1 /* Tell we have POSIX threads. */ #define _POSIX_THREADS 200809L /* We have the reentrant functions described in POSIX. */ #define _POSIX_REENTRANT_FUNCTIONS 1 #define _POSIX_THREAD_SAFE_FUNCTIONS 200809L /* We provide priority scheduling for threads. */ #define _POSIX_THREAD_PRIORITY_SCHEDULING 200809L /* We support user-defined stack sizes. */ #define _POSIX_THREAD_ATTR_STACKSIZE 200809L /* We support user-defined stacks. */ #define _POSIX_THREAD_ATTR_STACKADDR 200809L /* We support priority inheritence. */ #define _POSIX_THREAD_PRIO_INHERIT 200809L /* We support priority protection, though only for non-robust mutexes. */ #define _POSIX_THREAD_PRIO_PROTECT 200809L #ifdef __USE_XOPEN2K8 /* We support priority inheritence for robust mutexes. */ # define _POSIX_THREAD_ROBUST_PRIO_INHERIT 200809L /* We do not support priority protection for robust mutexes. */ # define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1 #endif # 98 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix_opt.h" 3 /* We support POSIX.1b semaphores. */ #define _POSIX_SEMAPHORES 200809L /* Real-time signals are supported. */ #define _POSIX_REALTIME_SIGNALS 200809L /* We support asynchronous I/O. */ #define _POSIX_ASYNCHRONOUS_IO 200809L #define _POSIX_ASYNC_IO 1 /* Alternative name for Unix98. */ #define _LFS_ASYNCHRONOUS_IO 1 /* Support for prioritization is also available. */ #define _POSIX_PRIORITIZED_IO 200809L /* The LFS support in asynchronous I/O is also available. */ #define _LFS64_ASYNCHRONOUS_IO 1 /* The rest of the LFS is also available. */ #define _LFS_LARGEFILE 1 #define _LFS64_LARGEFILE 1 #define _LFS64_STDIO 1 /* POSIX shared memory objects are implemented. */ #define _POSIX_SHARED_MEMORY_OBJECTS 200809L /* CPU-time clocks support needs to be checked at runtime. */ #define _POSIX_CPUTIME 0 /* Clock support in threads must be also checked at runtime. */ #define _POSIX_THREAD_CPUTIME 0 /* GNU libc provides regular expression handling. */ #define _POSIX_REGEXP 1 /* Reader/Writer locks are available. */ #define _POSIX_READER_WRITER_LOCKS 200809L /* We have a POSIX shell. */ #define _POSIX_SHELL 1 /* We support the Timeouts option. */ #define _POSIX_TIMEOUTS 200809L /* We support spinlocks. */ #define _POSIX_SPIN_LOCKS 200809L /* The `spawn' function family is supported. */ #define _POSIX_SPAWN 200809L /* We have POSIX timers. */ #define _POSIX_TIMERS 200809L /* The barrier functions are available. */ #define _POSIX_BARRIERS 200809L /* POSIX message queues are available. */ #define _POSIX_MESSAGE_PASSING 200809L /* Thread process-shared synchronization is supported. */ #define _POSIX_THREAD_PROCESS_SHARED 200809L /* The monotonic clock might be available. */ #define _POSIX_MONOTONIC_CLOCK 0 /* The clock selection interfaces are available. */ #define _POSIX_CLOCK_SELECTION 200809L /* Advisory information interfaces are available. */ #define _POSIX_ADVISORY_INFO 200809L /* IPv6 support is available. */ #define _POSIX_IPV6 200809L /* Raw socket support is available. */ #define _POSIX_RAW_SOCKETS 200809L /* We have at least one terminal. */ #define _POSIX2_CHAR_TERM 200809L /* Neither process nor thread sporadic server interfaces is available. */ #define _POSIX_SPORADIC_SERVER -1 #define _POSIX_THREAD_SPORADIC_SERVER -1 /* trace.h is not available. */ #define _POSIX_TRACE -1 #define _POSIX_TRACE_EVENT_FILTER -1 #define _POSIX_TRACE_INHERIT -1 #define _POSIX_TRACE_LOG -1 /* Typed memory objects are not available. */ #define _POSIX_TYPED_MEMORY_OBJECTS -1 #endif /* bits/posix_opt.h */ # 192 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/posix_opt.h" 3 # 203 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 2 3 /* Get the environment definitions from Unix98. */ #if defined __USE_UNIX98 || defined __USE_XOPEN2K #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 206 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/environments.h" 1 3 /* Copyright (C) 1999, 2001, 2004, 2009 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _UNISTD_H # error "Never include this file directly. Use instead" #endif # 21 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/environments.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/environments.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 1 3 /* Determine the wordsize from the preprocessor defines. */ #if defined __powerpc64__ # define __WORDSIZE 64 # define __WORDSIZE_TIME64_COMPAT32 1 #else # 7 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 # define __WORDSIZE 32 #endif # 9 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 #if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL /* Signal the glibc ABI didn't used to have a `long double'. The changes all the `long double' function variants to be redirects to the double functions. */ # define __LONG_DOUBLE_MATH_OPTIONAL 1 # ifndef __LONG_DOUBLE_128__ # define __NO_LONG_DOUBLE_MATH 1 # endif # 19 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 #endif # 20 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 # 23 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/environments.h" 2 3 /* This header should define the following symbols under the described situations. A value `1' means that the model is always supported, `-1' means it is never supported. Undefined means it cannot be statically decided. _POSIX_V7_ILP32_OFF32 32bit int, long, pointers, and off_t type _POSIX_V7_ILP32_OFFBIG 32bit int, long, and pointers and larger off_t type _POSIX_V7_LP64_OFF32 64bit long and pointers and 32bit off_t type _POSIX_V7_LPBIG_OFFBIG 64bit long and pointers and large off_t type The macros _POSIX_V6_ILP32_OFF32, _POSIX_V6_ILP32_OFFBIG, _POSIX_V6_LP64_OFF32, _POSIX_V6_LPBIG_OFFBIG, _XBS5_ILP32_OFF32, _XBS5_ILP32_OFFBIG, _XBS5_LP64_OFF32, and _XBS5_LPBIG_OFFBIG were used in previous versions of the Unix standard and are available only for compatibility. */ #if __WORDSIZE == 64 /* Environments with 32-bit wide pointers are optionally provided. Therefore following macros aren't defined: # undef _POSIX_V7_ILP32_OFF32 # undef _POSIX_V7_ILP32_OFFBIG # undef _POSIX_V6_ILP32_OFF32 # undef _POSIX_V6_ILP32_OFFBIG # undef _XBS5_ILP32_OFF32 # undef _XBS5_ILP32_OFFBIG and users need to check at runtime. */ /* We also have no use (for now) for an environment with bigger pointers and offsets. */ # define _POSIX_V7_LPBIG_OFFBIG -1 # define _POSIX_V6_LPBIG_OFFBIG -1 # define _XBS5_LPBIG_OFFBIG -1 /* By default we have 64-bit wide `long int', pointers and `off_t'. */ # define _POSIX_V7_LP64_OFF64 1 # define _POSIX_V6_LP64_OFF64 1 # define _XBS5_LP64_OFF64 1 #else /* __WORDSIZE == 32 */ # 66 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/environments.h" 3 /* By default we have 32-bit wide `int', `long int', pointers and `off_t' and all platforms support LFS. */ # define _POSIX_V7_ILP32_OFF32 1 # define _POSIX_V7_ILP32_OFFBIG 1 # define _POSIX_V6_ILP32_OFF32 1 # define _POSIX_V6_ILP32_OFFBIG 1 # define _XBS5_ILP32_OFF32 1 # define _XBS5_ILP32_OFFBIG 1 /* We optionally provide an environment with the above size but an 64-bit side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */ /* Environments with 64-bit wide pointers can be provided, so these macros aren't defined: # undef _POSIX_V7_LP64_OFF64 # undef _POSIX_V7_LPBIG_OFFBIG # undef _POSIX_V6_LP64_OFF64 # undef _POSIX_V6_LPBIG_OFFBIG # undef _XBS5_LP64_OFF64 # undef _XBS5_LPBIG_OFFBIG and sysconf tests for it at runtime. */ #endif /* __WORDSIZE == 32 */ # 90 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/environments.h" 3 #define __ILP32_OFF32_CFLAGS "-m32" #define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" #define __ILP32_OFF32_LDFLAGS "-m32" #define __ILP32_OFFBIG_LDFLAGS "-m32" #define __LP64_OFF64_CFLAGS "-m64" #define __LP64_OFF64_LDFLAGS "-m64" # 207 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 2 3 #endif # 208 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Standard file descriptors. */ #define STDIN_FILENO 0 /* Standard input. */ #define STDOUT_FILENO 1 /* Standard output. */ #define STDERR_FILENO 2 /* Standard error output. */ /* All functions that are not declared anywhere else. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 217 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # 218 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #ifndef __ssize_t_defined typedef __ssize_t ssize_t; # define __ssize_t_defined #endif # 223 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #define __need_size_t #define __need_NULL #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 226 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # 1 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 1 3 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) /* Always define miscellaneous pieces when modules are available. */ #if !__has_feature(modules) #define __STDDEF_H #endif # 37 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 44 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_ptrdiff_t) #if !defined(_PTRDIFF_T) || __has_feature(modules) /* Always define ptrdiff_t when modules are available. */ #if !__has_feature(modules) #define _PTRDIFF_T #endif # 51 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 53 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 55 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_size_t) #if !defined(_SIZE_T) || __has_feature(modules) /* Always define size_t when modules are available. */ #if !__has_feature(modules) #define _SIZE_T #endif # 62 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ size_t; #endif # 64 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_size_t #endif /*defined(__need_size_t) */ # 66 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) /* Always define rsize_t when modules are available. */ #if !__has_feature(modules) #define _RSIZE_T #endif # 76 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ rsize_t; #endif # 78 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif /* defined(__need_STDDEF_H_misc) */ # 79 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_wchar_t) #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if !defined(_WCHAR_T) || __has_feature(modules) #if !__has_feature(modules) #define _WCHAR_T #if defined(_MSC_EXTENSIONS) #define _WCHAR_T_DEFINED #endif # 89 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 90 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WCHAR_TYPE__ wchar_t; #endif # 92 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 93 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 95 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_NULL) #undef NULL #ifdef __cplusplus # if !defined(__MINGW32__) && !defined(_MSC_VER) # define NULL __null # else # 102 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL 0 # endif # 104 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #else # 105 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL ((void*)0) #endif # 107 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #ifdef __cplusplus #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 112 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 113 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_NULL #endif /* defined(__need_NULL) */ # 115 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 118 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 119 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 120 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 123 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if defined(__need_wint_t) /* Always define wint_t when modules are available. */ #if !defined(_WINT_T) || __has_feature(modules) #if !__has_feature(modules) #define _WINT_T #endif # 132 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WINT_TYPE__ wint_t; #endif # 134 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wint_t #endif /* __need_wint_t */ # 136 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 138 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 227 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 2 3 #if defined __USE_XOPEN || defined __USE_XOPEN2K /* The Single Unix specification says that some more types are available here. */ # ifndef __gid_t_defined typedef __gid_t gid_t; # define __gid_t_defined # endif # 235 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # ifndef __uid_t_defined typedef __uid_t uid_t; # define __uid_t_defined # endif # 240 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # ifndef __off_t_defined # ifndef __USE_FILE_OFFSET64 typedef __off_t off_t; # else # 245 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 typedef __off64_t off_t; # endif # 247 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # define __off_t_defined # endif # 249 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # if defined __USE_LARGEFILE64 && !defined __off64_t_defined typedef __off64_t off64_t; # define __off64_t_defined # endif # 253 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # ifndef __useconds_t_defined typedef __useconds_t useconds_t; # define __useconds_t_defined # endif # 258 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # ifndef __pid_t_defined typedef __pid_t pid_t; # define __pid_t_defined # endif # 263 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #endif /* X/Open */ # 264 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K # ifndef __intptr_t_defined typedef __intptr_t intptr_t; # define __intptr_t_defined # endif # 270 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #endif # 271 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #if defined __USE_BSD || defined __USE_XOPEN # ifndef __socklen_t_defined typedef __socklen_t socklen_t; # define __socklen_t_defined # endif # 277 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #endif # 278 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Values for the second argument to access. These may be OR'd together. */ #define R_OK 4 /* Test for read permission. */ #define W_OK 2 /* Test for write permission. */ #define X_OK 1 /* Test for execute permission. */ #define F_OK 0 /* Test for existence. */ /* Test for access to NAME using the real UID and real GID. */ extern int access (const char *__name, int __type) __THROW __nonnull ((1)); #ifdef __USE_GNU /* Test for access to NAME using the effective UID and GID (as normal file operations use). */ extern int euidaccess (const char *__name, int __type) __THROW __nonnull ((1)); /* An alias for `euidaccess', used by some other systems. */ extern int eaccess (const char *__name, int __type) __THROW __nonnull ((1)); #endif # 299 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #ifdef __USE_ATFILE /* Test for access to FILE relative to the directory FD is open on. If AT_EACCESS is set in FLAG, then use effective IDs like `eaccess', otherwise use real IDs like `access'. */ extern int faccessat (int __fd, const char *__file, int __type, int __flag) __THROW __nonnull ((2)) __wur; #endif /* Use GNU. */ # 307 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Values for the WHENCE argument to lseek. */ #ifndef _STDIO_H /* has the same definitions. */ # define SEEK_SET 0 /* Seek from beginning of file. */ # define SEEK_CUR 1 /* Seek from current position. */ # define SEEK_END 2 /* Seek from end of file. */ # ifdef __USE_GNU # define SEEK_DATA 3 /* Seek to next data. */ # define SEEK_HOLE 4 /* Seek to next hole. */ # endif # 318 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #endif # 319 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #if defined __USE_BSD && !defined L_SET /* Old BSD names for the same constants; just for compatibility. */ # define L_SET SEEK_SET # define L_INCR SEEK_CUR # define L_XTND SEEK_END #endif # 326 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Move FD's file position to OFFSET bytes from the beginning of the file (if WHENCE is SEEK_SET), the current position (if WHENCE is SEEK_CUR), or the end of the file (if WHENCE is SEEK_END). Return the new file position. */ #ifndef __USE_FILE_OFFSET64 extern __off_t lseek (int __fd, __off_t __offset, int __whence) __THROW; #else # 336 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # ifdef __REDIRECT_NTH extern __off64_t __REDIRECT_NTH (lseek, (int __fd, __off64_t __offset, int __whence), lseek64); # else # 341 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # define lseek lseek64 # endif # 343 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #endif # 344 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #ifdef __USE_LARGEFILE64 extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence) __THROW; #endif # 348 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Close the file descriptor FD. This function is a cancellation point and therefore not marked with __THROW. */ extern int close (int __fd); /* Read NBYTES into BUF from FD. Return the number read, -1 for errors or 0 for EOF. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __wur; /* Write N bytes of BUF to FD. Return the number written, or -1. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur; #if defined __USE_UNIX98 || defined __USE_XOPEN2K8 # ifndef __USE_FILE_OFFSET64 /* Read NBYTES into BUF from FD at the given position OFFSET without changing the file pointer. Return the number read, -1 for errors or 0 for EOF. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __wur; /* Write N bytes of BUF to FD at the given position OFFSET without changing the file pointer. Return the number written, or -1. This function is a cancellation point and therefore not marked with __THROW. */ extern ssize_t pwrite (int __fd, const void *__buf, size_t __n, __off_t __offset) __wur; # else # 387 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # ifdef __REDIRECT extern ssize_t __REDIRECT (pread, (int __fd, void *__buf, size_t __nbytes, __off64_t __offset), pread64) __wur; extern ssize_t __REDIRECT (pwrite, (int __fd, const void *__buf, size_t __nbytes, __off64_t __offset), pwrite64) __wur; # else # 395 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # define pread pread64 # define pwrite pwrite64 # endif # 398 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # endif # 399 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # ifdef __USE_LARGEFILE64 /* Read NBYTES into BUF from FD at the given position OFFSET without changing the file pointer. Return the number read, -1 for errors or 0 for EOF. */ extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __wur; /* Write N bytes of BUF to FD at the given position OFFSET without changing the file pointer. Return the number written, or -1. */ extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n, __off64_t __offset) __wur; # endif # 411 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #endif # 412 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Create a one-way communication channel (pipe). If successful, two file descriptors are stored in PIPEDES; bytes written on PIPEDES[1] can be read from PIPEDES[0]. Returns 0 if successful, -1 if not. */ extern int pipe (int __pipedes[2]) __THROW __wur; #ifdef __USE_GNU /* Same as pipe but apply flags passed in FLAGS to the new file descriptors. */ extern int pipe2 (int __pipedes[2], int __flags) __THROW __wur; #endif # 424 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Schedule an alarm. In SECONDS seconds, the process will get a SIGALRM. If SECONDS is zero, any currently scheduled alarm will be cancelled. The function returns the number of seconds remaining until the last alarm scheduled would have signaled, or zero if there wasn't one. There is no return value to indicate an error, but you can set `errno' to 0 and check its value after calling `alarm', and this might tell you. The signal may come late due to processor scheduling. */ extern unsigned int alarm (unsigned int __seconds) __THROW; /* Make the process sleep for SECONDS seconds, or until a signal arrives and is not ignored. The function returns the number of seconds less than SECONDS which it actually slept (thus zero if it slept the full time). If a signal handler does a `longjmp' or modifies the handling of the SIGALRM signal while inside `sleep' call, the handling of the SIGALRM signal afterwards is undefined. There is no return value to indicate error, but if `sleep' returns SECONDS, it probably didn't work. This function is a cancellation point and therefore not marked with __THROW. */ extern unsigned int sleep (unsigned int __seconds); #if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8) \ || defined __USE_BSD /* Set an alarm to go off (generating a SIGALRM signal) in VALUE microseconds. If INTERVAL is nonzero, when the alarm goes off, the timer is reset to go off every INTERVAL microseconds thereafter. Returns the number of microseconds remaining before the alarm. */ extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval) __THROW; /* Sleep USECONDS microseconds, or until a signal arrives that is not blocked or ignored. This function is a cancellation point and therefore not marked with __THROW. */ extern int usleep (__useconds_t __useconds); #endif # 462 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Suspend the process until a signal arrives. This always returns -1 and sets `errno' to EINTR. This function is a cancellation point and therefore not marked with __THROW. */ extern int pause (void); /* Change the owner and group of FILE. */ extern int chown (const char *__file, __uid_t __owner, __gid_t __group) __THROW __nonnull ((1)) __wur; #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 /* Change the owner and group of the file that FD is open on. */ extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __THROW __wur; /* Change owner and group of FILE, if it is a symbolic link the ownership of the symbolic link is changed. */ extern int lchown (const char *__file, __uid_t __owner, __gid_t __group) __THROW __nonnull ((1)) __wur; #endif /* Use BSD || X/Open Unix. */ # 487 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #ifdef __USE_ATFILE /* Change the owner and group of FILE relative to the directory FD is open on. */ extern int fchownat (int __fd, const char *__file, __uid_t __owner, __gid_t __group, int __flag) __THROW __nonnull ((2)) __wur; #endif /* Use GNU. */ # 495 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Change the process's working directory to PATH. */ extern int chdir (const char *__path) __THROW __nonnull ((1)) __wur; #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 /* Change the process's working directory to the one FD is open on. */ extern int fchdir (int __fd) __THROW __wur; #endif # 503 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Get the pathname of the current working directory, and put it in SIZE bytes of BUF. Returns NULL if the directory couldn't be determined or SIZE was too small. If successful, returns BUF. In GNU, if BUF is NULL, an array is allocated with `malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case it is as big as necessary. */ extern char *getcwd (char *__buf, size_t __size) __THROW __wur; #ifdef __USE_GNU /* Return a malloc'd string containing the current directory name. If the environment variable `PWD' is set, and its value is correct, that value is used. */ extern char *get_current_dir_name (void) __THROW; #endif # 519 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8) \ || defined __USE_BSD /* Put the absolute pathname of the current working directory in BUF. If successful, return BUF. If not, put an error message in BUF and return NULL. BUF should be at least PATH_MAX bytes long. */ extern char *getwd (char *__buf) __THROW __nonnull ((1)) __attribute_deprecated__ __wur; #endif # 528 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Duplicate FD, returning a new file descriptor on the same file. */ extern int dup (int __fd) __THROW __wur; /* Duplicate FD to FD2, closing FD2 and making it open on the same file. */ extern int dup2 (int __fd, int __fd2) __THROW; #ifdef __USE_GNU /* Duplicate FD to FD2, closing FD2 and making it open on the same file while setting flags according to FLAGS. */ extern int dup3 (int __fd, int __fd2, int __flags) __THROW; #endif # 541 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* NULL-terminated array of "NAME=VALUE" environment variables. */ extern char **__environ; #ifdef __USE_GNU extern char **environ; #endif # 547 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Replace the current process, executing PATH with arguments ARGV and environment ENVP. ARGV and ENVP are terminated by NULL pointers. */ extern int execve (const char *__path, char *const __argv[], char *const __envp[]) __THROW __nonnull ((1, 2)); #ifdef __USE_XOPEN2K8 /* Execute the file FD refers to, overlaying the running program image. ARGV and ENVP are passed to the new program, as for `execve'. */ extern int fexecve (int __fd, char *const __argv[], char *const __envp[]) __THROW __nonnull ((2)); #endif # 560 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Execute PATH with arguments ARGV and environment from `environ'. */ extern int execv (const char *__path, char *const __argv[]) __THROW __nonnull ((1, 2)); /* Execute PATH with all arguments after PATH until a NULL pointer, and the argument after that for environment. */ extern int execle (const char *__path, const char *__arg, ...) __THROW __nonnull ((1, 2)); /* Execute PATH with all arguments after PATH until a NULL pointer and environment from `environ'. */ extern int execl (const char *__path, const char *__arg, ...) __THROW __nonnull ((1, 2)); /* Execute FILE, searching in the `PATH' environment variable if it contains no slashes, with arguments ARGV and environment from `environ'. */ extern int execvp (const char *__file, char *const __argv[]) __THROW __nonnull ((1, 2)); /* Execute FILE, searching in the `PATH' environment variable if it contains no slashes, with all arguments after FILE until a NULL pointer and environment from `environ'. */ extern int execlp (const char *__file, const char *__arg, ...) __THROW __nonnull ((1, 2)); #ifdef __USE_GNU /* Execute FILE, searching in the `PATH' environment variable if it contains no slashes, with arguments ARGV and environment from `environ'. */ extern int execvpe (const char *__file, char *const __argv[], char *const __envp[]) __THROW __nonnull ((1, 2)); #endif # 594 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #if defined __USE_MISC || defined __USE_XOPEN /* Add INC to priority of the current process. */ extern int nice (int __inc) __THROW __wur; #endif # 600 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Terminate program execution with the low-order 8 bits of STATUS. */ extern void _exit (int __status) __attribute__ ((__noreturn__)); /* Get the `_PC_*' symbols for the NAME argument to `pathconf' and `fpathconf'; the `_SC_*' symbols for the NAME argument to `sysconf'; and the `_CS_*' symbols for the NAME argument to `confstr'. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 609 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/confname.h" 1 3 /* `sysconf', `pathconf', and `confstr' NAME values. Generic version. Copyright (C) 1993,1995-1998,2000,2001,2003,2004,2007,2009,2010 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _UNISTD_H # error "Never use directly; include instead." #endif # 23 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/confname.h" 3 /* Values for the NAME argument to `pathconf' and `fpathconf'. */ enum { _PC_LINK_MAX, #define _PC_LINK_MAX _PC_LINK_MAX _PC_MAX_CANON, #define _PC_MAX_CANON _PC_MAX_CANON _PC_MAX_INPUT, #define _PC_MAX_INPUT _PC_MAX_INPUT _PC_NAME_MAX, #define _PC_NAME_MAX _PC_NAME_MAX _PC_PATH_MAX, #define _PC_PATH_MAX _PC_PATH_MAX _PC_PIPE_BUF, #define _PC_PIPE_BUF _PC_PIPE_BUF _PC_CHOWN_RESTRICTED, #define _PC_CHOWN_RESTRICTED _PC_CHOWN_RESTRICTED _PC_NO_TRUNC, #define _PC_NO_TRUNC _PC_NO_TRUNC _PC_VDISABLE, #define _PC_VDISABLE _PC_VDISABLE _PC_SYNC_IO, #define _PC_SYNC_IO _PC_SYNC_IO _PC_ASYNC_IO, #define _PC_ASYNC_IO _PC_ASYNC_IO _PC_PRIO_IO, #define _PC_PRIO_IO _PC_PRIO_IO _PC_SOCK_MAXBUF, #define _PC_SOCK_MAXBUF _PC_SOCK_MAXBUF _PC_FILESIZEBITS, #define _PC_FILESIZEBITS _PC_FILESIZEBITS _PC_REC_INCR_XFER_SIZE, #define _PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE _PC_REC_MAX_XFER_SIZE, #define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE _PC_REC_MIN_XFER_SIZE, #define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE _PC_REC_XFER_ALIGN, #define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN _PC_ALLOC_SIZE_MIN, #define _PC_ALLOC_SIZE_MIN _PC_ALLOC_SIZE_MIN _PC_SYMLINK_MAX, #define _PC_SYMLINK_MAX _PC_SYMLINK_MAX _PC_2_SYMLINKS #define _PC_2_SYMLINKS _PC_2_SYMLINKS }; /* Values for the argument to `sysconf'. */ enum { _SC_ARG_MAX, #define _SC_ARG_MAX _SC_ARG_MAX _SC_CHILD_MAX, #define _SC_CHILD_MAX _SC_CHILD_MAX _SC_CLK_TCK, #define _SC_CLK_TCK _SC_CLK_TCK _SC_NGROUPS_MAX, #define _SC_NGROUPS_MAX _SC_NGROUPS_MAX _SC_OPEN_MAX, #define _SC_OPEN_MAX _SC_OPEN_MAX _SC_STREAM_MAX, #define _SC_STREAM_MAX _SC_STREAM_MAX _SC_TZNAME_MAX, #define _SC_TZNAME_MAX _SC_TZNAME_MAX _SC_JOB_CONTROL, #define _SC_JOB_CONTROL _SC_JOB_CONTROL _SC_SAVED_IDS, #define _SC_SAVED_IDS _SC_SAVED_IDS _SC_REALTIME_SIGNALS, #define _SC_REALTIME_SIGNALS _SC_REALTIME_SIGNALS _SC_PRIORITY_SCHEDULING, #define _SC_PRIORITY_SCHEDULING _SC_PRIORITY_SCHEDULING _SC_TIMERS, #define _SC_TIMERS _SC_TIMERS _SC_ASYNCHRONOUS_IO, #define _SC_ASYNCHRONOUS_IO _SC_ASYNCHRONOUS_IO _SC_PRIORITIZED_IO, #define _SC_PRIORITIZED_IO _SC_PRIORITIZED_IO _SC_SYNCHRONIZED_IO, #define _SC_SYNCHRONIZED_IO _SC_SYNCHRONIZED_IO _SC_FSYNC, #define _SC_FSYNC _SC_FSYNC _SC_MAPPED_FILES, #define _SC_MAPPED_FILES _SC_MAPPED_FILES _SC_MEMLOCK, #define _SC_MEMLOCK _SC_MEMLOCK _SC_MEMLOCK_RANGE, #define _SC_MEMLOCK_RANGE _SC_MEMLOCK_RANGE _SC_MEMORY_PROTECTION, #define _SC_MEMORY_PROTECTION _SC_MEMORY_PROTECTION _SC_MESSAGE_PASSING, #define _SC_MESSAGE_PASSING _SC_MESSAGE_PASSING _SC_SEMAPHORES, #define _SC_SEMAPHORES _SC_SEMAPHORES _SC_SHARED_MEMORY_OBJECTS, #define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS _SC_AIO_LISTIO_MAX, #define _SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX _SC_AIO_MAX, #define _SC_AIO_MAX _SC_AIO_MAX _SC_AIO_PRIO_DELTA_MAX, #define _SC_AIO_PRIO_DELTA_MAX _SC_AIO_PRIO_DELTA_MAX _SC_DELAYTIMER_MAX, #define _SC_DELAYTIMER_MAX _SC_DELAYTIMER_MAX _SC_MQ_OPEN_MAX, #define _SC_MQ_OPEN_MAX _SC_MQ_OPEN_MAX _SC_MQ_PRIO_MAX, #define _SC_MQ_PRIO_MAX _SC_MQ_PRIO_MAX _SC_VERSION, #define _SC_VERSION _SC_VERSION _SC_PAGESIZE, #define _SC_PAGESIZE _SC_PAGESIZE #define _SC_PAGE_SIZE _SC_PAGESIZE _SC_RTSIG_MAX, #define _SC_RTSIG_MAX _SC_RTSIG_MAX _SC_SEM_NSEMS_MAX, #define _SC_SEM_NSEMS_MAX _SC_SEM_NSEMS_MAX _SC_SEM_VALUE_MAX, #define _SC_SEM_VALUE_MAX _SC_SEM_VALUE_MAX _SC_SIGQUEUE_MAX, #define _SC_SIGQUEUE_MAX _SC_SIGQUEUE_MAX _SC_TIMER_MAX, #define _SC_TIMER_MAX _SC_TIMER_MAX /* Values for the argument to `sysconf' corresponding to _POSIX2_* symbols. */ _SC_BC_BASE_MAX, #define _SC_BC_BASE_MAX _SC_BC_BASE_MAX _SC_BC_DIM_MAX, #define _SC_BC_DIM_MAX _SC_BC_DIM_MAX _SC_BC_SCALE_MAX, #define _SC_BC_SCALE_MAX _SC_BC_SCALE_MAX _SC_BC_STRING_MAX, #define _SC_BC_STRING_MAX _SC_BC_STRING_MAX _SC_COLL_WEIGHTS_MAX, #define _SC_COLL_WEIGHTS_MAX _SC_COLL_WEIGHTS_MAX _SC_EQUIV_CLASS_MAX, #define _SC_EQUIV_CLASS_MAX _SC_EQUIV_CLASS_MAX _SC_EXPR_NEST_MAX, #define _SC_EXPR_NEST_MAX _SC_EXPR_NEST_MAX _SC_LINE_MAX, #define _SC_LINE_MAX _SC_LINE_MAX _SC_RE_DUP_MAX, #define _SC_RE_DUP_MAX _SC_RE_DUP_MAX _SC_CHARCLASS_NAME_MAX, #define _SC_CHARCLASS_NAME_MAX _SC_CHARCLASS_NAME_MAX _SC_2_VERSION, #define _SC_2_VERSION _SC_2_VERSION _SC_2_C_BIND, #define _SC_2_C_BIND _SC_2_C_BIND _SC_2_C_DEV, #define _SC_2_C_DEV _SC_2_C_DEV _SC_2_FORT_DEV, #define _SC_2_FORT_DEV _SC_2_FORT_DEV _SC_2_FORT_RUN, #define _SC_2_FORT_RUN _SC_2_FORT_RUN _SC_2_SW_DEV, #define _SC_2_SW_DEV _SC_2_SW_DEV _SC_2_LOCALEDEF, #define _SC_2_LOCALEDEF _SC_2_LOCALEDEF _SC_PII, #define _SC_PII _SC_PII _SC_PII_XTI, #define _SC_PII_XTI _SC_PII_XTI _SC_PII_SOCKET, #define _SC_PII_SOCKET _SC_PII_SOCKET _SC_PII_INTERNET, #define _SC_PII_INTERNET _SC_PII_INTERNET _SC_PII_OSI, #define _SC_PII_OSI _SC_PII_OSI _SC_POLL, #define _SC_POLL _SC_POLL _SC_SELECT, #define _SC_SELECT _SC_SELECT _SC_UIO_MAXIOV, #define _SC_UIO_MAXIOV _SC_UIO_MAXIOV _SC_IOV_MAX = _SC_UIO_MAXIOV, #define _SC_IOV_MAX _SC_IOV_MAX _SC_PII_INTERNET_STREAM, #define _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_DGRAM, #define _SC_PII_INTERNET_DGRAM _SC_PII_INTERNET_DGRAM _SC_PII_OSI_COTS, #define _SC_PII_OSI_COTS _SC_PII_OSI_COTS _SC_PII_OSI_CLTS, #define _SC_PII_OSI_CLTS _SC_PII_OSI_CLTS _SC_PII_OSI_M, #define _SC_PII_OSI_M _SC_PII_OSI_M _SC_T_IOV_MAX, #define _SC_T_IOV_MAX _SC_T_IOV_MAX /* Values according to POSIX 1003.1c (POSIX threads). */ _SC_THREADS, #define _SC_THREADS _SC_THREADS _SC_THREAD_SAFE_FUNCTIONS, #define _SC_THREAD_SAFE_FUNCTIONS _SC_THREAD_SAFE_FUNCTIONS _SC_GETGR_R_SIZE_MAX, #define _SC_GETGR_R_SIZE_MAX _SC_GETGR_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX, #define _SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX _SC_LOGIN_NAME_MAX, #define _SC_LOGIN_NAME_MAX _SC_LOGIN_NAME_MAX _SC_TTY_NAME_MAX, #define _SC_TTY_NAME_MAX _SC_TTY_NAME_MAX _SC_THREAD_DESTRUCTOR_ITERATIONS, #define _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_KEYS_MAX, #define _SC_THREAD_KEYS_MAX _SC_THREAD_KEYS_MAX _SC_THREAD_STACK_MIN, #define _SC_THREAD_STACK_MIN _SC_THREAD_STACK_MIN _SC_THREAD_THREADS_MAX, #define _SC_THREAD_THREADS_MAX _SC_THREAD_THREADS_MAX _SC_THREAD_ATTR_STACKADDR, #define _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKSIZE, #define _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_PRIORITY_SCHEDULING, #define _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIO_INHERIT, #define _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_PROTECT, #define _SC_THREAD_PRIO_PROTECT _SC_THREAD_PRIO_PROTECT _SC_THREAD_PROCESS_SHARED, #define _SC_THREAD_PROCESS_SHARED _SC_THREAD_PROCESS_SHARED _SC_NPROCESSORS_CONF, #define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF _SC_NPROCESSORS_ONLN, #define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN _SC_PHYS_PAGES, #define _SC_PHYS_PAGES _SC_PHYS_PAGES _SC_AVPHYS_PAGES, #define _SC_AVPHYS_PAGES _SC_AVPHYS_PAGES _SC_ATEXIT_MAX, #define _SC_ATEXIT_MAX _SC_ATEXIT_MAX _SC_PASS_MAX, #define _SC_PASS_MAX _SC_PASS_MAX _SC_XOPEN_VERSION, #define _SC_XOPEN_VERSION _SC_XOPEN_VERSION _SC_XOPEN_XCU_VERSION, #define _SC_XOPEN_XCU_VERSION _SC_XOPEN_XCU_VERSION _SC_XOPEN_UNIX, #define _SC_XOPEN_UNIX _SC_XOPEN_UNIX _SC_XOPEN_CRYPT, #define _SC_XOPEN_CRYPT _SC_XOPEN_CRYPT _SC_XOPEN_ENH_I18N, #define _SC_XOPEN_ENH_I18N _SC_XOPEN_ENH_I18N _SC_XOPEN_SHM, #define _SC_XOPEN_SHM _SC_XOPEN_SHM _SC_2_CHAR_TERM, #define _SC_2_CHAR_TERM _SC_2_CHAR_TERM _SC_2_C_VERSION, #define _SC_2_C_VERSION _SC_2_C_VERSION _SC_2_UPE, #define _SC_2_UPE _SC_2_UPE _SC_XOPEN_XPG2, #define _SC_XOPEN_XPG2 _SC_XOPEN_XPG2 _SC_XOPEN_XPG3, #define _SC_XOPEN_XPG3 _SC_XOPEN_XPG3 _SC_XOPEN_XPG4, #define _SC_XOPEN_XPG4 _SC_XOPEN_XPG4 _SC_CHAR_BIT, #define _SC_CHAR_BIT _SC_CHAR_BIT _SC_CHAR_MAX, #define _SC_CHAR_MAX _SC_CHAR_MAX _SC_CHAR_MIN, #define _SC_CHAR_MIN _SC_CHAR_MIN _SC_INT_MAX, #define _SC_INT_MAX _SC_INT_MAX _SC_INT_MIN, #define _SC_INT_MIN _SC_INT_MIN _SC_LONG_BIT, #define _SC_LONG_BIT _SC_LONG_BIT _SC_WORD_BIT, #define _SC_WORD_BIT _SC_WORD_BIT _SC_MB_LEN_MAX, #define _SC_MB_LEN_MAX _SC_MB_LEN_MAX _SC_NZERO, #define _SC_NZERO _SC_NZERO _SC_SSIZE_MAX, #define _SC_SSIZE_MAX _SC_SSIZE_MAX _SC_SCHAR_MAX, #define _SC_SCHAR_MAX _SC_SCHAR_MAX _SC_SCHAR_MIN, #define _SC_SCHAR_MIN _SC_SCHAR_MIN _SC_SHRT_MAX, #define _SC_SHRT_MAX _SC_SHRT_MAX _SC_SHRT_MIN, #define _SC_SHRT_MIN _SC_SHRT_MIN _SC_UCHAR_MAX, #define _SC_UCHAR_MAX _SC_UCHAR_MAX _SC_UINT_MAX, #define _SC_UINT_MAX _SC_UINT_MAX _SC_ULONG_MAX, #define _SC_ULONG_MAX _SC_ULONG_MAX _SC_USHRT_MAX, #define _SC_USHRT_MAX _SC_USHRT_MAX _SC_NL_ARGMAX, #define _SC_NL_ARGMAX _SC_NL_ARGMAX _SC_NL_LANGMAX, #define _SC_NL_LANGMAX _SC_NL_LANGMAX _SC_NL_MSGMAX, #define _SC_NL_MSGMAX _SC_NL_MSGMAX _SC_NL_NMAX, #define _SC_NL_NMAX _SC_NL_NMAX _SC_NL_SETMAX, #define _SC_NL_SETMAX _SC_NL_SETMAX _SC_NL_TEXTMAX, #define _SC_NL_TEXTMAX _SC_NL_TEXTMAX _SC_XBS5_ILP32_OFF32, #define _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFFBIG, #define _SC_XBS5_ILP32_OFFBIG _SC_XBS5_ILP32_OFFBIG _SC_XBS5_LP64_OFF64, #define _SC_XBS5_LP64_OFF64 _SC_XBS5_LP64_OFF64 _SC_XBS5_LPBIG_OFFBIG, #define _SC_XBS5_LPBIG_OFFBIG _SC_XBS5_LPBIG_OFFBIG _SC_XOPEN_LEGACY, #define _SC_XOPEN_LEGACY _SC_XOPEN_LEGACY _SC_XOPEN_REALTIME, #define _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME_THREADS, #define _SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS _SC_ADVISORY_INFO, #define _SC_ADVISORY_INFO _SC_ADVISORY_INFO _SC_BARRIERS, #define _SC_BARRIERS _SC_BARRIERS _SC_BASE, #define _SC_BASE _SC_BASE _SC_C_LANG_SUPPORT, #define _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT_R, #define _SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R _SC_CLOCK_SELECTION, #define _SC_CLOCK_SELECTION _SC_CLOCK_SELECTION _SC_CPUTIME, #define _SC_CPUTIME _SC_CPUTIME _SC_THREAD_CPUTIME, #define _SC_THREAD_CPUTIME _SC_THREAD_CPUTIME _SC_DEVICE_IO, #define _SC_DEVICE_IO _SC_DEVICE_IO _SC_DEVICE_SPECIFIC, #define _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC_R, #define _SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R _SC_FD_MGMT, #define _SC_FD_MGMT _SC_FD_MGMT _SC_FIFO, #define _SC_FIFO _SC_FIFO _SC_PIPE, #define _SC_PIPE _SC_PIPE _SC_FILE_ATTRIBUTES, #define _SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES _SC_FILE_LOCKING, #define _SC_FILE_LOCKING _SC_FILE_LOCKING _SC_FILE_SYSTEM, #define _SC_FILE_SYSTEM _SC_FILE_SYSTEM _SC_MONOTONIC_CLOCK, #define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK _SC_MULTI_PROCESS, #define _SC_MULTI_PROCESS _SC_MULTI_PROCESS _SC_SINGLE_PROCESS, #define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS _SC_NETWORKING, #define _SC_NETWORKING _SC_NETWORKING _SC_READER_WRITER_LOCKS, #define _SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS _SC_SPIN_LOCKS, #define _SC_SPIN_LOCKS _SC_SPIN_LOCKS _SC_REGEXP, #define _SC_REGEXP _SC_REGEXP _SC_REGEX_VERSION, #define _SC_REGEX_VERSION _SC_REGEX_VERSION _SC_SHELL, #define _SC_SHELL _SC_SHELL _SC_SIGNALS, #define _SC_SIGNALS _SC_SIGNALS _SC_SPAWN, #define _SC_SPAWN _SC_SPAWN _SC_SPORADIC_SERVER, #define _SC_SPORADIC_SERVER _SC_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER, #define _SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER _SC_SYSTEM_DATABASE, #define _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE_R, #define _SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R _SC_TIMEOUTS, #define _SC_TIMEOUTS _SC_TIMEOUTS _SC_TYPED_MEMORY_OBJECTS, #define _SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS _SC_USER_GROUPS, #define _SC_USER_GROUPS _SC_USER_GROUPS _SC_USER_GROUPS_R, #define _SC_USER_GROUPS_R _SC_USER_GROUPS_R _SC_2_PBS, #define _SC_2_PBS _SC_2_PBS _SC_2_PBS_ACCOUNTING, #define _SC_2_PBS_ACCOUNTING _SC_2_PBS_ACCOUNTING _SC_2_PBS_LOCATE, #define _SC_2_PBS_LOCATE _SC_2_PBS_LOCATE _SC_2_PBS_MESSAGE, #define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE _SC_2_PBS_TRACK, #define _SC_2_PBS_TRACK _SC_2_PBS_TRACK _SC_SYMLOOP_MAX, #define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX _SC_STREAMS, #define _SC_STREAMS _SC_STREAMS _SC_2_PBS_CHECKPOINT, #define _SC_2_PBS_CHECKPOINT _SC_2_PBS_CHECKPOINT _SC_V6_ILP32_OFF32, #define _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFFBIG, #define _SC_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG _SC_V6_LP64_OFF64, #define _SC_V6_LP64_OFF64 _SC_V6_LP64_OFF64 _SC_V6_LPBIG_OFFBIG, #define _SC_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG _SC_HOST_NAME_MAX, #define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX _SC_TRACE, #define _SC_TRACE _SC_TRACE _SC_TRACE_EVENT_FILTER, #define _SC_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER _SC_TRACE_INHERIT, #define _SC_TRACE_INHERIT _SC_TRACE_INHERIT _SC_TRACE_LOG, #define _SC_TRACE_LOG _SC_TRACE_LOG _SC_LEVEL1_ICACHE_SIZE, #define _SC_LEVEL1_ICACHE_SIZE _SC_LEVEL1_ICACHE_SIZE _SC_LEVEL1_ICACHE_ASSOC, #define _SC_LEVEL1_ICACHE_ASSOC _SC_LEVEL1_ICACHE_ASSOC _SC_LEVEL1_ICACHE_LINESIZE, #define _SC_LEVEL1_ICACHE_LINESIZE _SC_LEVEL1_ICACHE_LINESIZE _SC_LEVEL1_DCACHE_SIZE, #define _SC_LEVEL1_DCACHE_SIZE _SC_LEVEL1_DCACHE_SIZE _SC_LEVEL1_DCACHE_ASSOC, #define _SC_LEVEL1_DCACHE_ASSOC _SC_LEVEL1_DCACHE_ASSOC _SC_LEVEL1_DCACHE_LINESIZE, #define _SC_LEVEL1_DCACHE_LINESIZE _SC_LEVEL1_DCACHE_LINESIZE _SC_LEVEL2_CACHE_SIZE, #define _SC_LEVEL2_CACHE_SIZE _SC_LEVEL2_CACHE_SIZE _SC_LEVEL2_CACHE_ASSOC, #define _SC_LEVEL2_CACHE_ASSOC _SC_LEVEL2_CACHE_ASSOC _SC_LEVEL2_CACHE_LINESIZE, #define _SC_LEVEL2_CACHE_LINESIZE _SC_LEVEL2_CACHE_LINESIZE _SC_LEVEL3_CACHE_SIZE, #define _SC_LEVEL3_CACHE_SIZE _SC_LEVEL3_CACHE_SIZE _SC_LEVEL3_CACHE_ASSOC, #define _SC_LEVEL3_CACHE_ASSOC _SC_LEVEL3_CACHE_ASSOC _SC_LEVEL3_CACHE_LINESIZE, #define _SC_LEVEL3_CACHE_LINESIZE _SC_LEVEL3_CACHE_LINESIZE _SC_LEVEL4_CACHE_SIZE, #define _SC_LEVEL4_CACHE_SIZE _SC_LEVEL4_CACHE_SIZE _SC_LEVEL4_CACHE_ASSOC, #define _SC_LEVEL4_CACHE_ASSOC _SC_LEVEL4_CACHE_ASSOC _SC_LEVEL4_CACHE_LINESIZE, #define _SC_LEVEL4_CACHE_LINESIZE _SC_LEVEL4_CACHE_LINESIZE /* Leave room here, maybe we need a few more cache levels some day. */ _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50, #define _SC_IPV6 _SC_IPV6 _SC_RAW_SOCKETS, #define _SC_RAW_SOCKETS _SC_RAW_SOCKETS _SC_V7_ILP32_OFF32, #define _SC_V7_ILP32_OFF32 _SC_V7_ILP32_OFF32 _SC_V7_ILP32_OFFBIG, #define _SC_V7_ILP32_OFFBIG _SC_V7_ILP32_OFFBIG _SC_V7_LP64_OFF64, #define _SC_V7_LP64_OFF64 _SC_V7_LP64_OFF64 _SC_V7_LPBIG_OFFBIG, #define _SC_V7_LPBIG_OFFBIG _SC_V7_LPBIG_OFFBIG _SC_SS_REPL_MAX, #define _SC_SS_REPL_MAX _SC_SS_REPL_MAX _SC_TRACE_EVENT_NAME_MAX, #define _SC_TRACE_EVENT_NAME_MAX _SC_TRACE_EVENT_NAME_MAX _SC_TRACE_NAME_MAX, #define _SC_TRACE_NAME_MAX _SC_TRACE_NAME_MAX _SC_TRACE_SYS_MAX, #define _SC_TRACE_SYS_MAX _SC_TRACE_SYS_MAX _SC_TRACE_USER_EVENT_MAX, #define _SC_TRACE_USER_EVENT_MAX _SC_TRACE_USER_EVENT_MAX _SC_XOPEN_STREAMS, #define _SC_XOPEN_STREAMS _SC_XOPEN_STREAMS _SC_THREAD_ROBUST_PRIO_INHERIT, #define _SC_THREAD_ROBUST_PRIO_INHERIT _SC_THREAD_ROBUST_PRIO_INHERIT _SC_THREAD_ROBUST_PRIO_PROTECT #define _SC_THREAD_ROBUST_PRIO_PROTECT _SC_THREAD_ROBUST_PRIO_PROTECT }; /* Values for the NAME argument to `confstr'. */ enum { _CS_PATH, /* The default search path. */ #define _CS_PATH _CS_PATH _CS_V6_WIDTH_RESTRICTED_ENVS, #define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS #define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS _CS_GNU_LIBC_VERSION, #define _CS_GNU_LIBC_VERSION _CS_GNU_LIBC_VERSION _CS_GNU_LIBPTHREAD_VERSION, #define _CS_GNU_LIBPTHREAD_VERSION _CS_GNU_LIBPTHREAD_VERSION _CS_V5_WIDTH_RESTRICTED_ENVS, #define _CS_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS #define _CS_POSIX_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS, #define _CS_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS #define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS _CS_LFS_CFLAGS = 1000, #define _CS_LFS_CFLAGS _CS_LFS_CFLAGS _CS_LFS_LDFLAGS, #define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS _CS_LFS_LIBS, #define _CS_LFS_LIBS _CS_LFS_LIBS _CS_LFS_LINTFLAGS, #define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS _CS_LFS64_CFLAGS, #define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS _CS_LFS64_LDFLAGS, #define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS _CS_LFS64_LIBS, #define _CS_LFS64_LIBS _CS_LFS64_LIBS _CS_LFS64_LINTFLAGS, #define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS = 1100, #define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS, #define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LIBS, #define _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LINTFLAGS, #define _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS, #define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS, #define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LIBS, #define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS, #define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_LP64_OFF64_CFLAGS, #define _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS, #define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LIBS, #define _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LINTFLAGS, #define _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS, #define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS, #define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LIBS, #define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS, #define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS, #define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS, #define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LIBS, #define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS, #define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS, #define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS, #define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LIBS, #define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS, #define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS, #define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS, #define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LIBS, #define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS, #define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS, #define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS, #define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS, #define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS, #define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V7_ILP32_OFF32_CFLAGS, #define _CS_POSIX_V7_ILP32_OFF32_CFLAGS _CS_POSIX_V7_ILP32_OFF32_CFLAGS _CS_POSIX_V7_ILP32_OFF32_LDFLAGS, #define _CS_POSIX_V7_ILP32_OFF32_LDFLAGS _CS_POSIX_V7_ILP32_OFF32_LDFLAGS _CS_POSIX_V7_ILP32_OFF32_LIBS, #define _CS_POSIX_V7_ILP32_OFF32_LIBS _CS_POSIX_V7_ILP32_OFF32_LIBS _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS, #define _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS, #define _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS, #define _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LIBS, #define _CS_POSIX_V7_ILP32_OFFBIG_LIBS _CS_POSIX_V7_ILP32_OFFBIG_LIBS _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS, #define _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V7_LP64_OFF64_CFLAGS, #define _CS_POSIX_V7_LP64_OFF64_CFLAGS _CS_POSIX_V7_LP64_OFF64_CFLAGS _CS_POSIX_V7_LP64_OFF64_LDFLAGS, #define _CS_POSIX_V7_LP64_OFF64_LDFLAGS _CS_POSIX_V7_LP64_OFF64_LDFLAGS _CS_POSIX_V7_LP64_OFF64_LIBS, #define _CS_POSIX_V7_LP64_OFF64_LIBS _CS_POSIX_V7_LP64_OFF64_LIBS _CS_POSIX_V7_LP64_OFF64_LINTFLAGS, #define _CS_POSIX_V7_LP64_OFF64_LINTFLAGS _CS_POSIX_V7_LP64_OFF64_LINTFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS, #define _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, #define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, #define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, #define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS _CS_V6_ENV, #define _CS_V6_ENV _CS_V6_ENV _CS_V7_ENV #define _CS_V7_ENV _CS_V7_ENV }; # 610 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 2 3 /* Get file-specific configuration information about PATH. */ extern long int pathconf (const char *__path, int __name) __THROW __nonnull ((1)); /* Get file-specific configuration about descriptor FD. */ extern long int fpathconf (int __fd, int __name) __THROW; /* Get the value of the system variable NAME. */ extern long int sysconf (int __name) __THROW; #ifdef __USE_POSIX2 /* Get the value of the string-valued system variable NAME. */ extern size_t confstr (int __name, char *__buf, size_t __len) __THROW; #endif # 625 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Get the process ID of the calling process. */ extern __pid_t getpid (void) __THROW; /* Get the process ID of the calling process's parent. */ extern __pid_t getppid (void) __THROW; /* Get the process group ID of the calling process. This function is different on old BSD. */ #ifndef __FAVOR_BSD extern __pid_t getpgrp (void) __THROW; #else # 638 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # ifdef __REDIRECT_NTH extern __pid_t __REDIRECT_NTH (getpgrp, (__pid_t __pid), __getpgid); # else # 641 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # define getpgrp __getpgid # endif # 643 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #endif # 644 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Get the process group ID of process PID. */ extern __pid_t __getpgid (__pid_t __pid) __THROW; #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 extern __pid_t getpgid (__pid_t __pid) __THROW; #endif # 650 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Set the process group ID of the process matching PID to PGID. If PID is zero, the current process's process group ID is set. If PGID is zero, the process ID of the process is used. */ extern int setpgid (__pid_t __pid, __pid_t __pgid) __THROW; #if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Both System V and BSD have `setpgrp' functions, but with different calling conventions. The BSD function is the same as POSIX.1 `setpgid' (above). The System V function takes no arguments and puts the calling process in its on group like `setpgid (0, 0)'. New programs should always use `setpgid' instead. The default in GNU is to provide the System V function. The BSD function is available under -D_BSD_SOURCE. */ # ifndef __FAVOR_BSD /* Set the process group ID of the calling process to its own PID. This is exactly the same as `setpgid (0, 0)'. */ extern int setpgrp (void) __THROW; # else # 675 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Another name for `setpgid' (above). */ # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (setpgrp, (__pid_t __pid, __pid_t __pgrp), setpgid); # else # 680 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # define setpgrp setpgid # endif # 682 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # endif /* Favor BSD. */ # 684 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #endif /* Use SVID or BSD. */ # 685 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Create a new session with the calling process as its leader. The process group IDs of the session and the calling process are set to the process ID of the calling process, which is returned. */ extern __pid_t setsid (void) __THROW; #if defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 /* Return the session ID of the given process. */ extern __pid_t getsid (__pid_t __pid) __THROW; #endif # 695 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Get the real user ID of the calling process. */ extern __uid_t getuid (void) __THROW; /* Get the effective user ID of the calling process. */ extern __uid_t geteuid (void) __THROW; /* Get the real group ID of the calling process. */ extern __gid_t getgid (void) __THROW; /* Get the effective group ID of the calling process. */ extern __gid_t getegid (void) __THROW; /* If SIZE is zero, return the number of supplementary groups the calling process is in. Otherwise, fill in the group IDs of its supplementary groups in LIST and return the number written. */ extern int getgroups (int __size, __gid_t __list[]) __THROW __wur; #ifdef __USE_GNU /* Return nonzero iff the calling process is in group GID. */ extern int group_member (__gid_t __gid) __THROW; #endif # 717 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Set the user ID of the calling process to UID. If the calling process is the super-user, set the real and effective user IDs, and the saved set-user-ID to UID; if not, the effective user ID is set to UID. */ extern int setuid (__uid_t __uid) __THROW __wur; #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Set the real user ID of the calling process to RUID, and the effective user ID of the calling process to EUID. */ extern int setreuid (__uid_t __ruid, __uid_t __euid) __THROW __wur; #endif # 729 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #if defined __USE_BSD || defined __USE_XOPEN2K /* Set the effective user ID of the calling process to UID. */ extern int seteuid (__uid_t __uid) __THROW __wur; #endif /* Use BSD. */ # 734 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Set the group ID of the calling process to GID. If the calling process is the super-user, set the real and effective group IDs, and the saved set-group-ID to GID; if not, the effective group ID is set to GID. */ extern int setgid (__gid_t __gid) __THROW __wur; #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Set the real group ID of the calling process to RGID, and the effective group ID of the calling process to EGID. */ extern int setregid (__gid_t __rgid, __gid_t __egid) __THROW __wur; #endif # 746 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #if defined __USE_BSD || defined __USE_XOPEN2K /* Set the effective group ID of the calling process to GID. */ extern int setegid (__gid_t __gid) __THROW __wur; #endif /* Use BSD. */ # 751 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #ifdef __USE_GNU /* Fetch the real user ID, effective user ID, and saved-set user ID, of the calling process. */ extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid) __THROW; /* Fetch the real group ID, effective group ID, and saved-set group ID, of the calling process. */ extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid) __THROW; /* Set the real user ID, effective user ID, and saved-set user ID, of the calling process to RUID, EUID, and SUID, respectively. */ extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid) __THROW __wur; /* Set the real group ID, effective group ID, and saved-set group ID, of the calling process to RGID, EGID, and SGID, respectively. */ extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid) __THROW __wur; #endif # 773 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Clone the calling process, creating an exact copy. Return -1 for errors, 0 to the new process, and the process ID of the new process to the old process. */ extern __pid_t fork (void) __THROWNL; #if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8) \ || defined __USE_BSD /* Clone the calling process, but without copying the whole address space. The calling process is suspended until the new process exits or is replaced by a call to `execve'. Return -1 for errors, 0 to the new process, and the process ID of the new process to the old process. */ extern __pid_t vfork (void) __THROW; #endif /* Use BSD or XPG < 7. */ # 788 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Return the pathname of the terminal FD is open on, or NULL on errors. The returned storage is good only until the next call to this function. */ extern char *ttyname (int __fd) __THROW; /* Store at most BUFLEN characters of the pathname of the terminal FD is open on in BUF. Return 0 on success, otherwise an error number. */ extern int ttyname_r (int __fd, char *__buf, size_t __buflen) __THROW __nonnull ((2)) __wur; /* Return 1 if FD is a valid descriptor associated with a terminal, zero if not. */ extern int isatty (int __fd) __THROW; #if defined __USE_BSD \ || (defined __USE_XOPEN_EXTENDED && !defined __USE_UNIX98) /* Return the index into the active-logins file (utmp) for the controlling terminal. */ extern int ttyslot (void) __THROW; #endif # 809 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Make a link to FROM named TO. */ extern int link (const char *__from, const char *__to) __THROW __nonnull ((1, 2)) __wur; #ifdef __USE_ATFILE /* Like link but relative paths in TO and FROM are interpreted relative to FROMFD and TOFD respectively. */ extern int linkat (int __fromfd, const char *__from, int __tofd, const char *__to, int __flags) __THROW __nonnull ((2, 4)) __wur; #endif # 822 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K /* Make a symbolic link to FROM named TO. */ extern int symlink (const char *__from, const char *__to) __THROW __nonnull ((1, 2)) __wur; /* Read the contents of the symbolic link PATH into no more than LEN bytes of BUF. The contents are not null-terminated. Returns the number of characters read, or -1 for errors. */ extern ssize_t readlink (const char *__restrict __path, char *__restrict __buf, size_t __len) __THROW __nonnull ((1, 2)) __wur; #endif /* Use BSD. */ # 835 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #ifdef __USE_ATFILE /* Like symlink but a relative path in TO is interpreted relative to TOFD. */ extern int symlinkat (const char *__from, int __tofd, const char *__to) __THROW __nonnull ((1, 3)) __wur; /* Like readlink but a relative PATH is interpreted relative to FD. */ extern ssize_t readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) __THROW __nonnull ((2, 3)) __wur; #endif # 846 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Remove the link NAME. */ extern int unlink (const char *__name) __THROW __nonnull ((1)); #ifdef __USE_ATFILE /* Remove the link NAME relative to FD. */ extern int unlinkat (int __fd, const char *__name, int __flag) __THROW __nonnull ((2)); #endif # 855 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Remove the directory PATH. */ extern int rmdir (const char *__path) __THROW __nonnull ((1)); /* Return the foreground process group ID of FD. */ extern __pid_t tcgetpgrp (int __fd) __THROW; /* Set the foreground process group ID of FD set PGRP_ID. */ extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __THROW; /* Return the login name of the user. This function is a possible cancellation point and therefore not marked with __THROW. */ extern char *getlogin (void); #if defined __USE_REENTRANT || defined __USE_POSIX199506 /* Return at most NAME_LEN characters of the login name of the user in NAME. If it cannot be determined or some other error occurred, return the error code. Otherwise return 0. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int getlogin_r (char *__name, size_t __name_len) __nonnull ((1)); #endif # 881 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #ifdef __USE_BSD /* Set the login name returned by `getlogin'. */ extern int setlogin (const char *__name) __THROW __nonnull ((1)); #endif # 886 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #ifdef __USE_POSIX2 /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. */ # define __need_getopt #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 893 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/getopt.h" 1 3 /* Declarations for getopt. Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2009,2010 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _GETOPT_H #ifndef __need_getopt # define _GETOPT_H 1 #endif # 25 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/getopt.h" 3 /* If __GNU_LIBRARY__ is not already defined, either we are being used standalone, or this is the first header included in the source file. If we are being used with glibc, we need to include , but that does not exist if we are standalone. So: if __GNU_LIBRARY__ is not defined, include , which will pull in for us if it's from glibc. (Why ctype.h? It's guaranteed to exist and it doesn't flood the namespace with stuff the way some other headers do.) */ #if !defined __GNU_LIBRARY__ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 34 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/getopt.h" 3 # 35 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/getopt.h" 3 #endif # 36 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/getopt.h" 3 #ifndef __THROW # ifndef __GNUC_PREREQ # define __GNUC_PREREQ(maj, min) (0) # endif # 41 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/getopt.h" 3 # if defined __cplusplus && __GNUC_PREREQ (2,8) # define __THROW throw () # else # 44 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/getopt.h" 3 # define __THROW # endif # 46 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/getopt.h" 3 #endif # 47 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/getopt.h" 3 #ifdef __cplusplus extern "C" { #endif # 51 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/getopt.h" 3 /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns -1, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; #ifndef __need_getopt /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ struct option { const char *name; /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the `has_arg' field of `struct option'. */ # define no_argument 0 # define required_argument 1 # define optional_argument 2 #endif /* need getopt */ # 121 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/getopt.h" 3 /* Get definitions and prototypes for functions to process the arguments in ARGV (ARGC of them, minus the program name) for options given in OPTS. Return the option character from OPTS just read. Return -1 when there are no more options. For unrecognized options, or options missing arguments, `optopt' is set to the option letter, and '?' is returned. The OPTS string is a list of characters which are recognized option letters, optionally followed by colons, specifying that that letter takes an argument, to be placed in `optarg'. If a letter in OPTS is followed by two colons, its argument is optional. This behavior is specific to the GNU `getopt'. The argument `--' causes premature termination of argument scanning, explicitly telling `getopt' that there are no more options. If OPTS begins with `--', then non-option arguments are treated as arguments to the option '\0'. This behavior is specific to the GNU `getopt'. */ #ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) __THROW; # if defined __need_getopt && defined __USE_POSIX2 \ && !defined __USE_POSIX_IMPLICITLY && !defined __USE_GNU /* The GNU getopt has more functionality than the standard version. The additional functionality can be disable at runtime. This redirection helps to also do this at runtime. */ # ifdef __REDIRECT extern int __REDIRECT_NTH (getopt, (int ___argc, char *const *___argv, const char *__shortopts), __posix_getopt); # else # 164 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/getopt.h" 3 extern int __posix_getopt (int ___argc, char *const *___argv, const char *__shortopts) __THROW; # define getopt __posix_getopt # endif # 168 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/getopt.h" 3 # endif # 169 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/getopt.h" 3 #else /* not __GNU_LIBRARY__ */ # 170 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/getopt.h" 3 extern int getopt (); #endif /* __GNU_LIBRARY__ */ # 172 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/getopt.h" 3 #ifndef __need_getopt extern int getopt_long (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW; extern int getopt_long_only (int ___argc, char *const *___argv, const char *__shortopts, const struct option *__longopts, int *__longind) __THROW; #endif # 184 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/getopt.h" 3 #ifdef __cplusplus } #endif # 188 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/getopt.h" 3 /* Make sure we later can get all the definitions and declarations. */ #undef __need_getopt #endif /* getopt.h */ # 193 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/getopt.h" 3 # 894 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 2 3 #endif # 895 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K /* Put the name of the current host in no more than LEN bytes of NAME. The result is null-terminated if LEN is large enough for the full name and the terminator. */ extern int gethostname (char *__name, size_t __len) __THROW __nonnull ((1)); #endif # 903 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_UNIX98) /* Set the name of the current host to NAME, which is LEN bytes long. This call is restricted to the super-user. */ extern int sethostname (const char *__name, size_t __len) __THROW __nonnull ((1)) __wur; /* Set the current machine's Internet number to ID. This call is restricted to the super-user. */ extern int sethostid (long int __id) __THROW __wur; /* Get and set the NIS (aka YP) domain name, if any. Called just like `gethostname' and `sethostname'. The NIS domain name is usually the empty string when not using NIS. */ extern int getdomainname (char *__name, size_t __len) __THROW __nonnull ((1)) __wur; extern int setdomainname (const char *__name, size_t __len) __THROW __nonnull ((1)) __wur; /* Revoke access permissions to all processes currently communicating with the control terminal, and then send a SIGHUP signal to the process group of the control terminal. */ extern int vhangup (void) __THROW; /* Revoke the access of all descriptors currently open on FILE. */ extern int revoke (const char *__file) __THROW __nonnull ((1)) __wur; /* Enable statistical profiling, writing samples of the PC into at most SIZE bytes of SAMPLE_BUFFER; every processor clock tick while profiling is enabled, the system examines the user PC and increments SAMPLE_BUFFER[((PC - OFFSET) / 2) * SCALE / 65536]. If SCALE is zero, disable profiling. Returns zero on success, -1 on error. */ extern int profil (unsigned short int *__sample_buffer, size_t __size, size_t __offset, unsigned int __scale) __THROW __nonnull ((1)); /* Turn accounting on if NAME is an existing file. The system will then write a record for each process as it terminates, to this file. If NAME is NULL, turn accounting off. This call is restricted to the super-user. */ extern int acct (const char *__name) __THROW; /* Successive calls return the shells listed in `/etc/shells'. */ extern char *getusershell (void) __THROW; extern void endusershell (void) __THROW; /* Discard cached info. */ extern void setusershell (void) __THROW; /* Rewind and re-read the file. */ /* Put the program in the background, and dissociate from the controlling terminal. If NOCHDIR is zero, do `chdir ("/")'. If NOCLOSE is zero, redirects stdin, stdout, and stderr to /dev/null. */ extern int daemon (int __nochdir, int __noclose) __THROW __wur; #endif /* Use BSD || X/Open. */ # 961 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #if defined __USE_BSD || (defined __USE_XOPEN && !defined __USE_XOPEN2K) /* Make PATH be the root directory (the starting point for absolute paths). This call is restricted to the super-user. */ extern int chroot (const char *__path) __THROW __nonnull ((1)) __wur; /* Prompt with PROMPT and read a string from the terminal without echoing. Uses /dev/tty if possible; otherwise stderr and stdin. */ extern char *getpass (const char *__prompt) __nonnull ((1)); #endif /* Use BSD || X/Open. */ # 972 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Make all changes done to FD actually appear on disk. This function is a cancellation point and therefore not marked with __THROW. */ extern int fsync (int __fd); #ifdef __USE_GNU /* Make all changes done to all files on the file system associated with FD actually appear on disk. */ extern int syncfs (int __fd) __THROW; #endif # 986 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED /* Return identifier for the current host. */ extern long int gethostid (void); /* Make all changes done to all files actually appear on disk. */ extern void sync (void) __THROW; # if defined __USE_BSD || !defined __USE_XOPEN2K /* Return the number of bytes in a page. This is the system's page size, which is not necessarily the same as the hardware page size. */ extern int getpagesize (void) __THROW __attribute__ ((__const__)); /* Return the maximum number of file descriptors the current process could possibly have. */ extern int getdtablesize (void) __THROW; # endif # 1007 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #endif /* Use BSD || X/Open Unix. */ # 1009 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 /* Truncate FILE to LENGTH bytes. */ # ifndef __USE_FILE_OFFSET64 extern int truncate (const char *__file, __off_t __length) __THROW __nonnull ((1)) __wur; # else # 1018 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (truncate, (const char *__file, __off64_t __length), truncate64) __nonnull ((1)) __wur; # else # 1023 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # define truncate truncate64 # endif # 1025 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # endif # 1026 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # ifdef __USE_LARGEFILE64 extern int truncate64 (const char *__file, __off64_t __length) __THROW __nonnull ((1)) __wur; # endif # 1030 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #endif /* Use BSD || X/Open Unix || POSIX 2008. */ # 1032 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #if defined __USE_BSD || defined __USE_POSIX199309 \ || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K /* Truncate the file FD is open on to LENGTH bytes. */ # ifndef __USE_FILE_OFFSET64 extern int ftruncate (int __fd, __off_t __length) __THROW __wur; # else # 1040 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (ftruncate, (int __fd, __off64_t __length), ftruncate64) __wur; # else # 1044 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # define ftruncate ftruncate64 # endif # 1046 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # endif # 1047 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # ifdef __USE_LARGEFILE64 extern int ftruncate64 (int __fd, __off64_t __length) __THROW __wur; # endif # 1050 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #endif /* Use BSD || POSIX.1b || X/Open Unix || XPG6. */ # 1052 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K) \ || defined __USE_MISC /* Set the end of accessible data space (aka "the break") to ADDR. Returns zero on success and -1 for errors (with errno set). */ extern int brk (void *__addr) __THROW __wur; /* Increase or decrease the end of accessible data space by DELTA bytes. If successful, returns the address the previous end of data space (i.e. the beginning of the new space, if DELTA > 0); returns (void *) -1 for errors (with errno set). */ extern void *sbrk (intptr_t __delta) __THROW; #endif # 1067 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #ifdef __USE_MISC /* Invoke `system call' number SYSNO, passing it the remaining arguments. This is completely system-dependent, and not often useful. In Unix, `syscall' sets `errno' for all errors and most calls return -1 for errors; in many systems you cannot pass arguments or get return values for all system calls (`pipe', `fork', and `getppid' typically among them). In Mach, all system calls take normal arguments and always return an error code (zero for success). */ extern long int syscall (long int __sysno, ...) __THROW; #endif /* Use misc. */ # 1083 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #if (defined __USE_MISC || defined __USE_XOPEN_EXTENDED) && !defined F_LOCK /* NOTE: These declarations also appear in ; be sure to keep both files consistent. Some systems have them there and some here, and some software depends on the macros being defined without including both. */ /* `lockf' is a simpler interface to the locking facilities of `fcntl'. LEN is always relative to the current file position. The CMD argument is one of the following. This function is a cancellation point and therefore not marked with __THROW. */ # define F_ULOCK 0 /* Unlock a previously locked region. */ # define F_LOCK 1 /* Lock a region for exclusive use. */ # define F_TLOCK 2 /* Test and lock a region for exclusive use. */ # define F_TEST 3 /* Test a region for other processes locks. */ # ifndef __USE_FILE_OFFSET64 extern int lockf (int __fd, int __cmd, __off_t __len) __wur; # else # 1105 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # ifdef __REDIRECT extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len), lockf64) __wur; # else # 1109 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # define lockf lockf64 # endif # 1111 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # endif # 1112 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # ifdef __USE_LARGEFILE64 extern int lockf64 (int __fd, int __cmd, __off64_t __len) __wur; # endif # 1115 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #endif /* Use misc and F_LOCK not already defined. */ # 1116 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #ifdef __USE_GNU /* Evaluate EXPRESSION, and repeat as long as it returns -1 with `errno' set to EINTR. */ # define TEMP_FAILURE_RETRY(expression) \ (__extension__ \ ({ long int __result; \ do __result = (long int) (expression); \ while (__result == -1L && errno == EINTR); \ __result; })) #endif # 1130 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #if defined __USE_POSIX199309 || defined __USE_UNIX98 /* Synchronize at least the data part of a file with the underlying media. */ extern int fdatasync (int __fildes); #endif /* Use POSIX199309 */ # 1136 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* XPG4.2 specifies that prototypes for the encryption functions must be defined here. */ #ifdef __USE_XOPEN /* Encrypt at most 8 characters from KEY using salt to perturb DES. */ extern char *crypt (const char *__key, const char *__salt) __THROW __nonnull ((1, 2)); /* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt block in place. */ extern void encrypt (char *__block, int __edflag) __THROW __nonnull ((1)); /* Swab pairs bytes in the first N bytes of the area pointed to by FROM and copy the result to TO. The value of TO must not be in the range [FROM - N + 1, FROM - 1]. If N is odd the first byte in FROM is without partner. */ extern void swab (const void *__restrict __from, void *__restrict __to, ssize_t __n) __THROW __nonnull ((1, 2)); #endif # 1157 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* The Single Unix specification demands this prototype to be here. It is also found in . */ #if defined __USE_XOPEN && !defined __USE_XOPEN2K /* Return the name of the controlling terminal. */ extern char *ctermid (char *__s) __THROW; #endif # 1165 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 /* Define some macros helping to catch buffer overflows. */ #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 1169 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # 1170 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 #endif # 1171 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 __END_DECLS #endif /* unistd.h */ # 1175 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/unistd.h" 3 # 14 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" 2 #if defined (MPL_NEEDS_USLEEP_DECL) int usleep(useconds_t usec); #endif # 17 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" #endif # 18 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" /* * This include file provide the definitions that are necessary to use the * timer calls, including the definition of the time stamp type and * any inlined timer calls. * * The include file timerconf.h (created by autoheader from configure.ac) * is needed only to build the function versions of the timers. */ /* Include the appropriate files */ #define MPL_TIMER_KIND__GETHRTIME 1 #define MPL_TIMER_KIND__CLOCK_GETTIME 2 #define MPL_TIMER_KIND__GETTIMEOFDAY 3 #define MPL_TIMER_KIND__LINUX86_CYCLE 4 #define MPL_TIMER_KIND__QUERYPERFORMANCECOUNTER 6 #define MPL_TIMER_KIND__WIN86_CYCLE 7 #define MPL_TIMER_KIND__GCC_IA64_CYCLE 8 /* The value "MPL_TIMER_KIND__DEVICE" means that the ADI device provides the timer */ #define MPL_TIMER_KIND__DEVICE 9 #define MPL_TIMER_KIND__WIN64_CYCLE 10 #define MPL_TIMER_KIND__MACH_ABSOLUTE_TIME 11 #define MPL_TIMER_KIND MPL_TIMER_KIND__CLOCK_GETTIME /* Define a time stamp */ typedef struct timespec MPL_time_t; /* The timer code is allowed to return "NOT_INITIALIZED" before the * device is initialized. Once the device is initialized, it must * always return SUCCESS, so the upper layers do not need to check for * the return code. */ #define MPL_TIMER_SUCCESS 0 #define MPL_TIMER_ERR_NOT_INITIALIZED 1 #if MPL_TIMER_KIND == MPL_TIMER_KIND__GETHRTIME #if 0 /* expanded by -frewrite-includes */ #include "mpl_timer_gethrtime.h" #endif /* expanded by -frewrite-includes */ # 52 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" # 53 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" #elif MPL_TIMER_KIND == MPL_TIMER_KIND__CLOCK_GETTIME # 54 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_timer_clock_gettime.h" #endif /* expanded by -frewrite-includes */ # 54 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_timer_clock_gettime.h" 1 /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPL_TIMER_CLOCK_GETTIME_H_INCLUDED #define MPL_TIMER_CLOCK_GETTIME_H_INCLUDED #define MPLI_WTIME_IS_A_FUNCTION #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_timer_clock_gettime.h" # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_timer_clock_gettime.h" #ifdef MPL_NEEDS_SYS_TIME_H /* Some OS'es mistakenly require sys/time.h to get the definition of CLOCK_REALTIME (POSIX requires the definition to be in time.h) */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_timer_clock_gettime.h" # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_timer_clock_gettime.h" #endif # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_timer_clock_gettime.h" #endif # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_timer_clock_gettime.h" # 55 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" 2 #elif MPL_TIMER_KIND == MPL_TIMER_KIND__GETTIMEOFDAY # 56 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_timer_gettimeofday.h" #endif /* expanded by -frewrite-includes */ # 56 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" # 57 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" #elif MPL_TIMER_KIND == MPL_TIMER_KIND__LINUX86_CYCLE # 58 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_timer_linux86_cycle.h" #endif /* expanded by -frewrite-includes */ # 58 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" # 59 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" #elif MPL_TIMER_KIND == MPL_TIMER_KIND__QUERYPERFORMANCECOUNTER # 60 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_timer_query_performance_counter.h" #endif /* expanded by -frewrite-includes */ # 60 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" # 61 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" #elif MPL_TIMER_KIND == MPL_TIMER_KIND__WIN86_CYCLE || MPL_TIMER_KIND == MPL_TIMER_KIND__WIN64_CYCLE # 62 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_timer_win86_cycle.h" #endif /* expanded by -frewrite-includes */ # 62 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" # 63 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" #elif MPL_TIMER_KIND == MPL_TIMER_KIND__GCC_IA64_CYCLE # 64 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_timer_gcc_ia64_cycle.h" #endif /* expanded by -frewrite-includes */ # 64 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" # 65 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" #elif MPL_TIMER_KIND == MPL_TIMER_KIND__DEVICE # 66 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_timer_device.h" #endif /* expanded by -frewrite-includes */ # 66 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" # 67 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" #elif MPL_TIMER_KIND == MPL_TIMER_KIND__MACH_ABSOLUTE_TIME # 68 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_timer_mach_absolute_time.h" #endif /* expanded by -frewrite-includes */ # 68 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" # 69 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" #endif # 70 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" /* * Prototypes. These are defined here so that inlined timer calls can * use them, as well as any profiling and timing code that is built into * MPL */ #if defined MPLI_WTIME_IS_A_FUNCTION /*@ MPL_wtime - Return a time stamp Output Parameter: . timeval - A pointer to an 'MPL_wtime_t' variable. Notes: This routine returns an `opaque` time value. This difference between two time values returned by 'MPL_wtime' can be converted into an elapsed time in seconds with the routine 'MPL_wtime_diff'. This routine is defined this way to simplify its implementation as a macro. For example, the for Intel x86 and gcc, .vb #define MPL_wtime(timeval) \ __asm__ __volatile__("rdtsc" : "=A" (*timeval)) .ve For some purposes, it is important that the timer calls change the timing of the code as little as possible. This form of a timer routine provides for a very fast timer that has minimal impact on the rest of the code. From a semantic standpoint, this format emphasizes that any particular timer value has no meaning; only the difference between two values is meaningful. Module: Timer Question: MPI-2 allows 'MPI_Wtime' to be a macro. We should make that easy; this version does not accomplish that. @*/ int MPL_wtime(MPL_time_t * timeval); #endif /* MPLI_WTIME_IS_A_FUNCTION */ # 115 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" /*@ MPL_wtime_diff - Compute the difference between two time stamps Input Parameters: . t1, t2 - Two time values set by 'MPL_wtime' on this process. Output Parameter: . diff - The different in time between t2 and t1, measured in seconds. Note: If 't1' is null, then 't2' is assumed to be differences accumulated with 'MPL_wtime_acc', and the output value gives the number of seconds that were accumulated. Question: Instead of handling a null value of 't1', should we have a separate routine 'MPL_wtime_todouble' that converts a single timestamp to a double value? Module: Timer @*/ int MPL_wtime_diff( MPL_time_t *t1, MPL_time_t *t2, double *diff ); /*@ MPL_wtime_acc - Accumulate time values Input Parameters: . t1,t2,t3 - Three time values. 't3' is updated with the difference between 't2' and 't1': '*t3 += (t2 - t1)'. Notes: This routine is used to accumulate the time spent with a block of code without first converting the time stamps into a particular arithmetic type such as a 'double'. For example, if the 'MPL_wtime' routine accesses a cycle counter, this routine (or macro) can perform the accumulation using integer arithmetic. To convert a time value accumulated with this routine, use 'MPL_wtime_diff' with a 't1' of zero. Module: Timer @*/ int MPL_wtime_acc( MPL_time_t *t1, MPL_time_t *t2, MPL_time_t *t3 ); /*@ MPL_wtime_todouble - Converts a timestamp to a double Input Parameter: . timeval - 'MPL_time_t' time stamp Output Parameter: . seconds - Time in seconds from an arbitrary (but fixed) time in the past Notes: This routine may be used to change a timestamp into a number of seconds, suitable for 'MPI_Wtime'. @*/ int MPL_wtime_todouble( MPL_time_t *timeval, double *seconds ); /*@ MPL_wtick - Provide the resolution of the 'MPL_wtime' timer Return value: Resolution of the timer in seconds. In many cases, this is the time between ticks of the clock that 'MPL_wtime' returns. In other words, the minimum significant difference that can be computed by 'MPL_wtime_diff'. Note that in some cases, the resolution may be estimated. No application should expect either the same estimate in different runs or the same value on different processes. Module: Timer @*/ int MPL_wtick(double *); /*@ MPL_wtime_init - Initialize the timer Note: This routine should perform any steps needed to initialize the timer. In addition, it should set the value of the attribute 'MPI_WTIME_IS_GLOBAL' if the timer is known to be the same for all processes in 'MPI_COMM_WORLD' (the value is zero by default). Module: Timer @*/ int MPL_wtime_init(void); /* * For timers that do not have defined resolutions, compute the resolution * by sampling the clock itself. * */ static double tickval = -1.0; static void init_wtick(void) ATTRIBUTE((unused)); static void init_wtick(void) { double timediff; MPL_time_t t1, t2; int cnt; int icnt; tickval = 1.0e6; for (icnt = 0; icnt < 10; icnt++) { cnt = 1000; MPL_wtime(&t1); do { MPL_wtime(&t2); MPL_wtime_diff(&t1, &t2, &timediff); if (timediff > 0) break; } while (cnt--); if (cnt && timediff > 0.0 && timediff < tickval) { MPL_wtime_diff(&t1, &t2, &tickval); } } } #endif /* !defined(MPL_TIMER_H_INCLUDED) */ # 245 "/tmp/robl/mpich-bgq/src/mpl/include/mpl_timer.h" # 23 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpl_yield.h" #endif /* expanded by -frewrite-includes */ # 23 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2006 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPL_PROCESS_WRAPPERS_H_INCLUDED #define MPL_PROCESS_WRAPPERS_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mplconfig.h" #endif /* expanded by -frewrite-includes */ # 9 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" /* MPL_SCHED_YIELD() - Yield the processor to OS scheduler */ /* On a typical Linux system (verified with kernels 3.2 and 3.5), * usleep has a resolution of more than 1000 cycles. This makes * it impractical if the desired sleeping period is shorter. On * the other hand, sleep(0) returns immediately without going to * the kernel. This means that there is no actual yielding, which * is equivalent to doing nothing. Thus, usleep and sleep are not * recommended as ways to yield the CPU, and sched_yield would be * preferred if available. * Note that nanosleep has the same shortcomings as usleep.*/ #if defined(MPL_USE_SWITCHTOTHREAD_FOR_YIELD) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 23 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" # 24 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 24 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #define MPL_sched_yield() SwitchToThread() #elif defined(MPL_USE_WIN32_SLEEP_FOR_YIELD) # 27 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 27 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" # 28 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 28 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" # 29 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #define MPL_sched_yield() Sleep(0) #elif defined(MPL_USE_SCHED_YIELD_FOR_YIELD) # 31 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #ifdef MPL_HAVE_SCHED_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 32 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" # 33 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #endif # 34 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #define MPL_sched_yield() sched_yield() #elif defined(MPL_USE_YIELD_FOR_YIELD) # 36 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #ifdef MPL_HAVE_SCHED_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 37 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" # 38 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #endif # 39 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #define MPL_sched_yield() yield() #elif defined (MPL_USE_SELECT_FOR_YIELD) # 41 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #ifdef MPL_HAVE_SYS_SELECT_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 42 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" # 43 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #endif # 44 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #define MPL_sched_yield() do { struct timeval t; t.tv_sec = 0; t.tv_usec = 0; select(0,0,0,0,&t); } while (0) #elif defined (MPL_USE_USLEEP_FOR_YIELD) # 46 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #ifdef MPL_HAVE_UNISTD_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 47 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" # 48 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #if defined (MPL_NEEDS_USLEEP_DECL) int usleep(useconds_t usec); #endif # 51 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #endif # 52 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #define MPL_sched_yield() usleep(0) #elif defined (MPL_USE_SLEEP_FOR_YIELD) # 54 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #ifdef MPL_HAVE_UNISTD_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 55 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" # 56 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #endif # 57 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #define MPL_sched_yield() sleep(0) #elif defined (MPL_USE_NOTHING_FOR_YIELD) # 59 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #define MPL_sched_yield() do {} while (0) #else # 61 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #error "No mechanism available to yield" #endif # 63 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" #endif /* MPL_PROCESS_WRAPPERS_H_INCLUDED */ # 65 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_yield.h" # 24 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpl_dbg.h" #endif /* expanded by -frewrite-includes */ # 24 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_shm.h" #endif /* expanded by -frewrite-includes */ # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_shm.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* vim: set ft=c.mpich : */ /* * (C) 2010 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ /* This file contains "pre" definitions and declarations for the OS wrappers. * That is, things that shouldn't depend on much more than the mpichconf.h * values. */ #ifndef MPL_SHM_H_INCLUDED #define MPL_SHM_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mplconfig.h" #endif /* expanded by -frewrite-includes */ # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_shm.h" # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_shm.h" #ifdef MPL_USE_SYSV_SHM #if 0 /* expanded by -frewrite-includes */ #include "mpl_shm_sysv.h" #endif /* expanded by -frewrite-includes */ # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_shm.h" # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_shm.h" #elif defined MPL_USE_MMAP_SHM # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_shm.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_shm_mmap.h" #endif /* expanded by -frewrite-includes */ # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_shm.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_shm_mmap.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* vim: set ft=c.mpich : */ /* * (C) 2016 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPL_SHM_MMAP_H_INCLUDED #define MPL_SHM_MMAP_H_INCLUDED typedef intptr_t MPLI_shm_lhnd_t; typedef char * MPLI_shm_ghnd_t; /* The local handle, lhnd, is valid only for the current process, * The global handle, ghnd, is valid across multiple processes * The handle flag, flag, is used to set various attributes of the * handle. */ typedef struct MPLI_shm_lghnd_t { MPLI_shm_lhnd_t lhnd; MPLI_shm_ghnd_t ghnd; int flag; } MPLI_shm_lghnd_t; typedef MPLI_shm_lghnd_t *MPL_shm_hnd_t; #define MPL_SHM_FNAME_LEN 50 #define MPLI_SHM_GHND_SZ MPL_SHM_FNAME_LEN #define MPLI_SHM_LHND_INVALID (-1) #define MPLI_SHM_LHND_INIT_VAL (-1) #define MPLI_SHM_SEG_ALREADY_EXISTS EEXIST /* Returns 0 on success, -1 on error */ int MPLI_shm_lhnd_close(MPL_shm_hnd_t hnd); #endif /* ifndef MPL_SHM_MMAP_H_INCLUDED */ # 37 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_shm_mmap.h" # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_shm.h" 2 #elif defined MPL_USE_NT_SHM # 22 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_shm.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl_shm_win.h" #endif /* expanded by -frewrite-includes */ # 22 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_shm.h" # 23 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_shm.h" #endif # 24 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_shm.h" #define MPLI_SHM_FLAG_CLR 0x0 #define MPLI_SHM_FLAG_SHM_CREATE 0x1 #define MPLI_SHM_FLAG_SHM_ATTACH 0x10 #define MPLI_SHM_FLAG_GHND_STATIC 0x100 #define MPL_SHM_HND_INVALID NULL #define MPLI_SHM_GHND_INVALID NULL #define MPLI_SHM_GHND_INIT_VAL '\0' #define MPL_SHM_HND_SZ (sizeof(MPLI_shm_lghnd_t)) #define MPL_SHM_GHND_SZ MPLI_SHM_GHND_SZ /* A Handle is valid if it is initialized/init and has a value * different from the default/invalid value assigned during init */ #define MPLI_shm_hnd_is_valid(hnd) ( \ ((hnd) && \ MPLI_shm_lhnd_is_valid(hnd) && \ MPLI_shm_ghnd_is_valid(hnd)) \ ) /* With MMAP_SHM, NT_SHM & SYSV_SHM local handle is always init'ed */ #define MPLI_shm_hnd_is_init(hnd) ( \ ((hnd) && /* MPL_shm_lhnd_is_init(hnd) && */ \ MPLI_shm_ghnd_is_init(hnd)) \ ) /* These macros are the setters/getters for the shm handle */ #define MPLI_shm_lhnd_get(hnd) ((hnd)->lhnd) #define MPLI_shm_lhnd_set(hnd, val) ((hnd)->lhnd=val) #define MPLI_shm_lhnd_is_valid(hnd) (((hnd)->lhnd != MPLI_SHM_LHND_INVALID)) #define MPLI_shm_lhnd_is_init(hnd) 1 /* Allocate mem for references within the handle */ /* Returns 0 on success, -1 on error */ #define MPL_shm_hnd_ref_alloc(hnd)( \ ((hnd)->ghnd = (MPLI_shm_ghnd_t) \ MPL_malloc(MPLI_SHM_GHND_SZ)) ? 0 : -1 \ ) /* These macros are the setters/getters for the shm handle */ #define MPLI_shm_ghnd_get_by_ref(hnd) ((hnd)->ghnd) /* Returns -1 on error, 0 on success */ #define MPLI_shm_ghnd_get_by_val(hnd, str, strlen) ( \ (MPL_snprintf(str, strlen, "%s", \ MPLI_shm_ghnd_get_by_ref(hnd))) ? 0 : -1 \ ) #define MPLI_shm_ghnd_set_by_ref(hnd, val) ((hnd)->ghnd = val) /* Returns -1 on error, 0 on success */ /* FIXME: What if val is a non-null terminated string ? */ #define MPLI_shm_ghnd_set_by_val(hnd, fmt, val) ( \ (MPL_snprintf(MPLI_shm_ghnd_get_by_ref(hnd), \ MPLI_SHM_GHND_SZ, fmt, val)) ? 0 : -1 \ ) #define MPLI_shm_ghnd_is_valid(hnd) ( \ (((hnd)->ghnd == MPLI_SHM_GHND_INVALID) || \ (strlen((hnd)->ghnd) == 0)) ? 0 : 1 \ ) #define MPLI_shm_ghnd_is_init(hnd) ( \ ((hnd)->flag & MPLI_SHM_FLAG_GHND_STATIC) ? \ 1 : \ (((hnd)->ghnd != MPLI_SHM_GHND_INVALID) ? 1 : 0) \ ) /* Allocate mem for global handle. * Returns 0 on success, -1 on failure */ static inline int MPLI_shm_ghnd_alloc(MPL_shm_hnd_t hnd) { if(!(hnd->ghnd)){ hnd->ghnd = (MPLI_shm_ghnd_t)MPL_malloc(MPLI_SHM_GHND_SZ); if(!(hnd->ghnd)){ return -1; } } /* Global handle is no longer static */ hnd->flag &= ~MPLI_SHM_FLAG_GHND_STATIC; return 0; } /* Allocate mem for handle. Lazy allocation for global handle */ /* Returns 0 on success, -1 on error */ static inline int MPLI_shm_hnd_alloc(MPL_shm_hnd_t *hnd_ptr) { *hnd_ptr = (MPL_shm_hnd_t) MPL_malloc(MPL_SHM_HND_SZ); if(*hnd_ptr){ (*hnd_ptr)->flag = MPLI_SHM_FLAG_GHND_STATIC; } else{ return -1; } return 0; } /* Close Handle */ #define MPLI_shm_hnd_close(hnd) MPLI_shm_lhnd_close(hnd) static inline void MPLI_shm_hnd_reset_val(MPL_shm_hnd_t hnd) { MPLI_shm_lhnd_set(hnd, MPLI_SHM_LHND_INIT_VAL); if(hnd->flag & MPLI_SHM_FLAG_GHND_STATIC){ hnd->ghnd = MPLI_SHM_GHND_INVALID; } else{ (hnd->ghnd)[0] = MPLI_SHM_GHND_INIT_VAL; } } static inline void MPLI_shm_hnd_free(MPL_shm_hnd_t hnd) { if(MPLI_shm_hnd_is_init(hnd)){ if(!(hnd->flag & MPLI_SHM_FLAG_GHND_STATIC)){ MPL_free(hnd->ghnd); } MPL_free(hnd); } } /* interfaces */ int MPL_shm_hnd_serialize(char *str, MPL_shm_hnd_t hnd, int str_len); int MPL_shm_hnd_deserialize(MPL_shm_hnd_t hnd, const char *str_hnd, size_t str_hnd_len); int MPL_shm_hnd_get_serialized_by_ref(MPL_shm_hnd_t hnd, char **str_ptr); int MPL_shm_hnd_deserialize_by_ref(MPL_shm_hnd_t hnd, char **ser_hnd_ptr); int MPL_shm_hnd_init(MPL_shm_hnd_t *hnd_ptr); int MPL_shm_hnd_finalize(MPL_shm_hnd_t *hnd_ptr); int MPL_shm_seg_create(MPL_shm_hnd_t hnd, intptr_t seg_sz); int MPL_shm_seg_open(MPL_shm_hnd_t hnd, intptr_t seg_sz); int MPL_shm_seg_create_and_attach(MPL_shm_hnd_t hnd, intptr_t seg_sz, char **shm_addr_ptr, int offset); int MPL_shm_seg_attach(MPL_shm_hnd_t hnd, intptr_t seg_sz, char **shm_addr_ptr, int offset); int MPL_shm_seg_detach(MPL_shm_hnd_t hnd, char **shm_addr_ptr, intptr_t seg_sz); int MPL_shm_seg_remove(MPL_shm_hnd_t hnd); #endif /* MPL_SHM_H_INCLUDED */ # 161 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_shm.h" # 26 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" 2 #endif /* !defined(MPL_H_INCLUDED) */ # 28 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl.h" # 137 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "opa_primitives.h" #endif /* expanded by -frewrite-includes */ # 137 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2008 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef OPA_PRIMITIVES_H_INCLUDED #define OPA_PRIMITIVES_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "opa_config.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" # 1 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" 1 #ifndef _SRC_OPA_CONFIG_H #define _SRC_OPA_CONFIG_H 1 /* src/opa_config.h. Generated automatically at end of configure. */ /* src/config.h. Generated from config.h.in by configure. */ /* src/config.h.in. Generated from configure.ac by autoheader. */ /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2008 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ /* define if lock-based emulation was explicitly requested at configure time via --with-atomic-primitives=no */ /* #undef EXPLICIT_EMULATION */ /* Define to 1 if you have the header file. */ /* #undef HAVE_ATOMIC_H */ /* Define to 1 if you have the header file. */ #ifndef OPA_HAVE_DLFCN_H #define OPA_HAVE_DLFCN_H 1 #endif # 26 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* define to 1 if we have support for gcc ARM atomics */ /* #undef HAVE_GCC_AND_ARM_ASM */ /* define to 1 if we have support for gcc ia64 primitives */ /* #undef HAVE_GCC_AND_IA64_ASM */ /* define to 1 if we have support for gcc PowerPC atomics */ #ifndef OPA_HAVE_GCC_AND_POWERPC_ASM #define OPA_HAVE_GCC_AND_POWERPC_ASM 1 #endif # 37 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* define to 1 if we have support for gcc SiCortex atomics */ /* #undef HAVE_GCC_AND_SICORTEX_ASM */ /* Define if GNU __attribute__ is supported */ #ifndef OPA_HAVE_GCC_ATTRIBUTE #define OPA_HAVE_GCC_ATTRIBUTE 1 #endif # 45 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* define to 1 if we have support for gcc atomic intrinsics */ #ifndef OPA_HAVE_GCC_INTRINSIC_ATOMICS #define OPA_HAVE_GCC_INTRINSIC_ATOMICS 1 #endif # 50 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* define to 1 if we have support for gcc x86/x86_64 primitives */ /* #undef HAVE_GCC_X86_32_64 */ /* define to 1 if we have support for gcc x86 primitives for pre-Pentium 4 */ /* #undef HAVE_GCC_X86_32_64_P3 */ /* Define to 1 if you have the header file. */ /* #undef HAVE_INTRIN_H */ /* Define to 1 if you have the header file. */ #ifndef OPA_HAVE_INTTYPES_H #define OPA_HAVE_INTTYPES_H 1 #endif # 64 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* Define to 1 if you have the `pthread' library (-lpthread). */ #ifndef OPA_HAVE_LIBPTHREAD #define OPA_HAVE_LIBPTHREAD 1 #endif # 69 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* Define to 1 if you have the header file. */ #ifndef OPA_HAVE_MEMORY_H #define OPA_HAVE_MEMORY_H 1 #endif # 74 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* define to 1 if we have support for Windows NT atomic intrinsics */ /* #undef HAVE_NT_INTRINSICS */ /* Define to 1 if you have the header file. */ #ifndef OPA_HAVE_PTHREAD_H #define OPA_HAVE_PTHREAD_H 1 #endif # 82 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* Define to 1 if you have the `pthread_yield' function. */ #ifndef OPA_HAVE_PTHREAD_YIELD #define OPA_HAVE_PTHREAD_YIELD 1 #endif # 87 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* Define to 1 if you have the `sched_yield' function. */ /* #undef HAVE_SCHED_YIELD */ /* Define to 1 if you have the header file. */ #ifndef OPA_HAVE_STDDEF_H #define OPA_HAVE_STDDEF_H 1 #endif # 95 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* Define to 1 if you have the header file. */ #ifndef OPA_HAVE_STDINT_H #define OPA_HAVE_STDINT_H 1 #endif # 100 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* Define to 1 if you have the header file. */ #ifndef OPA_HAVE_STDLIB_H #define OPA_HAVE_STDLIB_H 1 #endif # 105 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* Define if strict checking of atomic operation fairness is desired */ /* #undef HAVE_STRICT_FAIRNESS_CHECKS */ /* Define to 1 if you have the header file. */ #ifndef OPA_HAVE_STRINGS_H #define OPA_HAVE_STRINGS_H 1 #endif # 113 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* Define to 1 if you have the header file. */ #ifndef OPA_HAVE_STRING_H #define OPA_HAVE_STRING_H 1 #endif # 118 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* define to 1 if we have support for Sun atomic operations library */ /* #undef HAVE_SUN_ATOMIC_OPS */ /* Define to 1 if you have the header file. */ #ifndef OPA_HAVE_SYS_STAT_H #define OPA_HAVE_SYS_STAT_H 1 #endif # 126 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* Define to 1 if you have the header file. */ #ifndef OPA_HAVE_SYS_TYPES_H #define OPA_HAVE_SYS_TYPES_H 1 #endif # 131 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* Define to 1 if you have the header file. */ #ifndef OPA_HAVE_UNISTD_H #define OPA_HAVE_UNISTD_H 1 #endif # 136 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* Define to the sub-directory where libtool stores uninstalled libraries. */ #ifndef OPA_LT_OBJDIR #define OPA_LT_OBJDIR ".libs/" #endif # 141 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* define to the maximum number of simultaneous threads */ #ifndef OPA_MAX_NTHREADS #define OPA_MAX_NTHREADS 100 #endif # 146 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* Define to 1 if assertions should be disabled. */ /* #undef NDEBUG */ /* Name of package */ #ifndef OPA_PACKAGE #define OPA_PACKAGE "openpa" #endif # 154 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* Define to the address where bug reports for this package should be sent. */ #ifndef OPA_PACKAGE_BUGREPORT #define OPA_PACKAGE_BUGREPORT "https://trac.mcs.anl.gov/projects/openpa/newticket" #endif # 159 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* Define to the full name of this package. */ #ifndef OPA_PACKAGE_NAME #define OPA_PACKAGE_NAME "OpenPA" #endif # 164 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* Define to the full name and version of this package. */ #ifndef OPA_PACKAGE_STRING #define OPA_PACKAGE_STRING "OpenPA 1.0.3" #endif # 169 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* Define to the one symbol short name of this package. */ #ifndef OPA_PACKAGE_TARNAME #define OPA_PACKAGE_TARNAME "openpa" #endif # 174 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* Define to the home page for this package. */ #ifndef OPA_PACKAGE_URL #define OPA_PACKAGE_URL "" #endif # 179 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* Define to the version of this package. */ #ifndef OPA_PACKAGE_VERSION #define OPA_PACKAGE_VERSION "1.0.3" #endif # 184 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* The size of `int', as computed by sizeof. */ #ifndef OPA_SIZEOF_INT #define OPA_SIZEOF_INT 4 #endif # 189 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* The size of `void *', as computed by sizeof. */ #ifndef OPA_SIZEOF_VOID_P #define OPA_SIZEOF_VOID_P 8 #endif # 194 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* Define to 1 if you have the ANSI C header files. */ #ifndef OPA_STDC_HEADERS #define OPA_STDC_HEADERS 1 #endif # 199 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* define to 1 to force using lock-based atomic primitives */ /* #undef USE_LOCK_BASED_PRIMITIVES */ /* define to 1 if unsafe (non-atomic) primitives should be used */ /* #undef USE_UNSAFE_PRIMITIVES */ /* Version number of package */ #ifndef OPA_VERSION #define OPA_VERSION "1.0.3" #endif # 210 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus /* #undef inline */ #endif # 219 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #ifndef _opa_restrict #define _opa_restrict __restrict #endif # 226 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* Work around a bug in Sun C++: it does not support _Restrict or __restrict__, even though the corresponding Sun C compiler ends up with "#define restrict _Restrict" or "#define restrict __restrict__" in the previous line. Perhaps some future version of Sun C++ will work with restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict # define __restrict__ #endif # 235 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" /* once: _SRC_OPA_CONFIG_H */ #endif # 240 "/tmp/robl/mpich-bgq/src/openpa/src/opa_config.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "opa_util.h" #endif /* expanded by -frewrite-includes */ # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_util.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2008 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef OPA_UTIL_H_INCLUDED #define OPA_UTIL_H_INCLUDED #define OPA_QUOTE(x_) OPA_QUOTE2(x_) #define OPA_QUOTE2(x_) #x_ #if defined(OPA_HAVE_GCC_ATTRIBUTE) # define OPA_ATTRIBUTE(x_) __attribute__ (x_) #else # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_util.h" # define OPA_ATTRIBUTE(x_) #endif # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_util.h" /* FIXME this just needs a total rework in general with an OPA_NDEBUG or similar. */ #define OPA_assert(expr_) do {} while (0) #define OPA_assertp(expr_) do { if (!(expr_)) ++((int *)NULL) } while (0) /* SEGV intentionally */ /* A compile-time assertion macro. It should cause a compilation error if (expr_) is false. */ #define OPA_COMPILE_TIME_ASSERT(expr_) \ do { switch(0) { case 0: case (expr_): default: break; } } while (0) #endif /* OPA_UTIL_H_INCLUDED */ # 28 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_util.h" # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" 2 /* Clean up some of the opa_config.h definitions. This is a consequence of using the AX_PREFIX_CONFIG_H macro. Autoconf won't define inline or _opa_inline when a real "inline" works. Since we are unconditionally using _opa_inline we must define it ourselves in this case. */ #ifndef _opa_inline #define _opa_inline inline #endif # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #ifndef _opa_restrict #define _opa_restrict restrict #endif # 24 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #ifndef _opa_const #define _opa_const const #endif # 27 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" /* Primitive atomic functions -------------------------- The included file is responsible for defining the types of OPA_int_t and OPA_ptr_t as well as a set of functions for operating on these types. If you have the following declaration: OPA_int_t atomic_var; Then in order for the emulation functions to compile, the underlying value of atomic_var should be accessible via: atomic_var.v; The same goes for OPA_ptr_t. The atomic functions that must be ported for each architecture: static _opa_inline int OPA_load_int(_opa_const OPA_int_t *ptr); static _opa_inline void OPA_store_int(OPA_int_t *ptr, int val); static _opa_inline void *OPA_load_ptr(_opa_const OPA_ptr_t *ptr); static _opa_inline void OPA_store_ptr(OPA_ptr_t *ptr, void *val); static _opa_inline void OPA_add_int(OPA_int_t *ptr, int val); static _opa_inline void OPA_incr_int(OPA_int_t *ptr); static _opa_inline void OPA_decr_int(OPA_int_t *ptr); static _opa_inline int OPA_decr_and_test_int(OPA_int_t *ptr); static _opa_inline int OPA_fetch_and_add_int(OPA_int_t *ptr, int val); static _opa_inline int OPA_fetch_and_incr_int(OPA_int_t *ptr); static _opa_inline int OPA_fetch_and_decr_int(OPA_int_t *ptr); static _opa_inline void *OPA_cas_ptr(OPA_ptr_t *ptr, void *oldv, void *newv); static _opa_inline int OPA_cas_int(OPA_int_t *ptr, int oldv, int newv); static _opa_inline void *OPA_swap_ptr(OPA_ptr_t *ptr, void *val); static _opa_inline int OPA_swap_int(OPA_int_t *ptr, int val); // (the memory barriers may be macros instead of inline functions) static _opa_inline void OPA_write_barrier(); static _opa_inline void OPA_read_barrier(); static _opa_inline void OPA_read_write_barrier(); // Loads and stores with memory ordering guarantees (also may be macros): static _opa_inline int OPA_load_acquire_int(_opa_const OPA_int_t *ptr); static _opa_inline void OPA_store_release_int(OPA_int_t *ptr, int val); static _opa_inline void *OPA_load_acquire_ptr(_opa_const OPA_ptr_t *ptr); static _opa_inline void OPA_store_release_ptr(OPA_ptr_t *ptr, void *val); // Compiler barrier, only preventing compiler reordering, *not* CPU // reordering (may be a macro): static _opa_inline void OPA_compiler_barrier(); // The following need to be ported only for architectures supporting LL/SC: static _opa_inline int OPA_LL_int(OPA_int_t *ptr); static _opa_inline int OPA_SC_int(OPA_int_t *ptr, int val); static _opa_inline void *OPA_LL_ptr(OPA_ptr_t *ptr); static _opa_inline int OPA_SC_ptr(OPA_ptr_t *ptr, void *val); // Additionally, the following initializer macros must be defined: #define OPA_INT_T_INITIALIZER(val_) ... #define OPA_PTR_T_INITIALIZER(val_) ... // They should be useable as C89 static initializers like so: struct { int x; OPA_int_t y; OPA_ptr_t z; } foo = { 35, OPA_INT_T_INITIALIZER(1), OPA_PTR_T_INITIALIZER(NULL) }; */ /* Include the appropriate header for the architecture */ #if defined(OPA_USE_UNSAFE_PRIMITIVES) /* comes first to permit user overrides in the style of NDEBUG */ #if 0 /* expanded by -frewrite-includes */ #include "primitives/opa_unsafe.h" #endif /* expanded by -frewrite-includes */ # 100 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" # 101 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #elif defined(OPA_HAVE_GCC_AND_POWERPC_ASM) # 102 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #if 0 /* expanded by -frewrite-includes */ #include "primitives/opa_gcc_ppc.h" #endif /* expanded by -frewrite-includes */ # 102 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/primitives/opa_gcc_ppc.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2008 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef OPA_GCC_PPC_H_INCLUDED #define OPA_GCC_PPC_H_INCLUDED /* these need to be aligned on an 8-byte boundary to work on a BG/P */ typedef struct { volatile int v OPA_ATTRIBUTE((aligned (8))); } OPA_int_t; typedef struct { void * volatile v OPA_ATTRIBUTE((aligned (8))); } OPA_ptr_t; #define OPA_INT_T_INITIALIZER(val_) { (val_) } #define OPA_PTR_T_INITIALIZER(val_) { (val_) } /* Aligned loads and stores are atomic. */ static _opa_inline int OPA_load_int(_opa_const OPA_int_t *ptr) { return ptr->v; } /* Aligned loads and stores are atomic. */ static _opa_inline void OPA_store_int(OPA_int_t *ptr, int val) { ptr->v = val; } /* Aligned loads and stores are atomic. */ static _opa_inline void *OPA_load_ptr(_opa_const OPA_ptr_t *ptr) { return ptr->v; } /* Aligned loads and stores are atomic. */ static _opa_inline void OPA_store_ptr(OPA_ptr_t *ptr, void *val) { ptr->v = val; } /* a useful link for PPC memory ordering issues: * http://www.rdrop.com/users/paulmck/scalability/paper/N2745r.2009.02.22a.html * * lwsync: orders L-L, S-S, L-S, but *not* S-L (i.e. gives x86-ish ordering) * eieio: orders S-S (but only for cacheable memory, not for MMIO) * sync: totally orders memops * isync: force all preceeding insns to appear complete before starting * subsequent insns, but w/o cumulativity (very confusing) */ /* helper macros */ #define OPA_ppc_lwsync_() __asm__ __volatile__ ( "lwsync" ::: "memory" ) #define OPA_ppc_hwsync_() __asm__ __volatile__ ( "sync" ::: "memory" ) #define OPA_ppc_eieio_() __asm__ __volatile__ ( "eieio" ::: "memory" ) #define OPA_write_barrier() OPA_ppc_eieio_() #define OPA_read_barrier() OPA_ppc_lwsync_() #define OPA_read_write_barrier() OPA_ppc_hwsync_() #define OPA_compiler_barrier() __asm__ __volatile__ ( "" ::: "memory" ) /* NOTE-PPC-1 we use lwsync, although I think we might be able to use * conditional-branch+isync in some cases (load_acquire?) once we understand it * better */ static _opa_inline int OPA_load_acquire_int(_opa_const OPA_int_t *ptr) { int tmp; tmp = ptr->v; OPA_ppc_lwsync_(); /* NOTE-PPC-1 */ return tmp; } static _opa_inline void OPA_store_release_int(OPA_int_t *ptr, int val) { OPA_ppc_lwsync_(); ptr->v = val; } static _opa_inline void *OPA_load_acquire_ptr(_opa_const OPA_ptr_t *ptr) { void *tmp; tmp = ptr->v; OPA_ppc_lwsync_(); /* NOTE-PPC-1 */ return tmp; } static _opa_inline void OPA_store_release_ptr(OPA_ptr_t *ptr, void *val) { OPA_ppc_lwsync_(); ptr->v = val; } /* load-link/store-conditional (LL/SC) primitives. We LL/SC implement these here, which are arch-specific, then use the generic implementations from opa_emulated.h */ static _opa_inline int OPA_LL_int(OPA_int_t *ptr) { int val; __asm__ __volatile__ ("lwarx %[val],0,%[ptr]" : [val] "=r" (val) : [ptr] "r" (&ptr->v) : "cc"); return val; } /* Returns non-zero if the store was successful, zero otherwise. */ static _opa_inline int OPA_SC_int(OPA_int_t *ptr, int val) { int ret = 1; /* init to non-zero, will be reset to 0 if SC was unsuccessful */ __asm__ __volatile__ ("stwcx. %[val],0,%[ptr];\n" "beq 1f;\n" "li %[ret], 0;\n" "1: ;\n" : [ret] "=r" (ret) : [ptr] "r" (&ptr->v), [val] "r" (val), "0" (ret) : "cc", "memory"); return ret; } /* Pointer versions of LL/SC. */ /* Set OPA_SS (Size Suffix) which is used to choose between lwarx/stwcx and * ldarx/stdcx when using 4 or 8 byte pointer operands */ #if OPA_SIZEOF_VOID_P == 4 #define OPA_SS "w" #elif OPA_SIZEOF_VOID_P == 8 # 128 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/primitives/opa_gcc_ppc.h" #define OPA_SS "d" #else # 130 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/primitives/opa_gcc_ppc.h" #error OPA_SIZEOF_VOID_P is not 4 or 8 #endif # 132 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/primitives/opa_gcc_ppc.h" static _opa_inline void *OPA_LL_ptr(OPA_ptr_t *ptr) { void *val; __asm__ __volatile__ ("l"OPA_SS"arx %[val],0,%[ptr]" : [val] "=r" (val) : [ptr] "r" (&ptr->v) : "cc"); return val; } /* Returns non-zero if the store was successful, zero otherwise. */ static _opa_inline int OPA_SC_ptr(OPA_ptr_t *ptr, void *val) { int ret = 1; /* init to non-zero, will be reset to 0 if SC was unsuccessful */ __asm__ __volatile__ ("st"OPA_SS"cx. %[val],0,%[ptr];\n" "beq 1f;\n" "li %[ret], 0;\n" "1: ;\n" : [ret] "=r" (ret) : [ptr] "r" (&ptr->v), [val] "r" (val), "0" (ret) : "cc", "memory"); return ret; } #undef OPA_SS /* necessary to enable LL/SC emulation support */ #define OPA_LL_SC_SUPPORTED 1 /* Implement all function using LL/SC */ #define OPA_add_int_by_llsc OPA_add_int #define OPA_incr_int_by_llsc OPA_incr_int #define OPA_decr_int_by_llsc OPA_decr_int #define OPA_decr_and_test_int_by_llsc OPA_decr_and_test_int #define OPA_fetch_and_add_int_by_llsc OPA_fetch_and_add_int #define OPA_fetch_and_decr_int_by_llsc OPA_fetch_and_decr_int #define OPA_fetch_and_incr_int_by_llsc OPA_fetch_and_incr_int #define OPA_cas_ptr_by_llsc OPA_cas_ptr #define OPA_cas_int_by_llsc OPA_cas_int #define OPA_swap_ptr_by_llsc OPA_swap_ptr #define OPA_swap_int_by_llsc OPA_swap_int #if 0 /* expanded by -frewrite-includes */ #include "opa_emulated.h" #endif /* expanded by -frewrite-includes */ # 178 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/primitives/opa_gcc_ppc.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/primitives/opa_emulated.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2008 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef OPA_EMULATED_H_INCLUDED #define OPA_EMULATED_H_INCLUDED /* Functions emulated using other atomics This header should be included at the bottom of any atomic primitives header that needs to implement an atomic op in terms of another atomic. */ /* Emulating using LL/SC */ #if defined(OPA_LL_SC_SUPPORTED) static _opa_inline int OPA_fetch_and_add_int_by_llsc(OPA_int_t *ptr, int val) { int prev; do { prev = OPA_LL_int(ptr); } while (!OPA_SC_int(ptr, prev + val)); return prev; } static _opa_inline void OPA_add_int_by_llsc(OPA_int_t *ptr, int val) { OPA_fetch_and_add_int_by_llsc(ptr, val); } static _opa_inline void OPA_incr_int_by_llsc(OPA_int_t *ptr) { OPA_add_int_by_llsc(ptr, 1); } static _opa_inline void OPA_decr_int_by_llsc(OPA_int_t *ptr) { OPA_add_int_by_llsc(ptr, -1); } static _opa_inline int OPA_fetch_and_decr_int_by_llsc(OPA_int_t *ptr) { return OPA_fetch_and_add_int_by_llsc(ptr, -1); } static _opa_inline int OPA_fetch_and_incr_int_by_llsc(OPA_int_t *ptr) { return OPA_fetch_and_add_int_by_llsc(ptr, 1); } static _opa_inline int OPA_decr_and_test_int_by_llsc(OPA_int_t *ptr) { int prev = OPA_fetch_and_decr_int_by_llsc(ptr); return prev == 1; } static _opa_inline void *OPA_cas_ptr_by_llsc(OPA_ptr_t *ptr, void *oldv, void *newv) { void *prev; do { prev = OPA_LL_ptr(ptr); } while (prev == oldv && !OPA_SC_ptr(ptr, newv)); return prev; } static _opa_inline int OPA_cas_int_by_llsc(OPA_int_t *ptr, int oldv, int newv) { int prev; do { prev = OPA_LL_int(ptr); } while (prev == oldv && !OPA_SC_int(ptr, newv)); return prev; } static _opa_inline void *OPA_swap_ptr_by_llsc(OPA_ptr_t *ptr, void *val) { void *prev; do { prev = OPA_LL_ptr(ptr); } while (!OPA_SC_ptr(ptr, val)); return prev; } static _opa_inline int OPA_swap_int_by_llsc(OPA_int_t *ptr, int val) { int prev; do { prev = OPA_LL_int(ptr); } while (!OPA_SC_int(ptr, val)); return prev; } #endif /* OPA_LL_SC_SUPPORTED */ # 99 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/primitives/opa_emulated.h" static _opa_inline int OPA_fetch_and_add_int_by_cas(OPA_int_t *ptr, int val) { int cmp; int prev = OPA_load_int(ptr); do { cmp = prev; prev = OPA_cas_int(ptr, cmp, prev + val); } while (prev != cmp); return prev; } static _opa_inline int OPA_fetch_and_incr_int_by_faa(OPA_int_t *ptr) { return OPA_fetch_and_add_int(ptr, 1); } static _opa_inline int OPA_fetch_and_decr_int_by_faa(OPA_int_t *ptr) { return OPA_fetch_and_add_int(ptr, -1); } static _opa_inline int OPA_decr_and_test_int_by_fad(OPA_int_t *ptr) { return OPA_fetch_and_decr_int(ptr) == 1; } static _opa_inline void OPA_add_int_by_faa(OPA_int_t *ptr, int val) { OPA_fetch_and_add_int(ptr, val); } static _opa_inline int OPA_incr_int_by_faa(OPA_int_t *ptr) { return OPA_fetch_and_add_int(ptr, 1); } static _opa_inline void OPA_incr_int_by_add(OPA_int_t *ptr) { OPA_add_int(ptr, 1); } static _opa_inline void OPA_incr_int_by_fai(OPA_int_t *ptr) { OPA_fetch_and_incr_int(ptr); } static _opa_inline int OPA_decr_int_by_faa(OPA_int_t *ptr) { return OPA_fetch_and_add_int(ptr, -1); } static _opa_inline void OPA_decr_int_by_add(OPA_int_t *ptr) { OPA_add_int(ptr, -1); } static _opa_inline void OPA_decr_int_by_fad(OPA_int_t *ptr) { OPA_fetch_and_decr_int(ptr); } /* Swap using CAS */ static _opa_inline void *OPA_swap_ptr_by_cas(OPA_ptr_t *ptr, void *val) { void *cmp; void *prev = OPA_load_ptr(ptr); do { cmp = prev; prev = OPA_cas_ptr(ptr, cmp, val); } while (prev != cmp); return prev; } static _opa_inline int OPA_swap_int_by_cas(OPA_int_t *ptr, int val) { int cmp; int prev = OPA_load_int(ptr); do { cmp = prev; prev = OPA_cas_int(ptr, cmp, val); } while (prev != cmp); return prev; } #endif /* OPA_EMULATED_H_INCLUDED */ # 193 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/primitives/opa_emulated.h" # 179 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/primitives/opa_gcc_ppc.h" 2 #endif /* OPA_GCC_PPC_H_INCLUDED */ # 181 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/primitives/opa_gcc_ppc.h" # 103 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" 2 #elif defined(OPA_HAVE_GCC_AND_ARM_ASM) # 104 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #if 0 /* expanded by -frewrite-includes */ #include "primitives/opa_gcc_arm.h" #endif /* expanded by -frewrite-includes */ # 104 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" # 105 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #elif defined(OPA_HAVE_GCC_X86_32_64) # 106 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #if 0 /* expanded by -frewrite-includes */ #include "primitives/opa_gcc_intel_32_64.h" #endif /* expanded by -frewrite-includes */ # 106 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" # 107 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #elif defined(OPA_HAVE_GCC_X86_32_64_P3) # 108 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #if 0 /* expanded by -frewrite-includes */ #include "primitives/opa_gcc_intel_32_64_p3.h" #endif /* expanded by -frewrite-includes */ # 108 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" # 109 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #elif defined(OPA_HAVE_GCC_AND_IA64_ASM) # 110 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #if 0 /* expanded by -frewrite-includes */ #include "primitives/opa_gcc_ia64.h" #endif /* expanded by -frewrite-includes */ # 110 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" # 111 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #elif defined(OPA_HAVE_GCC_AND_SICORTEX_ASM) # 112 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #if 0 /* expanded by -frewrite-includes */ #include "primitives/opa_gcc_sicortex.h" #endif /* expanded by -frewrite-includes */ # 112 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" # 113 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #elif defined(OPA_HAVE_GCC_INTRINSIC_ATOMICS) # 114 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #if 0 /* expanded by -frewrite-includes */ #include "primitives/opa_gcc_intrinsics.h" #endif /* expanded by -frewrite-includes */ # 114 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" # 115 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #elif defined(OPA_HAVE_SUN_ATOMIC_OPS) # 116 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #if 0 /* expanded by -frewrite-includes */ #include "primitives/opa_sun_atomic_ops.h" #endif /* expanded by -frewrite-includes */ # 116 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" # 117 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #elif defined(OPA_HAVE_NT_INTRINSICS) # 118 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #if 0 /* expanded by -frewrite-includes */ #include "primitives/opa_nt_intrinsics.h" #endif /* expanded by -frewrite-includes */ # 118 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" # 119 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #elif defined(OPA_USE_LOCK_BASED_PRIMITIVES) # 120 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #if 0 /* expanded by -frewrite-includes */ #include "primitives/opa_by_lock.h" #endif /* expanded by -frewrite-includes */ # 120 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" # 121 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #else # 122 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #error no primitives implementation specified #endif # 124 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" /* This routine is needed because the MPIU_THREAD_XXX_CS_{ENTER,EXIT} macros do not provide synchronization across multiple processes, only across multiple threads within a process. In order to safely emulate atomic operations on a shared memory region, we need a shared memory backed lock mechanism. This routine must be called by any subsystem that intends to use the atomic abstractions if the cpp directive OPA_USE_LOCK_BASED_PRIMITIVES is defined. It must be called exactly once by _all_ processes, not just a single leader. This function will initialize the contents of the lock variable if the caller specifies (isLeader==true). Note that multiple initialization is forbidden by several lock implementations, especially pthreads. Inputs: shm_lock - A pointer to an allocated piece of shared memory that can hold a mutex (e.g., pthread_mutex_t). This is not portable to non-pthreads systems at this time. isLeader - This boolean value should be set to true for exactly one thread/process of the group that calls this function. */ #if defined(OPA_HAVE_PTHREAD_H) #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 146 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" # 147 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" typedef pthread_mutex_t OPA_emulation_ipl_t; int OPA_Interprocess_lock_init(OPA_emulation_ipl_t *shm_lock, int isLeader); #endif # 150 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" /* FIXME This should probably be pushed down into the platform-specific headers. */ #if defined(OPA_HAVE_SCHED_YIELD) #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 154 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" # 155 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" # define OPA_busy_wait() sched_yield() #else # 157 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" # define OPA_busy_wait() do { } while (0) #endif # 159 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" #endif /* defined(OPA_PRIMITIVES_H_INCLUDED) */ # 161 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/openpa/src/opa_primitives.h" # 138 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpi.h" #endif /* expanded by -frewrite-includes */ # 138 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "./src/include/mpi.h" 1 /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ /* src/include/mpi.h. Generated from mpi.h.in by configure. */ #ifndef MPI_INCLUDED #define MPI_INCLUDED /* user include file for MPI programs */ /* Keep C++ compilers from getting confused */ #if defined(__cplusplus) extern "C" { #endif # 16 "./src/include/mpi.h" #define NO_TAGS_WITH_MODIFIERS 1 #undef MPICH_DEFINE_ATTR_TYPE_TYPES #if defined(__has_attribute) # if __has_attribute(pointer_with_type_tag) && \ __has_attribute(type_tag_for_datatype) && \ !defined(NO_TAGS_WITH_MODIFIERS) &&\ !defined(MPICH_NO_ATTR_TYPE_TAGS) # define MPICH_DEFINE_ATTR_TYPE_TYPES 1 # define MPICH_ATTR_POINTER_WITH_TYPE_TAG(buffer_idx, type_idx) __attribute__((pointer_with_type_tag(MPI,buffer_idx,type_idx))) # define MPICH_ATTR_TYPE_TAG(type) __attribute__((type_tag_for_datatype(MPI,type))) # define MPICH_ATTR_TYPE_TAG_LAYOUT_COMPATIBLE(type) __attribute__((type_tag_for_datatype(MPI,type,layout_compatible))) # define MPICH_ATTR_TYPE_TAG_MUST_BE_NULL() __attribute__((type_tag_for_datatype(MPI,void,must_be_null))) #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 29 "./src/include/mpi.h" # 30 "./src/include/mpi.h" # endif # 31 "./src/include/mpi.h" #endif # 32 "./src/include/mpi.h" #if !defined(MPICH_ATTR_POINTER_WITH_TYPE_TAG) # define MPICH_ATTR_POINTER_WITH_TYPE_TAG(buffer_idx, type_idx) # define MPICH_ATTR_TYPE_TAG(type) # define MPICH_ATTR_TYPE_TAG_LAYOUT_COMPATIBLE(type) # define MPICH_ATTR_TYPE_TAG_MUST_BE_NULL() #endif # 39 "./src/include/mpi.h" #if !defined(INT8_C) /* stdint.h was not included, see if we can get it */ # if defined(__cplusplus) # if __cplusplus >= 201103 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 44 "./src/include/mpi.h" # 45 "./src/include/mpi.h" # endif # 46 "./src/include/mpi.h" # endif # 47 "./src/include/mpi.h" #endif # 48 "./src/include/mpi.h" #if !defined(INT8_C) /* stdint.h was not included, see if we can get it */ # if defined(__STDC_VERSION__) # if __STDC_VERSION__ >= 199901 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 53 "./src/include/mpi.h" # 54 "./src/include/mpi.h" # endif # 55 "./src/include/mpi.h" # endif # 56 "./src/include/mpi.h" #endif # 57 "./src/include/mpi.h" #if defined(INT8_C) /* stdint.h was included, so we can annotate these types */ # define MPICH_ATTR_TYPE_TAG_STDINT(type) MPICH_ATTR_TYPE_TAG(type) #else # 62 "./src/include/mpi.h" # define MPICH_ATTR_TYPE_TAG_STDINT(type) #endif # 64 "./src/include/mpi.h" #ifdef __STDC_VERSION__ #if __STDC_VERSION__ >= 199901 # define MPICH_ATTR_TYPE_TAG_C99(type) MPICH_ATTR_TYPE_TAG(type) #else # 69 "./src/include/mpi.h" # define MPICH_ATTR_TYPE_TAG_C99(type) #endif # 71 "./src/include/mpi.h" #else # 72 "./src/include/mpi.h" # define MPICH_ATTR_TYPE_TAG_C99(type) #endif # 74 "./src/include/mpi.h" #if defined(__cplusplus) # define MPICH_ATTR_TYPE_TAG_CXX(type) MPICH_ATTR_TYPE_TAG(type) #else # 78 "./src/include/mpi.h" # define MPICH_ATTR_TYPE_TAG_CXX(type) #endif # 80 "./src/include/mpi.h" /* Define some null objects */ #define MPI_COMM_NULL ((MPI_Comm)0x04000000) #define MPI_OP_NULL ((MPI_Op)0x18000000) #define MPI_GROUP_NULL ((MPI_Group)0x08000000) #define MPI_DATATYPE_NULL ((MPI_Datatype)0x0c000000) #define MPI_REQUEST_NULL ((MPI_Request)0x2c000000) #define MPI_ERRHANDLER_NULL ((MPI_Errhandler)0x14000000) #define MPI_MESSAGE_NULL ((MPI_Message)0x2c000000) #define MPI_MESSAGE_NO_PROC ((MPI_Message)0x6c000000) /* Results of the compare operations. */ #define MPI_IDENT 0 #define MPI_CONGRUENT 1 #define MPI_SIMILAR 2 #define MPI_UNEQUAL 3 typedef int MPI_Datatype; #define MPI_CHAR ((MPI_Datatype)0x4c000101) #define MPI_SIGNED_CHAR ((MPI_Datatype)0x4c000118) #define MPI_UNSIGNED_CHAR ((MPI_Datatype)0x4c000102) #define MPI_BYTE ((MPI_Datatype)0x4c00010d) #define MPI_WCHAR ((MPI_Datatype)0x4c00040e) #define MPI_SHORT ((MPI_Datatype)0x4c000203) #define MPI_UNSIGNED_SHORT ((MPI_Datatype)0x4c000204) #define MPI_INT ((MPI_Datatype)0x4c000405) #define MPI_UNSIGNED ((MPI_Datatype)0x4c000406) #define MPI_LONG ((MPI_Datatype)0x4c000807) #define MPI_UNSIGNED_LONG ((MPI_Datatype)0x4c000808) #define MPI_FLOAT ((MPI_Datatype)0x4c00040a) #define MPI_DOUBLE ((MPI_Datatype)0x4c00080b) #define MPI_LONG_DOUBLE ((MPI_Datatype)0x4c00100c) #define MPI_LONG_LONG_INT ((MPI_Datatype)0x4c000809) #define MPI_UNSIGNED_LONG_LONG ((MPI_Datatype)0x4c000819) #define MPI_LONG_LONG MPI_LONG_LONG_INT #ifdef MPICH_DEFINE_ATTR_TYPE_TYPES static const MPI_Datatype mpich_mpi_char MPICH_ATTR_TYPE_TAG(char) = MPI_CHAR; static const MPI_Datatype mpich_mpi_signed_char MPICH_ATTR_TYPE_TAG(signed char) = MPI_SIGNED_CHAR; static const MPI_Datatype mpich_mpi_unsigned_char MPICH_ATTR_TYPE_TAG(unsigned char) = MPI_UNSIGNED_CHAR; /*static const MPI_Datatype mpich_mpi_byte MPICH_ATTR_TYPE_TAG(char) = MPI_BYTE;*/ static const MPI_Datatype mpich_mpi_wchar MPICH_ATTR_TYPE_TAG(wchar_t) = MPI_WCHAR; static const MPI_Datatype mpich_mpi_short MPICH_ATTR_TYPE_TAG(short) = MPI_SHORT; static const MPI_Datatype mpich_mpi_unsigned_short MPICH_ATTR_TYPE_TAG(unsigned short) = MPI_UNSIGNED_SHORT; static const MPI_Datatype mpich_mpi_int MPICH_ATTR_TYPE_TAG(int) = MPI_INT; static const MPI_Datatype mpich_mpi_unsigned MPICH_ATTR_TYPE_TAG(unsigned) = MPI_UNSIGNED; static const MPI_Datatype mpich_mpi_long MPICH_ATTR_TYPE_TAG(long) = MPI_LONG; static const MPI_Datatype mpich_mpi_unsigned_long MPICH_ATTR_TYPE_TAG(unsigned long) = MPI_UNSIGNED_LONG; static const MPI_Datatype mpich_mpi_float MPICH_ATTR_TYPE_TAG(float) = MPI_FLOAT; static const MPI_Datatype mpich_mpi_double MPICH_ATTR_TYPE_TAG(double) = MPI_DOUBLE; #if 0x4c00100c != 0x0c000000 static const MPI_Datatype mpich_mpi_long_double MPICH_ATTR_TYPE_TAG(long double) = MPI_LONG_DOUBLE; #endif # 134 "./src/include/mpi.h" static const MPI_Datatype mpich_mpi_long_long_int MPICH_ATTR_TYPE_TAG(long long int) = MPI_LONG_LONG_INT; static const MPI_Datatype mpich_mpi_unsigned_long_long MPICH_ATTR_TYPE_TAG(unsigned long long) = MPI_UNSIGNED_LONG_LONG; #endif # 137 "./src/include/mpi.h" #define MPI_PACKED ((MPI_Datatype)0x4c00010f) #define MPI_LB ((MPI_Datatype)0x4c000010) #define MPI_UB ((MPI_Datatype)0x4c000011) /* The layouts for the types MPI_DOUBLE_INT etc are simply struct { double var; int loc; } This is documented in the man pages on the various datatypes. */ #define MPI_FLOAT_INT ((MPI_Datatype)0x8c000000) #define MPI_DOUBLE_INT ((MPI_Datatype)0x8c000001) #define MPI_LONG_INT ((MPI_Datatype)0x8c000002) #define MPI_SHORT_INT ((MPI_Datatype)0x8c000003) #define MPI_2INT ((MPI_Datatype)0x4c000816) #define MPI_LONG_DOUBLE_INT ((MPI_Datatype)0x8c000004) #ifdef MPICH_DEFINE_ATTR_TYPE_TYPES struct mpich_struct_mpi_float_int { float f; int i; }; struct mpich_struct_mpi_double_int { double d; int i; }; struct mpich_struct_mpi_long_int { long l; int i; }; struct mpich_struct_mpi_short_int { short s; int i; }; struct mpich_struct_mpi_2int { int i1; int i2; }; #if 0x8c000004 != 0x0c000000 struct mpich_struct_mpi_long_double_int { long double ld; int i; }; #endif # 166 "./src/include/mpi.h" static const MPI_Datatype mpich_mpi_float_int MPICH_ATTR_TYPE_TAG_LAYOUT_COMPATIBLE(struct mpich_struct_mpi_float_int) = MPI_FLOAT_INT; static const MPI_Datatype mpich_mpi_double_int MPICH_ATTR_TYPE_TAG_LAYOUT_COMPATIBLE(struct mpich_struct_mpi_double_int) = MPI_DOUBLE_INT; static const MPI_Datatype mpich_mpi_long_int MPICH_ATTR_TYPE_TAG_LAYOUT_COMPATIBLE(struct mpich_struct_mpi_long_int) = MPI_LONG_INT; static const MPI_Datatype mpich_mpi_short_int MPICH_ATTR_TYPE_TAG_LAYOUT_COMPATIBLE(struct mpich_struct_mpi_short_int) = MPI_SHORT_INT; /* * The MPI_2INT line is commented out because currently Clang 3.3 flags * struct {int i1; int i2;} as different from int[2]. But actually these * two types are of the same layout. Clang gives a type mismatch warning * for a definitely correct code like the following: * int in[2], out[2]; * MPI_Reduce(in, out, 1, MPI_2INT, MPI_MAXLOC, 0, MPI_COMM_WORLD); * * So, we disable type checking for MPI_2INT until Clang fixes this bug. */ /* static const MPI_Datatype mpich_mpi_2int MPICH_ATTR_TYPE_TAG_LAYOUT_COMPATIBLE(struct mpich_struct_mpi_2int) = MPI_2INT */ #if 0x8c000004 != 0x0c000000 static const MPI_Datatype mpich_mpi_long_double_int MPICH_ATTR_TYPE_TAG_LAYOUT_COMPATIBLE(struct mpich_struct_mpi_long_double_int) = MPI_LONG_DOUBLE_INT; #endif # 189 "./src/include/mpi.h" #endif # 190 "./src/include/mpi.h" /* Fortran types */ #define MPI_COMPLEX ((MPI_Datatype)1275070494) #define MPI_DOUBLE_COMPLEX ((MPI_Datatype)1275072546) #define MPI_LOGICAL ((MPI_Datatype)1275069469) #define MPI_REAL ((MPI_Datatype)1275069468) #define MPI_DOUBLE_PRECISION ((MPI_Datatype)1275070495) #define MPI_INTEGER ((MPI_Datatype)1275069467) #define MPI_2INTEGER ((MPI_Datatype)1275070496) /* * MPI_2COMPLEX and MPI_2DOUBLE_COMPLEX were defined by accident in * MPI 1.0 and removed in MPI 1.1. * * This definition provides backward compatibility. These definitions * will be removed in a subsequent MPICH release */ #ifdef MPICH_DEFINE_2COMPLEX #define MPI_2COMPLEX ((MPI_Datatype)1275072548) #define MPI_2DOUBLE_COMPLEX ((MPI_Datatype)1275076645) #endif # 210 "./src/include/mpi.h" #define MPI_2REAL ((MPI_Datatype)1275070497) #define MPI_2DOUBLE_PRECISION ((MPI_Datatype)1275072547) #define MPI_CHARACTER ((MPI_Datatype)1275068698) /* Size-specific types (see MPI-2, 10.2.5) */ #define MPI_REAL4 ((MPI_Datatype)0x4c000427) #define MPI_REAL8 ((MPI_Datatype)0x4c000829) #define MPI_REAL16 ((MPI_Datatype)0x4c00102b) #define MPI_COMPLEX8 ((MPI_Datatype)0x4c000828) #define MPI_COMPLEX16 ((MPI_Datatype)0x4c00102a) #define MPI_COMPLEX32 ((MPI_Datatype)0x4c00202c) #define MPI_INTEGER1 ((MPI_Datatype)0x4c00012d) #define MPI_INTEGER2 ((MPI_Datatype)0x4c00022f) #define MPI_INTEGER4 ((MPI_Datatype)0x4c000430) #define MPI_INTEGER8 ((MPI_Datatype)0x4c000831) #define MPI_INTEGER16 ((MPI_Datatype)MPI_DATATYPE_NULL) /* C99 fixed-width datatypes */ #define MPI_INT8_T ((MPI_Datatype)0x4c000137) #define MPI_INT16_T ((MPI_Datatype)0x4c000238) #define MPI_INT32_T ((MPI_Datatype)0x4c000439) #define MPI_INT64_T ((MPI_Datatype)0x4c00083a) #define MPI_UINT8_T ((MPI_Datatype)0x4c00013b) #define MPI_UINT16_T ((MPI_Datatype)0x4c00023c) #define MPI_UINT32_T ((MPI_Datatype)0x4c00043d) #define MPI_UINT64_T ((MPI_Datatype)0x4c00083e) #ifdef MPICH_DEFINE_ATTR_TYPE_TYPES static const MPI_Datatype mpich_mpi_int8_t MPICH_ATTR_TYPE_TAG_STDINT(int8_t) = MPI_INT8_T; static const MPI_Datatype mpich_mpi_int16_t MPICH_ATTR_TYPE_TAG_STDINT(int16_t) = MPI_INT16_T; static const MPI_Datatype mpich_mpi_int32_t MPICH_ATTR_TYPE_TAG_STDINT(int32_t) = MPI_INT32_T; static const MPI_Datatype mpich_mpi_int64_t MPICH_ATTR_TYPE_TAG_STDINT(int64_t) = MPI_INT64_T; static const MPI_Datatype mpich_mpi_uint8_t MPICH_ATTR_TYPE_TAG_STDINT(uint8_t) = MPI_UINT8_T; static const MPI_Datatype mpich_mpi_uint16_t MPICH_ATTR_TYPE_TAG_STDINT(uint16_t) = MPI_UINT16_T; static const MPI_Datatype mpich_mpi_uint32_t MPICH_ATTR_TYPE_TAG_STDINT(uint32_t) = MPI_UINT32_T; static const MPI_Datatype mpich_mpi_uint64_t MPICH_ATTR_TYPE_TAG_STDINT(uint64_t) = MPI_UINT64_T; #endif # 247 "./src/include/mpi.h" /* other C99 types */ #define MPI_C_BOOL ((MPI_Datatype)0x4c00013f) #define MPI_C_FLOAT_COMPLEX ((MPI_Datatype)0x4c000840) #define MPI_C_COMPLEX MPI_C_FLOAT_COMPLEX #define MPI_C_DOUBLE_COMPLEX ((MPI_Datatype)0x4c001041) #define MPI_C_LONG_DOUBLE_COMPLEX ((MPI_Datatype)0x4c002042) #ifdef MPICH_DEFINE_ATTR_TYPE_TYPES static const MPI_Datatype mpich_mpi_c_bool MPICH_ATTR_TYPE_TAG_C99(_Bool) = MPI_C_BOOL; static const MPI_Datatype mpich_mpi_c_float_complex MPICH_ATTR_TYPE_TAG_C99(float _Complex) = MPI_C_FLOAT_COMPLEX; static const MPI_Datatype mpich_mpi_c_double_complex MPICH_ATTR_TYPE_TAG_C99(double _Complex) = MPI_C_DOUBLE_COMPLEX; #if 0x4c002042 != 0x0c000000 static const MPI_Datatype mpich_mpi_c_long_double_complex MPICH_ATTR_TYPE_TAG_C99(long double _Complex) = MPI_C_LONG_DOUBLE_COMPLEX; #endif # 262 "./src/include/mpi.h" #endif # 263 "./src/include/mpi.h" /* address/offset types */ #define MPI_AINT ((MPI_Datatype)0x4c000843) #define MPI_OFFSET ((MPI_Datatype)0x4c000844) #define MPI_COUNT ((MPI_Datatype)0x4c000845) /* MPI-3 C++ types */ #define MPI_CXX_BOOL ((MPI_Datatype)0x4c000133) #define MPI_CXX_FLOAT_COMPLEX ((MPI_Datatype)0x4c000834) #define MPI_CXX_DOUBLE_COMPLEX ((MPI_Datatype)0x4c001035) #define MPI_CXX_LONG_DOUBLE_COMPLEX ((MPI_Datatype)0x4c002036) /* typeclasses */ #define MPI_TYPECLASS_REAL 1 #define MPI_TYPECLASS_INTEGER 2 #define MPI_TYPECLASS_COMPLEX 3 /* Communicators */ typedef int MPI_Comm; #define MPI_COMM_WORLD ((MPI_Comm)0x44000000) #define MPI_COMM_SELF ((MPI_Comm)0x44000001) /* Groups */ typedef int MPI_Group; #define MPI_GROUP_EMPTY ((MPI_Group)0x48000000) /* RMA and Windows */ typedef int MPI_Win; #define MPI_WIN_NULL ((MPI_Win)0x20000000) /* File and IO */ /* This define lets ROMIO know that MPI_File has been defined */ #define MPI_FILE_DEFINED /* ROMIO uses a pointer for MPI_File objects. This must be the same definition as in src/mpi/romio/include/mpio.h.in */ typedef struct ADIOI_FileD *MPI_File; #define MPI_FILE_NULL ((MPI_File)0) /* Collective operations */ typedef int MPI_Op; #define MPI_MAX (MPI_Op)(0x58000001) #define MPI_MIN (MPI_Op)(0x58000002) #define MPI_SUM (MPI_Op)(0x58000003) #define MPI_PROD (MPI_Op)(0x58000004) #define MPI_LAND (MPI_Op)(0x58000005) #define MPI_BAND (MPI_Op)(0x58000006) #define MPI_LOR (MPI_Op)(0x58000007) #define MPI_BOR (MPI_Op)(0x58000008) #define MPI_LXOR (MPI_Op)(0x58000009) #define MPI_BXOR (MPI_Op)(0x5800000a) #define MPI_MINLOC (MPI_Op)(0x5800000b) #define MPI_MAXLOC (MPI_Op)(0x5800000c) #define MPI_REPLACE (MPI_Op)(0x5800000d) #define MPI_NO_OP (MPI_Op)(0x5800000e) /* Permanent key values */ /* C Versions (return pointer to value), Fortran Versions (return integer value). Handled directly by the attribute value routine DO NOT CHANGE THESE. The values encode: builtin kind (0x1 in bit 30-31) Keyval object (0x9 in bits 26-29) for communicator (0x1 in bits 22-25) Fortran versions of the attributes are formed by adding one to the C version. */ #define MPI_TAG_UB 0x64400001 #define MPI_HOST 0x64400003 #define MPI_IO 0x64400005 #define MPI_WTIME_IS_GLOBAL 0x64400007 #define MPI_UNIVERSE_SIZE 0x64400009 #define MPI_LASTUSEDCODE 0x6440000b #define MPI_APPNUM 0x6440000d /* In addition, there are 5 predefined window attributes that are defined for every window */ #define MPI_WIN_BASE 0x66000001 #define MPI_WIN_SIZE 0x66000003 #define MPI_WIN_DISP_UNIT 0x66000005 #define MPI_WIN_CREATE_FLAVOR 0x66000007 #define MPI_WIN_MODEL 0x66000009 #ifdef MPICH_DEFINE_ATTR_TYPE_TYPES static const MPI_Datatype mpich_mpi_datatype_null MPICH_ATTR_TYPE_TAG_MUST_BE_NULL() = MPI_DATATYPE_NULL; #endif # 351 "./src/include/mpi.h" /* These are only guesses; make sure you change them in mpif.h as well */ #define MPI_MAX_PROCESSOR_NAME 128 #define MPI_MAX_LIBRARY_VERSION_STRING 8192 #define MPI_MAX_ERROR_STRING 512 #define MPI_MAX_PORT_NAME 256 #define MPI_MAX_OBJECT_NAME 128 /* Pre-defined constants */ #define MPI_UNDEFINED (-32766) #define MPI_KEYVAL_INVALID 0x24000000 /* MPI-3 window flavors */ typedef enum MPIR_Win_flavor { MPI_WIN_FLAVOR_CREATE = 1, MPI_WIN_FLAVOR_ALLOCATE = 2, MPI_WIN_FLAVOR_DYNAMIC = 3, MPI_WIN_FLAVOR_SHARED = 4 } MPIR_Win_flavor_t; /* MPI-3 window consistency models */ typedef enum MPIR_Win_model { MPI_WIN_SEPARATE = 1, MPI_WIN_UNIFIED = 2 } MPIR_Win_model_t; /* Upper bound on the overhead in bsend for each message buffer */ #define MPI_BSEND_OVERHEAD 96 /* Topology types */ typedef enum MPIR_Topo_type { MPI_GRAPH=1, MPI_CART=2, MPI_DIST_GRAPH=3 } MPIR_Topo_type; #define MPI_BOTTOM (void *)0 extern int * const MPI_UNWEIGHTED; extern int * const MPI_WEIGHTS_EMPTY; #define MPI_PROC_NULL (-1) #define MPI_ANY_SOURCE (-2) #define MPI_ROOT (-3) #define MPI_ANY_TAG (-1) #define MPI_LOCK_EXCLUSIVE 234 #define MPI_LOCK_SHARED 235 /* C functions */ typedef void (MPI_Handler_function) ( MPI_Comm *, int *, ... ); typedef int (MPI_Comm_copy_attr_function)(MPI_Comm, int, void *, void *, void *, int *); typedef int (MPI_Comm_delete_attr_function)(MPI_Comm, int, void *, void *); typedef int (MPI_Type_copy_attr_function)(MPI_Datatype, int, void *, void *, void *, int *); typedef int (MPI_Type_delete_attr_function)(MPI_Datatype, int, void *, void *); typedef int (MPI_Win_copy_attr_function)(MPI_Win, int, void *, void *, void *, int *); typedef int (MPI_Win_delete_attr_function)(MPI_Win, int, void *, void *); /* added in MPI-2.2 */ typedef void (MPI_Comm_errhandler_function)(MPI_Comm *, int *, ...); typedef void (MPI_File_errhandler_function)(MPI_File *, int *, ...); typedef void (MPI_Win_errhandler_function)(MPI_Win *, int *, ...); /* names that were added in MPI-2.0 and deprecated in MPI-2.2 */ typedef MPI_Comm_errhandler_function MPI_Comm_errhandler_fn; typedef MPI_File_errhandler_function MPI_File_errhandler_fn; typedef MPI_Win_errhandler_function MPI_Win_errhandler_fn; /* Built in (0x1 in 30-31), errhandler (0x5 in bits 26-29, allkind (0 in 22-25), index in the low bits */ #define MPI_ERRORS_ARE_FATAL ((MPI_Errhandler)0x54000000) #define MPI_ERRORS_RETURN ((MPI_Errhandler)0x54000001) /* MPIR_ERRORS_THROW_EXCEPTIONS is not part of the MPI standard, it is here to facilitate the c++ binding which has MPI::ERRORS_THROW_EXCEPTIONS. Using the MPIR prefix preserved the MPI_ names for objects defined by the standard. */ #define MPIR_ERRORS_THROW_EXCEPTIONS ((MPI_Errhandler)0x54000002) typedef int MPI_Errhandler; /* Make the C names for the dup function mixed case. This is required for systems that use all uppercase names for Fortran externals. */ /* MPI 1 names */ #define MPI_NULL_COPY_FN ((MPI_Copy_function *)0) #define MPI_NULL_DELETE_FN ((MPI_Delete_function *)0) #define MPI_DUP_FN MPIR_Dup_fn /* MPI 2 names */ #define MPI_COMM_NULL_COPY_FN ((MPI_Comm_copy_attr_function*)0) #define MPI_COMM_NULL_DELETE_FN ((MPI_Comm_delete_attr_function*)0) #define MPI_COMM_DUP_FN ((MPI_Comm_copy_attr_function *)MPI_DUP_FN) #define MPI_WIN_NULL_COPY_FN ((MPI_Win_copy_attr_function*)0) #define MPI_WIN_NULL_DELETE_FN ((MPI_Win_delete_attr_function*)0) #define MPI_WIN_DUP_FN ((MPI_Win_copy_attr_function*)MPI_DUP_FN) #define MPI_TYPE_NULL_COPY_FN ((MPI_Type_copy_attr_function*)0) #define MPI_TYPE_NULL_DELETE_FN ((MPI_Type_delete_attr_function*)0) #define MPI_TYPE_DUP_FN ((MPI_Type_copy_attr_function*)MPI_DUP_FN) /* MPI request opjects */ typedef int MPI_Request; /* MPI message objects for Mprobe and related functions */ typedef int MPI_Message; /* User combination function */ typedef void (MPI_User_function) ( void *, void *, int *, MPI_Datatype * ); /* MPI Attribute copy and delete functions */ typedef int (MPI_Copy_function) ( MPI_Comm, int, void *, void *, void *, int * ); typedef int (MPI_Delete_function) ( MPI_Comm, int, void *, void * ); #define MPI_VERSION 3 #define MPI_SUBVERSION 1 #define MPICH_NAME 3 #define MPICH 1 #define MPICH_HAS_C2F 1 /* MPICH_VERSION is the version string. MPICH_NUMVERSION is the * numeric version that can be used in numeric comparisons. * * MPICH_VERSION uses the following format: * Version: [MAJ].[MIN].[REV][EXT][EXT_NUMBER] * Example: 1.0.7rc1 has * MAJ = 1 * MIN = 0 * REV = 7 * EXT = rc * EXT_NUMBER = 1 * * MPICH_NUMVERSION will convert EXT to a format number: * ALPHA (a) = 0 * BETA (b) = 1 * RC (rc) = 2 * PATCH (p) = 3 * Regular releases are treated as patch 0 * * Numeric version will have 1 digit for MAJ, 2 digits for MIN, 2 * digits for REV, 1 digit for EXT and 2 digits for EXT_NUMBER. So, * 1.0.7rc1 will have the numeric version 10007201. */ #define MPICH_VERSION "3.3a1" #define MPICH_NUMVERSION 30300001 #define MPICH_RELEASE_TYPE_ALPHA 0 #define MPICH_RELEASE_TYPE_BETA 1 #define MPICH_RELEASE_TYPE_RC 2 #define MPICH_RELEASE_TYPE_PATCH 3 #define MPICH_CALC_VERSION(MAJOR, MINOR, REVISION, TYPE, PATCH) \ (((MAJOR) * 10000000) + ((MINOR) * 100000) + ((REVISION) * 1000) + ((TYPE) * 100) + (PATCH)) /* for the datatype decoders */ enum MPIR_Combiner_enum { MPI_COMBINER_NAMED = 1, MPI_COMBINER_DUP = 2, MPI_COMBINER_CONTIGUOUS = 3, MPI_COMBINER_VECTOR = 4, MPI_COMBINER_HVECTOR_INTEGER = 5, MPI_COMBINER_HVECTOR = 6, MPI_COMBINER_INDEXED = 7, MPI_COMBINER_HINDEXED_INTEGER = 8, MPI_COMBINER_HINDEXED = 9, MPI_COMBINER_INDEXED_BLOCK = 10, MPI_COMBINER_STRUCT_INTEGER = 11, MPI_COMBINER_STRUCT = 12, MPI_COMBINER_SUBARRAY = 13, MPI_COMBINER_DARRAY = 14, MPI_COMBINER_F90_REAL = 15, MPI_COMBINER_F90_COMPLEX = 16, MPI_COMBINER_F90_INTEGER = 17, MPI_COMBINER_RESIZED = 18, MPI_COMBINER_HINDEXED_BLOCK = 19 }; /* for info */ typedef int MPI_Info; #define MPI_INFO_NULL ((MPI_Info)0x1c000000) #define MPI_INFO_ENV ((MPI_Info)0x5c000001) #define MPI_MAX_INFO_KEY 255 #define MPI_MAX_INFO_VAL 1024 /* for subarray and darray constructors */ #define MPI_ORDER_C 56 #define MPI_ORDER_FORTRAN 57 #define MPI_DISTRIBUTE_BLOCK 121 #define MPI_DISTRIBUTE_CYCLIC 122 #define MPI_DISTRIBUTE_NONE 123 #define MPI_DISTRIBUTE_DFLT_DARG -49767 #define MPI_IN_PLACE (void *) -1 /* asserts for one-sided communication */ #define MPI_MODE_NOCHECK 1024 #define MPI_MODE_NOSTORE 2048 #define MPI_MODE_NOPUT 4096 #define MPI_MODE_NOPRECEDE 8192 #define MPI_MODE_NOSUCCEED 16384 /* predefined types for MPI_Comm_split_type */ #define MPI_COMM_TYPE_SHARED 1 /* MPICH-specific types */ #define MPIX_COMM_TYPE_NEIGHBORHOOD 2 /* Definitions that are determined by configure. */ typedef long MPI_Aint; typedef int MPI_Fint; typedef long long MPI_Count; #ifdef MPICH_DEFINE_ATTR_TYPE_TYPES static const MPI_Datatype mpich_mpi_aint MPICH_ATTR_TYPE_TAG(MPI_Aint) = MPI_AINT; #endif # 559 "./src/include/mpi.h" /* FIXME: The following two definition are not defined by MPI and must not be included in the mpi.h file, as the MPI namespace is reserved to the MPI standard */ #define MPI_AINT_FMT_DEC_SPEC "%ld" #define MPI_AINT_FMT_HEX_SPEC "%lx" /* Let ROMIO know that MPI_Offset is already defined */ #define HAVE_MPI_OFFSET /* MPI_OFFSET_TYPEDEF is set in configure and is typedef $MPI_OFFSET MPI_Offset; where $MPI_OFFSET is the correct C type */ typedef long long MPI_Offset; #ifdef MPICH_DEFINE_ATTR_TYPE_TYPES static const MPI_Datatype mpich_mpi_offset MPICH_ATTR_TYPE_TAG(MPI_Offset) = MPI_OFFSET; #endif # 576 "./src/include/mpi.h" /* The order of these elements must match that in mpif.h, mpi_f08_types.f90, and mpi_c_interface_types.f90 */ typedef struct MPI_Status { int count_lo; int count_hi_and_cancelled; int MPI_SOURCE; int MPI_TAG; int MPI_ERROR; } MPI_Status; /* types for the MPI_T_ interface */ struct MPIR_T_enum_s; struct MPIR_T_cvar_handle_s; struct MPIR_T_pvar_handle_s; struct MPIR_T_pvar_session_s; typedef struct MPIR_T_enum_s * MPI_T_enum; typedef struct MPIR_T_cvar_handle_s * MPI_T_cvar_handle; typedef struct MPIR_T_pvar_handle_s * MPI_T_pvar_handle; typedef struct MPIR_T_pvar_session_s * MPI_T_pvar_session; /* extra const at front would be safer, but is incompatible with MPI_T_ prototypes */ extern struct MPIR_T_pvar_handle_s * const MPI_T_PVAR_ALL_HANDLES; #define MPI_T_ENUM_NULL ((MPI_T_enum)NULL) #define MPI_T_CVAR_HANDLE_NULL ((MPI_T_cvar_handle)NULL) #define MPI_T_PVAR_HANDLE_NULL ((MPI_T_pvar_handle)NULL) #define MPI_T_PVAR_SESSION_NULL ((MPI_T_pvar_session)NULL) /* the MPI_T_ interface requires that these VERBOSITY constants occur in this * relative order with increasing values */ typedef enum MPIR_T_verbosity_t { /* don't name-shift this if/when MPI_T_ is accepted, this is an MPICH-only * extension */ MPIX_T_VERBOSITY_INVALID = 0, /* arbitrarily shift values to aid debugging and reduce accidental errors */ MPI_T_VERBOSITY_USER_BASIC = 221, MPI_T_VERBOSITY_USER_DETAIL, MPI_T_VERBOSITY_USER_ALL, MPI_T_VERBOSITY_TUNER_BASIC, MPI_T_VERBOSITY_TUNER_DETAIL, MPI_T_VERBOSITY_TUNER_ALL, MPI_T_VERBOSITY_MPIDEV_BASIC, MPI_T_VERBOSITY_MPIDEV_DETAIL, MPI_T_VERBOSITY_MPIDEV_ALL } MPIR_T_verbosity_t; typedef enum MPIR_T_bind_t { /* don't name-shift this if/when MPI_T_ is accepted, this is an MPICH-only * extension */ MPIX_T_BIND_INVALID = 0, /* arbitrarily shift values to aid debugging and reduce accidental errors */ MPI_T_BIND_NO_OBJECT = 9700, MPI_T_BIND_MPI_COMM, MPI_T_BIND_MPI_DATATYPE, MPI_T_BIND_MPI_ERRHANDLER, MPI_T_BIND_MPI_FILE, MPI_T_BIND_MPI_GROUP, MPI_T_BIND_MPI_OP, MPI_T_BIND_MPI_REQUEST, MPI_T_BIND_MPI_WIN, MPI_T_BIND_MPI_MESSAGE, MPI_T_BIND_MPI_INFO } MPIR_T_bind_t; typedef enum MPIR_T_scope_t { /* don't name-shift this if/when MPI_T_ is accepted, this is an MPICH-only * extension */ MPIX_T_SCOPE_INVALID = 0, /* arbitrarily shift values to aid debugging and reduce accidental errors */ MPI_T_SCOPE_CONSTANT = 60438, MPI_T_SCOPE_READONLY, MPI_T_SCOPE_LOCAL, MPI_T_SCOPE_GROUP, MPI_T_SCOPE_GROUP_EQ, MPI_T_SCOPE_ALL, MPI_T_SCOPE_ALL_EQ } MPIR_T_scope_t; typedef enum MPIR_T_pvar_class_t { /* don't name-shift this if/when MPI_T_ is accepted, this is an MPICH-only * extension */ MPIX_T_PVAR_CLASS_INVALID = 0, /* arbitrarily shift values to aid debugging and reduce accidental errors */ MPIR_T_PVAR_CLASS_FIRST = 240, MPI_T_PVAR_CLASS_STATE = MPIR_T_PVAR_CLASS_FIRST, MPI_T_PVAR_CLASS_LEVEL, MPI_T_PVAR_CLASS_SIZE, MPI_T_PVAR_CLASS_PERCENTAGE, MPI_T_PVAR_CLASS_HIGHWATERMARK, MPI_T_PVAR_CLASS_LOWWATERMARK, MPI_T_PVAR_CLASS_COUNTER, MPI_T_PVAR_CLASS_AGGREGATE, MPI_T_PVAR_CLASS_TIMER, MPI_T_PVAR_CLASS_GENERIC, MPIR_T_PVAR_CLASS_LAST, MPIR_T_PVAR_CLASS_NUMBER = MPIR_T_PVAR_CLASS_LAST - MPIR_T_PVAR_CLASS_FIRST } MPIR_T_pvar_class_t; /* Handle conversion types/functions */ /* Programs that need to convert types used in MPICH should use these */ #define MPI_Comm_c2f(comm) (MPI_Fint)(comm) #define MPI_Comm_f2c(comm) (MPI_Comm)(comm) #define MPI_Type_c2f(datatype) (MPI_Fint)(datatype) #define MPI_Type_f2c(datatype) (MPI_Datatype)(datatype) #define MPI_Group_c2f(group) (MPI_Fint)(group) #define MPI_Group_f2c(group) (MPI_Group)(group) #define MPI_Info_c2f(info) (MPI_Fint)(info) #define MPI_Info_f2c(info) (MPI_Info)(info) #define MPI_Request_f2c(request) (MPI_Request)(request) #define MPI_Request_c2f(request) (MPI_Fint)(request) #define MPI_Op_c2f(op) (MPI_Fint)(op) #define MPI_Op_f2c(op) (MPI_Op)(op) #define MPI_Errhandler_c2f(errhandler) (MPI_Fint)(errhandler) #define MPI_Errhandler_f2c(errhandler) (MPI_Errhandler)(errhandler) #define MPI_Win_c2f(win) (MPI_Fint)(win) #define MPI_Win_f2c(win) (MPI_Win)(win) #define MPI_Message_c2f(msg) ((MPI_Fint)(msg)) #define MPI_Message_f2c(msg) ((MPI_Message)(msg)) /* PMPI versions of the handle transfer functions. See section 4.17 */ #define PMPI_Comm_c2f(comm) (MPI_Fint)(comm) #define PMPI_Comm_f2c(comm) (MPI_Comm)(comm) #define PMPI_Type_c2f(datatype) (MPI_Fint)(datatype) #define PMPI_Type_f2c(datatype) (MPI_Datatype)(datatype) #define PMPI_Group_c2f(group) (MPI_Fint)(group) #define PMPI_Group_f2c(group) (MPI_Group)(group) #define PMPI_Info_c2f(info) (MPI_Fint)(info) #define PMPI_Info_f2c(info) (MPI_Info)(info) #define PMPI_Request_f2c(request) (MPI_Request)(request) #define PMPI_Request_c2f(request) (MPI_Fint)(request) #define PMPI_Op_c2f(op) (MPI_Fint)(op) #define PMPI_Op_f2c(op) (MPI_Op)(op) #define PMPI_Errhandler_c2f(errhandler) (MPI_Fint)(errhandler) #define PMPI_Errhandler_f2c(errhandler) (MPI_Errhandler)(errhandler) #define PMPI_Win_c2f(win) (MPI_Fint)(win) #define PMPI_Win_f2c(win) (MPI_Win)(win) #define PMPI_Message_c2f(msg) ((MPI_Fint)(msg)) #define PMPI_Message_f2c(msg) ((MPI_Message)(msg)) #define MPI_STATUS_IGNORE (MPI_Status *)1 #define MPI_STATUSES_IGNORE (MPI_Status *)1 #define MPI_ERRCODES_IGNORE (int *)0 /* See 4.12.5 for MPI_F_STATUS(ES)_IGNORE */ #define MPIU_DLL_SPEC extern MPIU_DLL_SPEC MPI_Fint * MPI_F_STATUS_IGNORE; extern MPIU_DLL_SPEC MPI_Fint * MPI_F_STATUSES_IGNORE; /* The annotation MPIU_DLL_SPEC to the extern statements is used as a hook for systems that require C extensions to correctly construct DLLs, and is defined as an empty string otherwise */ /* The MPI standard requires that the ARGV_NULL values be the same as NULL (see 5.3.2) */ #define MPI_ARGV_NULL (char **)0 #define MPI_ARGVS_NULL (char ***)0 /* C type for MPI_STATUS in F08. The field order should match that in mpi_f08_types.f90, and mpi_c_interface_types.f90. */ typedef struct { MPI_Fint count_lo; MPI_Fint count_hi_and_cancelled; MPI_Fint MPI_SOURCE; MPI_Fint MPI_TAG; MPI_Fint MPI_ERROR; } MPI_F08_Status; extern MPI_F08_Status MPIR_F08_MPI_STATUS_IGNORE_OBJ; extern MPI_F08_Status MPIR_F08_MPI_STATUSES_IGNORE_OBJ[1]; extern int MPIR_F08_MPI_IN_PLACE; extern int MPIR_F08_MPI_BOTTOM; /* Pointers to above objects */ extern MPI_F08_Status *MPI_F08_STATUS_IGNORE; extern MPI_F08_Status *MPI_F08_STATUSES_IGNORE; /* For supported thread levels */ #define MPI_THREAD_SINGLE 0 #define MPI_THREAD_FUNNELED 1 #define MPI_THREAD_SERIALIZED 2 #define MPI_THREAD_MULTIPLE 3 /* Typedefs for generalized requests */ typedef int (MPI_Grequest_cancel_function)(void *, int); typedef int (MPI_Grequest_free_function)(void *); typedef int (MPI_Grequest_query_function)(void *, MPI_Status *); typedef int (MPIX_Grequest_poll_function)(void *, MPI_Status *); typedef int (MPIX_Grequest_wait_function)(int, void **, double, MPI_Status *); /* MPI's error classes */ #define MPI_SUCCESS 0 /* Successful return code */ /* Communication argument parameters */ #define MPI_ERR_BUFFER 1 /* Invalid buffer pointer */ #define MPI_ERR_COUNT 2 /* Invalid count argument */ #define MPI_ERR_TYPE 3 /* Invalid datatype argument */ #define MPI_ERR_TAG 4 /* Invalid tag argument */ #define MPI_ERR_COMM 5 /* Invalid communicator */ #define MPI_ERR_RANK 6 /* Invalid rank */ #define MPI_ERR_ROOT 7 /* Invalid root */ #define MPI_ERR_TRUNCATE 14 /* Message truncated on receive */ /* MPI Objects (other than COMM) */ #define MPI_ERR_GROUP 8 /* Invalid group */ #define MPI_ERR_OP 9 /* Invalid operation */ #define MPI_ERR_REQUEST 19 /* Invalid mpi_request handle */ /* Special topology argument parameters */ #define MPI_ERR_TOPOLOGY 10 /* Invalid topology */ #define MPI_ERR_DIMS 11 /* Invalid dimension argument */ /* All other arguments. This is a class with many kinds */ #define MPI_ERR_ARG 12 /* Invalid argument */ /* Other errors that are not simply an invalid argument */ #define MPI_ERR_OTHER 15 /* Other error; use Error_string */ #define MPI_ERR_UNKNOWN 13 /* Unknown error */ #define MPI_ERR_INTERN 16 /* Internal error code */ /* Multiple completion has three special error classes */ #define MPI_ERR_IN_STATUS 17 /* Look in status for error value */ #define MPI_ERR_PENDING 18 /* Pending request */ /* New MPI-2 Error classes */ #define MPI_ERR_ACCESS 20 /* */ #define MPI_ERR_AMODE 21 /* */ #define MPI_ERR_BAD_FILE 22 /* */ #define MPI_ERR_CONVERSION 23 /* */ #define MPI_ERR_DUP_DATAREP 24 /* */ #define MPI_ERR_FILE_EXISTS 25 /* */ #define MPI_ERR_FILE_IN_USE 26 /* */ #define MPI_ERR_FILE 27 /* */ #define MPI_ERR_IO 32 /* */ #define MPI_ERR_NO_SPACE 36 /* */ #define MPI_ERR_NO_SUCH_FILE 37 /* */ #define MPI_ERR_READ_ONLY 40 /* */ #define MPI_ERR_UNSUPPORTED_DATAREP 43 /* */ /* MPI_ERR_INFO is NOT defined in the MPI-2 standard. I believe that this is an oversight */ #define MPI_ERR_INFO 28 /* */ #define MPI_ERR_INFO_KEY 29 /* */ #define MPI_ERR_INFO_VALUE 30 /* */ #define MPI_ERR_INFO_NOKEY 31 /* */ #define MPI_ERR_NAME 33 /* */ #define MPI_ERR_NO_MEM 34 /* Alloc_mem could not allocate memory */ #define MPI_ERR_NOT_SAME 35 /* */ #define MPI_ERR_PORT 38 /* */ #define MPI_ERR_QUOTA 39 /* */ #define MPI_ERR_SERVICE 41 /* */ #define MPI_ERR_SPAWN 42 /* */ #define MPI_ERR_UNSUPPORTED_OPERATION 44 /* */ #define MPI_ERR_WIN 45 /* */ #define MPI_ERR_BASE 46 /* */ #define MPI_ERR_LOCKTYPE 47 /* */ #define MPI_ERR_KEYVAL 48 /* Erroneous attribute key */ #define MPI_ERR_RMA_CONFLICT 49 /* */ #define MPI_ERR_RMA_SYNC 50 /* */ #define MPI_ERR_SIZE 51 /* */ #define MPI_ERR_DISP 52 /* */ #define MPI_ERR_ASSERT 53 /* */ #define MPI_ERR_RMA_RANGE 55 /* */ #define MPI_ERR_RMA_ATTACH 56 /* */ #define MPI_ERR_RMA_SHARED 57 /* */ #define MPI_ERR_RMA_FLAVOR 58 /* */ /* Return codes for functions in the MPI Tool Information Interface */ #define MPI_T_ERR_MEMORY 59 /* Out of memory */ #define MPI_T_ERR_NOT_INITIALIZED 60 /* Interface not initialized */ #define MPI_T_ERR_CANNOT_INIT 61 /* Interface not in the state to be initialized */ #define MPI_T_ERR_INVALID_INDEX 62 /* The index is invalid or has been deleted */ #define MPI_T_ERR_INVALID_ITEM 63 /* Item index queried is out of range */ #define MPI_T_ERR_INVALID_HANDLE 64 /* The handle is invalid */ #define MPI_T_ERR_OUT_OF_HANDLES 65 /* No more handles available */ #define MPI_T_ERR_OUT_OF_SESSIONS 66 /* No more sessions available */ #define MPI_T_ERR_INVALID_SESSION 67 /* Session argument is not valid */ #define MPI_T_ERR_CVAR_SET_NOT_NOW 68 /* Cvar can't be set at this moment */ #define MPI_T_ERR_CVAR_SET_NEVER 69 /* Cvar can't be set until end of execution */ #define MPI_T_ERR_PVAR_NO_STARTSTOP 70 /* Pvar can't be started or stopped */ #define MPI_T_ERR_PVAR_NO_WRITE 71 /* Pvar can't be written or reset */ #define MPI_T_ERR_PVAR_NO_ATOMIC 72 /* Pvar can't be R/W atomically */ #define MPI_T_ERR_INVALID_NAME 73 /* Name doesn't match */ #define MPI_T_ERR_INVALID 74 /* Generic error code for MPI_T added in MPI-3.1 */ #define MPI_ERR_LASTCODE 0x3fffffff /* Last valid error code for a predefined error class */ #define MPICH_ERR_LAST_CLASS 74 /* It is also helpful to know the last valid class */ #define MPICH_ERR_FIRST_MPIX 100 /* Define a gap here because sock is * already using some of the values in this * range. All MPIX error codes will be * above this value to be ABI complaint. */ #define MPIX_ERR_PROC_FAILED MPICH_ERR_FIRST_MPIX+1 /* Process failure */ #define MPIX_ERR_PROC_FAILED_PENDING MPICH_ERR_FIRST_MPIX+2 /* A failure has caused this request * to be pending */ #define MPIX_ERR_REVOKED MPICH_ERR_FIRST_MPIX+3 /* The communciation object has been revoked */ #define MPICH_ERR_LAST_MPIX MPICH_ERR_FIRST_MPIX+3 /* End of MPI's error classes */ /* Function type defs */ typedef int (MPI_Datarep_conversion_function)(void *, MPI_Datatype, int, void *, MPI_Offset, void *); typedef int (MPI_Datarep_extent_function)(MPI_Datatype datatype, MPI_Aint *, void *); #define MPI_CONVERSION_FN_NULL ((MPI_Datarep_conversion_function *)0) /* For systems that may need to add additional definitions to support different declaration styles and options (e.g., different calling conventions or DLL import/export controls). */ /* --Insert Additional Definitions Here-- */ /* * Normally, we provide prototypes for all MPI routines. In a few weird * cases, we need to suppress the prototypes. */ #ifndef MPICH_SUPPRESS_PROTOTYPES /* We require that the C compiler support prototypes */ /* Begin Prototypes */ int MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Get_count(const MPI_Status *status, MPI_Datatype datatype, int *count); int MPI_Bsend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Rsend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Buffer_attach(void *buffer, int size); int MPI_Buffer_detach(void *buffer_addr, int *size); int MPI_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Ibsend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Issend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Irsend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Wait(MPI_Request *request, MPI_Status *status); int MPI_Test(MPI_Request *request, int *flag, MPI_Status *status); int MPI_Request_free(MPI_Request *request); int MPI_Waitany(int count, MPI_Request array_of_requests[], int *indx, MPI_Status *status); int MPI_Testany(int count, MPI_Request array_of_requests[], int *indx, int *flag, MPI_Status *status); int MPI_Waitall(int count, MPI_Request array_of_requests[], MPI_Status array_of_statuses[]); int MPI_Testall(int count, MPI_Request array_of_requests[], int *flag, MPI_Status array_of_statuses[]); int MPI_Waitsome(int incount, MPI_Request array_of_requests[], int *outcount, int array_of_indices[], MPI_Status array_of_statuses[]); int MPI_Testsome(int incount, MPI_Request array_of_requests[], int *outcount, int array_of_indices[], MPI_Status array_of_statuses[]); int MPI_Iprobe(int source, int tag, MPI_Comm comm, int *flag, MPI_Status *status); int MPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status); int MPI_Cancel(MPI_Request *request); int MPI_Test_cancelled(const MPI_Status *status, int *flag); int MPI_Send_init(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Bsend_init(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Ssend_init(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Rsend_init(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Recv_init(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Start(MPI_Request *request); int MPI_Startall(int count, MPI_Request array_of_requests[]); int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, int dest, int sendtag, void *recvbuf, int recvcount, MPI_Datatype recvtype, int source, int recvtag, MPI_Comm comm, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(6,8); int MPI_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype, int dest, int sendtag, int source, int recvtag, MPI_Comm comm, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Type_contiguous(int count, MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_vector(int count, int blocklength, int stride, MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_hvector(int count, int blocklength, MPI_Aint stride, MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_indexed(int count, const int *array_of_blocklengths, const int *array_of_displacements, MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_hindexed(int count, int *array_of_blocklengths, MPI_Aint *array_of_displacements, MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_struct(int count, int *array_of_blocklengths, MPI_Aint *array_of_displacements, MPI_Datatype *array_of_types, MPI_Datatype *newtype); int MPI_Address(void *location, MPI_Aint *address); int MPI_Type_extent(MPI_Datatype datatype, MPI_Aint *extent); int MPI_Type_size(MPI_Datatype datatype, int *size); int MPI_Type_lb(MPI_Datatype datatype, MPI_Aint *displacement); int MPI_Type_ub(MPI_Datatype datatype, MPI_Aint *displacement); int MPI_Type_commit(MPI_Datatype *datatype); int MPI_Type_free(MPI_Datatype *datatype); int MPI_Get_elements(const MPI_Status *status, MPI_Datatype datatype, int *count); int MPI_Pack(const void *inbuf, int incount, MPI_Datatype datatype, void *outbuf, int outsize, int *position, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Unpack(const void *inbuf, int insize, int *position, void *outbuf, int outcount, MPI_Datatype datatype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Pack_size(int incount, MPI_Datatype datatype, MPI_Comm comm, int *size); int MPI_Barrier(MPI_Comm comm); int MPI_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int MPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,7); int MPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int MPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Alltoallv(const void *sendbuf, const int *sendcounts, const int *sdispls, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *rdispls, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,8); int MPI_Alltoallw(const void *sendbuf, const int sendcounts[], const int sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const int rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm); int MPI_Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Op_create(MPI_User_function *user_fn, int commute, MPI_Op *op); int MPI_Op_free(MPI_Op *op); int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[], MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Scan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Group_size(MPI_Group group, int *size); int MPI_Group_rank(MPI_Group group, int *rank); int MPI_Group_translate_ranks(MPI_Group group1, int n, const int ranks1[], MPI_Group group2, int ranks2[]); int MPI_Group_compare(MPI_Group group1, MPI_Group group2, int *result); int MPI_Comm_group(MPI_Comm comm, MPI_Group *group); int MPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup); int MPI_Group_intersection(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup); int MPI_Group_difference(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup); int MPI_Group_incl(MPI_Group group, int n, const int ranks[], MPI_Group *newgroup); int MPI_Group_excl(MPI_Group group, int n, const int ranks[], MPI_Group *newgroup); int MPI_Group_range_incl(MPI_Group group, int n, int ranges[][3], MPI_Group *newgroup); int MPI_Group_range_excl(MPI_Group group, int n, int ranges[][3], MPI_Group *newgroup); int MPI_Group_free(MPI_Group *group); int MPI_Comm_size(MPI_Comm comm, int *size); int MPI_Comm_rank(MPI_Comm comm, int *rank); int MPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, int *result); int MPI_Comm_dup(MPI_Comm comm, MPI_Comm *newcomm); int MPI_Comm_dup_with_info(MPI_Comm comm, MPI_Info info, MPI_Comm *newcomm); int MPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm *newcomm); int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm); int MPI_Comm_free(MPI_Comm *comm); int MPI_Comm_test_inter(MPI_Comm comm, int *flag); int MPI_Comm_remote_size(MPI_Comm comm, int *size); int MPI_Comm_remote_group(MPI_Comm comm, MPI_Group *group); int MPI_Intercomm_create(MPI_Comm local_comm, int local_leader, MPI_Comm peer_comm, int remote_leader, int tag, MPI_Comm *newintercomm); int MPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm *newintracomm); int MPI_Keyval_create(MPI_Copy_function *copy_fn, MPI_Delete_function *delete_fn, int *keyval, void *extra_state); int MPI_Keyval_free(int *keyval); int MPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val); int MPI_Attr_get(MPI_Comm comm, int keyval, void *attribute_val, int *flag); int MPI_Attr_delete(MPI_Comm comm, int keyval); int MPI_Topo_test(MPI_Comm comm, int *status); int MPI_Cart_create(MPI_Comm comm_old, int ndims, const int dims[], const int periods[], int reorder, MPI_Comm *comm_cart); int MPI_Dims_create(int nnodes, int ndims, int dims[]); int MPI_Graph_create(MPI_Comm comm_old, int nnodes, const int indx[], const int edges[], int reorder, MPI_Comm *comm_graph); int MPI_Graphdims_get(MPI_Comm comm, int *nnodes, int *nedges); int MPI_Graph_get(MPI_Comm comm, int maxindex, int maxedges, int indx[], int edges[]); int MPI_Cartdim_get(MPI_Comm comm, int *ndims); int MPI_Cart_get(MPI_Comm comm, int maxdims, int dims[], int periods[], int coords[]); int MPI_Cart_rank(MPI_Comm comm, const int coords[], int *rank); int MPI_Cart_coords(MPI_Comm comm, int rank, int maxdims, int coords[]); int MPI_Graph_neighbors_count(MPI_Comm comm, int rank, int *nneighbors); int MPI_Graph_neighbors(MPI_Comm comm, int rank, int maxneighbors, int neighbors[]); int MPI_Cart_shift(MPI_Comm comm, int direction, int disp, int *rank_source, int *rank_dest); int MPI_Cart_sub(MPI_Comm comm, const int remain_dims[], MPI_Comm *newcomm); int MPI_Cart_map(MPI_Comm comm, int ndims, const int dims[], const int periods[], int *newrank); int MPI_Graph_map(MPI_Comm comm, int nnodes, const int indx[], const int edges[], int *newrank); int MPI_Get_processor_name(char *name, int *resultlen); int MPI_Get_version(int *version, int *subversion); int MPI_Get_library_version(char *version, int *resultlen); int MPI_Errhandler_create(MPI_Handler_function *function, MPI_Errhandler *errhandler); int MPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler); int MPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler *errhandler); int MPI_Errhandler_free(MPI_Errhandler *errhandler); int MPI_Error_string(int errorcode, char *string, int *resultlen); int MPI_Error_class(int errorcode, int *errorclass); double MPI_Wtime(void); double MPI_Wtick(void); int MPI_Init(int *argc, char ***argv); int MPI_Finalize(void); int MPI_Initialized(int *flag); int MPI_Abort(MPI_Comm comm, int errorcode); /* Note that we may need to define a @PCONTROL_LIST@ depending on whether stdargs are supported */ int MPI_Pcontrol(const int level, ...); int MPI_DUP_FN(MPI_Comm oldcomm, int keyval, void *extra_state, void *attribute_val_in, void *attribute_val_out, int *flag); /* Process Creation and Management */ int MPI_Close_port(const char *port_name); int MPI_Comm_accept(const char *port_name, MPI_Info info, int root, MPI_Comm comm, MPI_Comm *newcomm); int MPI_Comm_connect(const char *port_name, MPI_Info info, int root, MPI_Comm comm, MPI_Comm *newcomm); int MPI_Comm_disconnect(MPI_Comm *comm); int MPI_Comm_get_parent(MPI_Comm *parent); int MPI_Comm_join(int fd, MPI_Comm *intercomm); int MPI_Comm_spawn(const char *command, char *argv[], int maxprocs, MPI_Info info, int root, MPI_Comm comm, MPI_Comm *intercomm, int array_of_errcodes[]); int MPI_Comm_spawn_multiple(int count, char *array_of_commands[], char **array_of_argv[], const int array_of_maxprocs[], const MPI_Info array_of_info[], int root, MPI_Comm comm, MPI_Comm *intercomm, int array_of_errcodes[]); int MPI_Lookup_name(const char *service_name, MPI_Info info, char *port_name); int MPI_Open_port(MPI_Info info, char *port_name); int MPI_Publish_name(const char *service_name, MPI_Info info, const char *port_name); int MPI_Unpublish_name(const char *service_name, MPI_Info info, const char *port_name); int MPI_Comm_set_info(MPI_Comm comm, MPI_Info info); int MPI_Comm_get_info(MPI_Comm comm, MPI_Info *info); /* One-Sided Communications */ int MPI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Get(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Put(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Win_complete(MPI_Win win); int MPI_Win_create(void *base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, MPI_Win *win); int MPI_Win_fence(int assert, MPI_Win win); int MPI_Win_free(MPI_Win *win); int MPI_Win_get_group(MPI_Win win, MPI_Group *group); int MPI_Win_lock(int lock_type, int rank, int assert, MPI_Win win); int MPI_Win_post(MPI_Group group, int assert, MPI_Win win); int MPI_Win_start(MPI_Group group, int assert, MPI_Win win); int MPI_Win_test(MPI_Win win, int *flag); int MPI_Win_unlock(int rank, MPI_Win win); int MPI_Win_wait(MPI_Win win); /* MPI-3 One-Sided Communication Routines */ int MPI_Win_allocate(MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, void *baseptr, MPI_Win *win); int MPI_Win_allocate_shared(MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, void *baseptr, MPI_Win *win); int MPI_Win_shared_query(MPI_Win win, int rank, MPI_Aint *size, int *disp_unit, void *baseptr); int MPI_Win_create_dynamic(MPI_Info info, MPI_Comm comm, MPI_Win *win); int MPI_Win_attach(MPI_Win win, void *base, MPI_Aint size); int MPI_Win_detach(MPI_Win win, const void *base); int MPI_Win_get_info(MPI_Win win, MPI_Info *info_used); int MPI_Win_set_info(MPI_Win win, MPI_Info info); int MPI_Get_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Fetch_and_op(const void *origin_addr, void *result_addr, MPI_Datatype datatype, int target_rank, MPI_Aint target_disp, MPI_Op op, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Compare_and_swap(const void *origin_addr, const void *compare_addr, void *result_addr, MPI_Datatype datatype, int target_rank, MPI_Aint target_disp, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,4); int MPI_Rput(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Rget(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Raccumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Rget_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Win_lock_all(int assert, MPI_Win win); int MPI_Win_unlock_all(MPI_Win win); int MPI_Win_flush(int rank, MPI_Win win); int MPI_Win_flush_all(MPI_Win win); int MPI_Win_flush_local(int rank, MPI_Win win); int MPI_Win_flush_local_all(MPI_Win win); int MPI_Win_sync(MPI_Win win); /* External Interfaces */ int MPI_Add_error_class(int *errorclass); int MPI_Add_error_code(int errorclass, int *errorcode); int MPI_Add_error_string(int errorcode, const char *string); int MPI_Comm_call_errhandler(MPI_Comm comm, int errorcode); int MPI_Comm_create_keyval(MPI_Comm_copy_attr_function *comm_copy_attr_fn, MPI_Comm_delete_attr_function *comm_delete_attr_fn, int *comm_keyval, void *extra_state); int MPI_Comm_delete_attr(MPI_Comm comm, int comm_keyval); int MPI_Comm_free_keyval(int *comm_keyval); int MPI_Comm_get_attr(MPI_Comm comm, int comm_keyval, void *attribute_val, int *flag); int MPI_Comm_get_name(MPI_Comm comm, char *comm_name, int *resultlen); int MPI_Comm_set_attr(MPI_Comm comm, int comm_keyval, void *attribute_val); int MPI_Comm_set_name(MPI_Comm comm, const char *comm_name); int MPI_File_call_errhandler(MPI_File fh, int errorcode); int MPI_Grequest_complete(MPI_Request request); int MPI_Grequest_start(MPI_Grequest_query_function *query_fn, MPI_Grequest_free_function *free_fn, MPI_Grequest_cancel_function *cancel_fn, void *extra_state, MPI_Request *request); int MPI_Init_thread(int *argc, char ***argv, int required, int *provided); int MPI_Is_thread_main(int *flag); int MPI_Query_thread(int *provided); int MPI_Status_set_cancelled(MPI_Status *status, int flag); int MPI_Status_set_elements(MPI_Status *status, MPI_Datatype datatype, int count); int MPI_Type_create_keyval(MPI_Type_copy_attr_function *type_copy_attr_fn, MPI_Type_delete_attr_function *type_delete_attr_fn, int *type_keyval, void *extra_state); int MPI_Type_delete_attr(MPI_Datatype datatype, int type_keyval); int MPI_Type_dup(MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_free_keyval(int *type_keyval); int MPI_Type_get_attr(MPI_Datatype datatype, int type_keyval, void *attribute_val, int *flag); int MPI_Type_get_contents(MPI_Datatype datatype, int max_integers, int max_addresses, int max_datatypes, int array_of_integers[], MPI_Aint array_of_addresses[], MPI_Datatype array_of_datatypes[]); int MPI_Type_get_envelope(MPI_Datatype datatype, int *num_integers, int *num_addresses, int *num_datatypes, int *combiner); int MPI_Type_get_name(MPI_Datatype datatype, char *type_name, int *resultlen); int MPI_Type_set_attr(MPI_Datatype datatype, int type_keyval, void *attribute_val); int MPI_Type_set_name(MPI_Datatype datatype, const char *type_name); int MPI_Type_match_size(int typeclass, int size, MPI_Datatype *datatype); int MPI_Win_call_errhandler(MPI_Win win, int errorcode); int MPI_Win_create_keyval(MPI_Win_copy_attr_function *win_copy_attr_fn, MPI_Win_delete_attr_function *win_delete_attr_fn, int *win_keyval, void *extra_state); int MPI_Win_delete_attr(MPI_Win win, int win_keyval); int MPI_Win_free_keyval(int *win_keyval); int MPI_Win_get_attr(MPI_Win win, int win_keyval, void *attribute_val, int *flag); int MPI_Win_get_name(MPI_Win win, char *win_name, int *resultlen); int MPI_Win_set_attr(MPI_Win win, int win_keyval, void *attribute_val); int MPI_Win_set_name(MPI_Win win, const char *win_name); int MPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr); int MPI_Comm_create_errhandler(MPI_Comm_errhandler_function *comm_errhandler_fn, MPI_Errhandler *errhandler); int MPI_Comm_get_errhandler(MPI_Comm comm, MPI_Errhandler *errhandler); int MPI_Comm_set_errhandler(MPI_Comm comm, MPI_Errhandler errhandler); int MPI_File_create_errhandler(MPI_File_errhandler_function *file_errhandler_fn, MPI_Errhandler *errhandler); int MPI_File_get_errhandler(MPI_File file, MPI_Errhandler *errhandler); int MPI_File_set_errhandler(MPI_File file, MPI_Errhandler errhandler); int MPI_Finalized(int *flag); int MPI_Free_mem(void *base); int MPI_Get_address(const void *location, MPI_Aint *address); int MPI_Info_create(MPI_Info *info); int MPI_Info_delete(MPI_Info info, const char *key); int MPI_Info_dup(MPI_Info info, MPI_Info *newinfo); int MPI_Info_free(MPI_Info *info); int MPI_Info_get(MPI_Info info, const char *key, int valuelen, char *value, int *flag); int MPI_Info_get_nkeys(MPI_Info info, int *nkeys); int MPI_Info_get_nthkey(MPI_Info info, int n, char *key); int MPI_Info_get_valuelen(MPI_Info info, const char *key, int *valuelen, int *flag); int MPI_Info_set(MPI_Info info, const char *key, const char *value); int MPI_Pack_external(const char datarep[], const void *inbuf, int incount, MPI_Datatype datatype, void *outbuf, MPI_Aint outsize, MPI_Aint *position) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Pack_external_size(const char datarep[], int incount, MPI_Datatype datatype, MPI_Aint *size); int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status); int MPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status); int MPI_Status_f2c(const MPI_Fint *f_status, MPI_Status *c_status); int MPI_Type_create_darray(int size, int rank, int ndims, const int array_of_gsizes[], const int array_of_distribs[], const int array_of_dargs[], const int array_of_psizes[], int order, MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_create_hindexed(int count, const int array_of_blocklengths[], const MPI_Aint array_of_displacements[], MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_create_hvector(int count, int blocklength, MPI_Aint stride, MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_create_indexed_block(int count, int blocklength, const int array_of_displacements[], MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_create_hindexed_block(int count, int blocklength, const MPI_Aint array_of_displacements[], MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_create_resized(MPI_Datatype oldtype, MPI_Aint lb, MPI_Aint extent, MPI_Datatype *newtype); int MPI_Type_create_struct(int count, const int array_of_blocklengths[], const MPI_Aint array_of_displacements[], const MPI_Datatype array_of_types[], MPI_Datatype *newtype); int MPI_Type_create_subarray(int ndims, const int array_of_sizes[], const int array_of_subsizes[], const int array_of_starts[], int order, MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint *lb, MPI_Aint *extent); int MPI_Type_get_true_extent(MPI_Datatype datatype, MPI_Aint *true_lb, MPI_Aint *true_extent); int MPI_Unpack_external(const char datarep[], const void *inbuf, MPI_Aint insize, MPI_Aint *position, void *outbuf, int outcount, MPI_Datatype datatype) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,7); int MPI_Win_create_errhandler(MPI_Win_errhandler_function *win_errhandler_fn, MPI_Errhandler *errhandler); int MPI_Win_get_errhandler(MPI_Win win, MPI_Errhandler *errhandler); int MPI_Win_set_errhandler(MPI_Win win, MPI_Errhandler errhandler); /* Fortran 90-related functions. These routines are available only if Fortran 90 support is enabled */ int MPI_Type_create_f90_integer(int range, MPI_Datatype *newtype); int MPI_Type_create_f90_real(int precision, int range, MPI_Datatype *newtype); int MPI_Type_create_f90_complex(int precision, int range, MPI_Datatype *newtype); int MPI_Reduce_local(const void *inbuf, void *inoutbuf, int count, MPI_Datatype datatype, MPI_Op op) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Op_commutative(MPI_Op op, int *commute); int MPI_Reduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Dist_graph_create_adjacent(MPI_Comm comm_old, int indegree, const int sources[], const int sourceweights[], int outdegree, const int destinations[], const int destweights[], MPI_Info info, int reorder, MPI_Comm *comm_dist_graph); int MPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[], const int degrees[], const int destinations[], const int weights[], MPI_Info info, int reorder, MPI_Comm *comm_dist_graph); int MPI_Dist_graph_neighbors_count(MPI_Comm comm, int *indegree, int *outdegree, int *weighted); int MPI_Dist_graph_neighbors(MPI_Comm comm, int maxindegree, int sources[], int sourceweights[], int maxoutdegree, int destinations[], int destweights[]); /* Matched probe functionality */ int MPI_Improbe(int source, int tag, MPI_Comm comm, int *flag, MPI_Message *message, MPI_Status *status); int MPI_Imrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Mprobe(int source, int tag, MPI_Comm comm, MPI_Message *message, MPI_Status *status); int MPI_Mrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); /* Nonblocking collectives */ int MPI_Comm_idup(MPI_Comm comm, MPI_Comm *newcomm, MPI_Request *request); int MPI_Ibarrier(MPI_Comm comm, MPI_Request *request); int MPI_Ibcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int MPI_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Iscatterv(const void *sendbuf, const int sendcounts[], const int displs[], MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,7); int MPI_Iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int MPI_Ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Ialltoallv(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,8); int MPI_Ialltoallw(const void *sendbuf, const int sendcounts[], const int sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const int rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm, MPI_Request *request); int MPI_Ireduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Iallreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Ireduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[], MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Iscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Iexscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); /* Neighborhood collectives */ int MPI_Ineighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Ineighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int MPI_Ineighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,8); int MPI_Ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm, MPI_Request *request); int MPI_Neighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Neighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int MPI_Neighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Neighbor_alltoallv(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,8); int MPI_Neighbor_alltoallw(const void *sendbuf, const int sendcounts[], const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm); /* Shared memory */ int MPI_Comm_split_type(MPI_Comm comm, int split_type, int key, MPI_Info info, MPI_Comm *newcomm); /* MPI-3 "large count" routines */ int MPI_Get_elements_x(const MPI_Status *status, MPI_Datatype datatype, MPI_Count *count); int MPI_Status_set_elements_x(MPI_Status *status, MPI_Datatype datatype, MPI_Count count); int MPI_Type_get_extent_x(MPI_Datatype datatype, MPI_Count *lb, MPI_Count *extent); int MPI_Type_get_true_extent_x(MPI_Datatype datatype, MPI_Count *lb, MPI_Count *extent); int MPI_Type_size_x(MPI_Datatype datatype, MPI_Count *size); /* Noncollective communicator creation */ int MPI_Comm_create_group(MPI_Comm comm, MPI_Group group, int tag, MPI_Comm *newcomm); /* MPI_Aint addressing arithmetic */ MPI_Aint MPI_Aint_add(MPI_Aint base, MPI_Aint disp); MPI_Aint MPI_Aint_diff(MPI_Aint addr1, MPI_Aint addr2); /* MPI_T interface */ /* The MPI_T routines are available only in C bindings - tell tools that they can skip these prototypes */ /* Begin Skip Prototypes */ int MPI_T_init_thread(int required, int *provided); int MPI_T_finalize(void); int MPI_T_enum_get_info(MPI_T_enum enumtype, int *num, char *name, int *name_len); int MPI_T_enum_get_item(MPI_T_enum enumtype, int indx, int *value, char *name, int *name_len); int MPI_T_cvar_get_num(int *num_cvar); int MPI_T_cvar_get_info(int cvar_index, char *name, int *name_len, int *verbosity, MPI_Datatype *datatype, MPI_T_enum *enumtype, char *desc, int *desc_len, int *binding, int *scope); int MPI_T_cvar_handle_alloc(int cvar_index, void *obj_handle, MPI_T_cvar_handle *handle, int *count); int MPI_T_cvar_handle_free(MPI_T_cvar_handle *handle); int MPI_T_cvar_read(MPI_T_cvar_handle handle, void *buf); int MPI_T_cvar_write(MPI_T_cvar_handle handle, const void *buf); int MPI_T_pvar_get_num(int *num_pvar); int MPI_T_pvar_get_info(int pvar_index, char *name, int *name_len, int *verbosity, int *var_class, MPI_Datatype *datatype, MPI_T_enum *enumtype, char *desc, int *desc_len, int *binding, int *readonly, int *continuous, int *atomic); int MPI_T_pvar_session_create(MPI_T_pvar_session *session); int MPI_T_pvar_session_free(MPI_T_pvar_session *session); int MPI_T_pvar_handle_alloc(MPI_T_pvar_session session, int pvar_index, void *obj_handle, MPI_T_pvar_handle *handle, int *count); int MPI_T_pvar_handle_free(MPI_T_pvar_session session, MPI_T_pvar_handle *handle); int MPI_T_pvar_start(MPI_T_pvar_session session, MPI_T_pvar_handle handle); int MPI_T_pvar_stop(MPI_T_pvar_session session, MPI_T_pvar_handle handle); int MPI_T_pvar_read(MPI_T_pvar_session session, MPI_T_pvar_handle handle, void *buf); int MPI_T_pvar_write(MPI_T_pvar_session session, MPI_T_pvar_handle handle, const void *buf); int MPI_T_pvar_reset(MPI_T_pvar_session session, MPI_T_pvar_handle handle); int MPI_T_pvar_readreset(MPI_T_pvar_session session, MPI_T_pvar_handle handle, void *buf); int MPI_T_category_get_num(int *num_cat); int MPI_T_category_get_info(int cat_index, char *name, int *name_len, char *desc, int *desc_len, int *num_cvars, int *num_pvars, int *num_categories); int MPI_T_category_get_cvars(int cat_index, int len, int indices[]); int MPI_T_category_get_pvars(int cat_index, int len, int indices[]); int MPI_T_category_get_categories(int cat_index, int len, int indices[]); int MPI_T_category_changed(int *stamp); int MPI_T_cvar_get_index(const char *name, int *cvar_index); int MPI_T_pvar_get_index(const char *name, int var_class, int *pvar_index); int MPI_T_category_get_index(const char *name, int *cat_index); /* End Skip Prototypes */ /* Non-standard but public extensions to MPI */ /* Fault Tolerance Extensions */ int MPIX_Comm_failure_ack(MPI_Comm comm); int MPIX_Comm_failure_get_acked(MPI_Comm comm, MPI_Group *failedgrp); int MPIX_Comm_revoke(MPI_Comm comm); int MPIX_Comm_shrink(MPI_Comm comm, MPI_Comm *newcomm); int MPIX_Comm_agree(MPI_Comm comm, int *flag); /* End Prototypes */ #endif /* MPICH_SUPPRESS_PROTOTYPES */ # 1559 "./src/include/mpi.h" /* Here are the bindings of the profiling routines */ #if !defined(MPI_BUILD_PROFILING) int PMPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Get_count(const MPI_Status *status, MPI_Datatype datatype, int *count); int PMPI_Bsend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Rsend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Buffer_attach(void *buffer, int size); int PMPI_Buffer_detach(void *buffer_addr, int *size); int PMPI_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Ibsend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Issend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Irsend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Irecv(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Wait(MPI_Request *request, MPI_Status *status); int PMPI_Test(MPI_Request *request, int *flag, MPI_Status *status); int PMPI_Request_free(MPI_Request *request); int PMPI_Waitany(int count, MPI_Request array_of_requests[], int *indx, MPI_Status *status); int PMPI_Testany(int count, MPI_Request array_of_requests[], int *indx, int *flag, MPI_Status *status); int PMPI_Waitall(int count, MPI_Request array_of_requests[], MPI_Status array_of_statuses[]); int PMPI_Testall(int count, MPI_Request array_of_requests[], int *flag, MPI_Status array_of_statuses[]); int PMPI_Waitsome(int incount, MPI_Request array_of_requests[], int *outcount, int array_of_indices[], MPI_Status array_of_statuses[]); int PMPI_Testsome(int incount, MPI_Request array_of_requests[], int *outcount, int array_of_indices[], MPI_Status array_of_statuses[]); int PMPI_Iprobe(int source, int tag, MPI_Comm comm, int *flag, MPI_Status *status); int PMPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status); int PMPI_Cancel(MPI_Request *request); int PMPI_Test_cancelled(const MPI_Status *status, int *flag); int PMPI_Send_init(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Bsend_init(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Ssend_init(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Rsend_init(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Recv_init(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Start(MPI_Request *request); int PMPI_Startall(int count, MPI_Request array_of_requests[]); int PMPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, int dest, int sendtag, void *recvbuf, int recvcount, MPI_Datatype recvtype, int source, int recvtag, MPI_Comm comm, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(6,8); int PMPI_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype, int dest, int sendtag, int source, int recvtag, MPI_Comm comm, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Type_contiguous(int count, MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_vector(int count, int blocklength, int stride, MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_hvector(int count, int blocklength, MPI_Aint stride, MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_indexed(int count, const int *array_of_blocklengths, const int *array_of_displacements, MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_hindexed(int count, int *array_of_blocklengths, MPI_Aint *array_of_displacements, MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_struct(int count, int *array_of_blocklengths, MPI_Aint *array_of_displacements, MPI_Datatype *array_of_types, MPI_Datatype *newtype); int PMPI_Address(void *location, MPI_Aint *address); int PMPI_Type_extent(MPI_Datatype datatype, MPI_Aint *extent); int PMPI_Type_size(MPI_Datatype datatype, int *size); int PMPI_Type_lb(MPI_Datatype datatype, MPI_Aint *displacement); int PMPI_Type_ub(MPI_Datatype datatype, MPI_Aint *displacement); int PMPI_Type_commit(MPI_Datatype *datatype); int PMPI_Type_free(MPI_Datatype *datatype); int PMPI_Get_elements(const MPI_Status *status, MPI_Datatype datatype, int *count); int PMPI_Pack(const void *inbuf, int incount, MPI_Datatype datatype, void *outbuf, int outsize, int *position, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Unpack(const void *inbuf, int insize, int *position, void *outbuf, int outcount, MPI_Datatype datatype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Pack_size(int incount, MPI_Datatype datatype, MPI_Comm comm, int *size); int PMPI_Barrier(MPI_Comm comm); int PMPI_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int PMPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,7); int PMPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int PMPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Alltoallv(const void *sendbuf, const int *sendcounts, const int *sdispls, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *rdispls, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,8); int PMPI_Alltoallw(const void *sendbuf, const int sendcounts[], const int sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const int rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm); int PMPI_Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Op_create(MPI_User_function *user_fn, int commute, MPI_Op *op); int PMPI_Op_free(MPI_Op *op); int PMPI_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[], MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Scan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Group_size(MPI_Group group, int *size); int PMPI_Group_rank(MPI_Group group, int *rank); int PMPI_Group_translate_ranks(MPI_Group group1, int n, const int ranks1[], MPI_Group group2, int ranks2[]); int PMPI_Group_compare(MPI_Group group1, MPI_Group group2, int *result); int PMPI_Comm_group(MPI_Comm comm, MPI_Group *group); int PMPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup); int PMPI_Group_intersection(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup); int PMPI_Group_difference(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup); int PMPI_Group_incl(MPI_Group group, int n, const int ranks[], MPI_Group *newgroup); int PMPI_Group_excl(MPI_Group group, int n, const int ranks[], MPI_Group *newgroup); int PMPI_Group_range_incl(MPI_Group group, int n, int ranges[][3], MPI_Group *newgroup); int PMPI_Group_range_excl(MPI_Group group, int n, int ranges[][3], MPI_Group *newgroup); int PMPI_Group_free(MPI_Group *group); int PMPI_Comm_size(MPI_Comm comm, int *size); int PMPI_Comm_rank(MPI_Comm comm, int *rank); int PMPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, int *result); int PMPI_Comm_dup(MPI_Comm comm, MPI_Comm *newcomm); int PMPI_Comm_dup_with_info(MPI_Comm comm, MPI_Info info, MPI_Comm *newcomm); int PMPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm *newcomm); int PMPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm); int PMPI_Comm_free(MPI_Comm *comm); int PMPI_Comm_test_inter(MPI_Comm comm, int *flag); int PMPI_Comm_remote_size(MPI_Comm comm, int *size); int PMPI_Comm_remote_group(MPI_Comm comm, MPI_Group *group); int PMPI_Intercomm_create(MPI_Comm local_comm, int local_leader, MPI_Comm peer_comm, int remote_leader, int tag, MPI_Comm *newintercomm); int PMPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm *newintracomm); int PMPI_Keyval_create(MPI_Copy_function *copy_fn, MPI_Delete_function *delete_fn, int *keyval, void *extra_state); int PMPI_Keyval_free(int *keyval); int PMPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val); int PMPI_Attr_get(MPI_Comm comm, int keyval, void *attribute_val, int *flag); int PMPI_Attr_delete(MPI_Comm comm, int keyval); int PMPI_Topo_test(MPI_Comm comm, int *status); int PMPI_Cart_create(MPI_Comm comm_old, int ndims, const int dims[], const int periods[], int reorder, MPI_Comm *comm_cart); int PMPI_Dims_create(int nnodes, int ndims, int dims[]); int PMPI_Graph_create(MPI_Comm comm_old, int nnodes, const int indx[], const int edges[], int reorder, MPI_Comm *comm_graph); int PMPI_Graphdims_get(MPI_Comm comm, int *nnodes, int *nedges); int PMPI_Graph_get(MPI_Comm comm, int maxindex, int maxedges, int indx[], int edges[]); int PMPI_Cartdim_get(MPI_Comm comm, int *ndims); int PMPI_Cart_get(MPI_Comm comm, int maxdims, int dims[], int periods[], int coords[]); int PMPI_Cart_rank(MPI_Comm comm, const int coords[], int *rank); int PMPI_Cart_coords(MPI_Comm comm, int rank, int maxdims, int coords[]); int PMPI_Graph_neighbors_count(MPI_Comm comm, int rank, int *nneighbors); int PMPI_Graph_neighbors(MPI_Comm comm, int rank, int maxneighbors, int neighbors[]); int PMPI_Cart_shift(MPI_Comm comm, int direction, int disp, int *rank_source, int *rank_dest); int PMPI_Cart_sub(MPI_Comm comm, const int remain_dims[], MPI_Comm *newcomm); int PMPI_Cart_map(MPI_Comm comm, int ndims, const int dims[], const int periods[], int *newrank); int PMPI_Graph_map(MPI_Comm comm, int nnodes, const int indx[], const int edges[], int *newrank); int PMPI_Get_processor_name(char *name, int *resultlen); int PMPI_Get_version(int *version, int *subversion); int PMPI_Get_library_version(char *version, int *resultlen); int PMPI_Errhandler_create(MPI_Handler_function *function, MPI_Errhandler *errhandler); int PMPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler); int PMPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler *errhandler); int PMPI_Errhandler_free(MPI_Errhandler *errhandler); int PMPI_Error_string(int errorcode, char *string, int *resultlen); int PMPI_Error_class(int errorcode, int *errorclass); double PMPI_Wtime(void); double PMPI_Wtick(void); int PMPI_Init(int *argc, char ***argv); int PMPI_Finalize(void); int PMPI_Initialized(int *flag); int PMPI_Abort(MPI_Comm comm, int errorcode); /* Note that we may need to define a @PCONTROL_LIST@ depending on whether stdargs are supported */ int PMPI_Pcontrol(const int level, ...); /* Process Creation and Management */ int PMPI_Close_port(const char *port_name); int PMPI_Comm_accept(const char *port_name, MPI_Info info, int root, MPI_Comm comm, MPI_Comm *newcomm); int PMPI_Comm_connect(const char *port_name, MPI_Info info, int root, MPI_Comm comm, MPI_Comm *newcomm); int PMPI_Comm_disconnect(MPI_Comm *comm); int PMPI_Comm_get_parent(MPI_Comm *parent); int PMPI_Comm_join(int fd, MPI_Comm *intercomm); int PMPI_Comm_spawn(const char *command, char *argv[], int maxprocs, MPI_Info info, int root, MPI_Comm comm, MPI_Comm *intercomm, int array_of_errcodes[]); int PMPI_Comm_spawn_multiple(int count, char *array_of_commands[], char **array_of_argv[], const int array_of_maxprocs[], const MPI_Info array_of_info[], int root, MPI_Comm comm, MPI_Comm *intercomm, int array_of_errcodes[]); int PMPI_Lookup_name(const char *service_name, MPI_Info info, char *port_name); int PMPI_Open_port(MPI_Info info, char *port_name); int PMPI_Publish_name(const char *service_name, MPI_Info info, const char *port_name); int PMPI_Unpublish_name(const char *service_name, MPI_Info info, const char *port_name); int PMPI_Comm_set_info(MPI_Comm comm, MPI_Info info); int PMPI_Comm_get_info(MPI_Comm comm, MPI_Info *info); /* One-Sided Communications */ int PMPI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Get(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Put(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Win_complete(MPI_Win win); int PMPI_Win_create(void *base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, MPI_Win *win); int PMPI_Win_fence(int assert, MPI_Win win); int PMPI_Win_free(MPI_Win *win); int PMPI_Win_get_group(MPI_Win win, MPI_Group *group); int PMPI_Win_lock(int lock_type, int rank, int assert, MPI_Win win); int PMPI_Win_post(MPI_Group group, int assert, MPI_Win win); int PMPI_Win_start(MPI_Group group, int assert, MPI_Win win); int PMPI_Win_test(MPI_Win win, int *flag); int PMPI_Win_unlock(int rank, MPI_Win win); int PMPI_Win_wait(MPI_Win win); /* MPI-3 One-Sided Communication Routines */ int PMPI_Win_allocate(MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, void *baseptr, MPI_Win *win); int PMPI_Win_allocate_shared(MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, void *baseptr, MPI_Win *win); int PMPI_Win_shared_query(MPI_Win win, int rank, MPI_Aint *size, int *disp_unit, void *baseptr); int PMPI_Win_create_dynamic(MPI_Info info, MPI_Comm comm, MPI_Win *win); int PMPI_Win_attach(MPI_Win win, void *base, MPI_Aint size); int PMPI_Win_detach(MPI_Win win, const void *base); int PMPI_Win_get_info(MPI_Win win, MPI_Info *info_used); int PMPI_Win_set_info(MPI_Win win, MPI_Info info); int PMPI_Get_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Fetch_and_op(const void *origin_addr, void *result_addr, MPI_Datatype datatype, int target_rank, MPI_Aint target_disp, MPI_Op op, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Compare_and_swap(const void *origin_addr, const void *compare_addr, void *result_addr, MPI_Datatype datatype, int target_rank, MPI_Aint target_disp, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,4); int PMPI_Rput(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Rget(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Raccumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Rget_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Win_lock_all(int assert, MPI_Win win); int PMPI_Win_unlock_all(MPI_Win win); int PMPI_Win_flush(int rank, MPI_Win win); int PMPI_Win_flush_all(MPI_Win win); int PMPI_Win_flush_local(int rank, MPI_Win win); int PMPI_Win_flush_local_all(MPI_Win win); int PMPI_Win_sync(MPI_Win win); /* External Interfaces */ int PMPI_Add_error_class(int *errorclass); int PMPI_Add_error_code(int errorclass, int *errorcode); int PMPI_Add_error_string(int errorcode, const char *string); int PMPI_Comm_call_errhandler(MPI_Comm comm, int errorcode); int PMPI_Comm_create_keyval(MPI_Comm_copy_attr_function *comm_copy_attr_fn, MPI_Comm_delete_attr_function *comm_delete_attr_fn, int *comm_keyval, void *extra_state); int PMPI_Comm_delete_attr(MPI_Comm comm, int comm_keyval); int PMPI_Comm_free_keyval(int *comm_keyval); int PMPI_Comm_get_attr(MPI_Comm comm, int comm_keyval, void *attribute_val, int *flag); int PMPI_Comm_get_name(MPI_Comm comm, char *comm_name, int *resultlen); int PMPI_Comm_set_attr(MPI_Comm comm, int comm_keyval, void *attribute_val); int PMPI_Comm_set_name(MPI_Comm comm, const char *comm_name); int PMPI_File_call_errhandler(MPI_File fh, int errorcode); int PMPI_Grequest_complete(MPI_Request request); int PMPI_Grequest_start(MPI_Grequest_query_function *query_fn, MPI_Grequest_free_function *free_fn, MPI_Grequest_cancel_function *cancel_fn, void *extra_state, MPI_Request *request); int PMPI_Init_thread(int *argc, char ***argv, int required, int *provided); int PMPI_Is_thread_main(int *flag); int PMPI_Query_thread(int *provided); int PMPI_Status_set_cancelled(MPI_Status *status, int flag); int PMPI_Status_set_elements(MPI_Status *status, MPI_Datatype datatype, int count); int PMPI_Type_create_keyval(MPI_Type_copy_attr_function *type_copy_attr_fn, MPI_Type_delete_attr_function *type_delete_attr_fn, int *type_keyval, void *extra_state); int PMPI_Type_delete_attr(MPI_Datatype datatype, int type_keyval); int PMPI_Type_dup(MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_free_keyval(int *type_keyval); int PMPI_Type_get_attr(MPI_Datatype datatype, int type_keyval, void *attribute_val, int *flag); int PMPI_Type_get_contents(MPI_Datatype datatype, int max_integers, int max_addresses, int max_datatypes, int array_of_integers[], MPI_Aint array_of_addresses[], MPI_Datatype array_of_datatypes[]); int PMPI_Type_get_envelope(MPI_Datatype datatype, int *num_integers, int *num_addresses, int *num_datatypes, int *combiner); int PMPI_Type_get_name(MPI_Datatype datatype, char *type_name, int *resultlen); int PMPI_Type_set_attr(MPI_Datatype datatype, int type_keyval, void *attribute_val); int PMPI_Type_set_name(MPI_Datatype datatype, const char *type_name); int PMPI_Type_match_size(int typeclass, int size, MPI_Datatype *datatype); int PMPI_Win_call_errhandler(MPI_Win win, int errorcode); int PMPI_Win_create_keyval(MPI_Win_copy_attr_function *win_copy_attr_fn, MPI_Win_delete_attr_function *win_delete_attr_fn, int *win_keyval, void *extra_state); int PMPI_Win_delete_attr(MPI_Win win, int win_keyval); int PMPI_Win_free_keyval(int *win_keyval); int PMPI_Win_get_attr(MPI_Win win, int win_keyval, void *attribute_val, int *flag); int PMPI_Win_get_name(MPI_Win win, char *win_name, int *resultlen); int PMPI_Win_set_attr(MPI_Win win, int win_keyval, void *attribute_val); int PMPI_Win_set_name(MPI_Win win, const char *win_name); int PMPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr); int PMPI_Comm_create_errhandler(MPI_Comm_errhandler_function *comm_errhandler_fn, MPI_Errhandler *errhandler); int PMPI_Comm_get_errhandler(MPI_Comm comm, MPI_Errhandler *errhandler); int PMPI_Comm_set_errhandler(MPI_Comm comm, MPI_Errhandler errhandler); int PMPI_File_create_errhandler(MPI_File_errhandler_function *file_errhandler_fn, MPI_Errhandler *errhandler); int PMPI_File_get_errhandler(MPI_File file, MPI_Errhandler *errhandler); int PMPI_File_set_errhandler(MPI_File file, MPI_Errhandler errhandler); int PMPI_Finalized(int *flag); int PMPI_Free_mem(void *base); int PMPI_Get_address(const void *location, MPI_Aint *address); int PMPI_Info_create(MPI_Info *info); int PMPI_Info_delete(MPI_Info info, const char *key); int PMPI_Info_dup(MPI_Info info, MPI_Info *newinfo); int PMPI_Info_free(MPI_Info *info); int PMPI_Info_get(MPI_Info info, const char *key, int valuelen, char *value, int *flag); int PMPI_Info_get_nkeys(MPI_Info info, int *nkeys); int PMPI_Info_get_nthkey(MPI_Info info, int n, char *key); int PMPI_Info_get_valuelen(MPI_Info info, const char *key, int *valuelen, int *flag); int PMPI_Info_set(MPI_Info info, const char *key, const char *value); int PMPI_Pack_external(const char datarep[], const void *inbuf, int incount, MPI_Datatype datatype, void *outbuf, MPI_Aint outsize, MPI_Aint *position) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Pack_external_size(const char datarep[], int incount, MPI_Datatype datatype, MPI_Aint *size); int PMPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status); int PMPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status); int PMPI_Status_f2c(const MPI_Fint *f_status, MPI_Status *c_status); int PMPI_Type_create_darray(int size, int rank, int ndims, const int array_of_gsizes[], const int array_of_distribs[], const int array_of_dargs[], const int array_of_psizes[], int order, MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_create_hindexed(int count, const int array_of_blocklengths[], const MPI_Aint array_of_displacements[], MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_create_hvector(int count, int blocklength, MPI_Aint stride, MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_create_indexed_block(int count, int blocklength, const int array_of_displacements[], MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_create_hindexed_block(int count, int blocklength, const MPI_Aint array_of_displacements[], MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_create_resized(MPI_Datatype oldtype, MPI_Aint lb, MPI_Aint extent, MPI_Datatype *newtype); int PMPI_Type_create_struct(int count, const int array_of_blocklengths[], const MPI_Aint array_of_displacements[], const MPI_Datatype array_of_types[], MPI_Datatype *newtype); int PMPI_Type_create_subarray(int ndims, const int array_of_sizes[], const int array_of_subsizes[], const int array_of_starts[], int order, MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint *lb, MPI_Aint *extent); int PMPI_Type_get_true_extent(MPI_Datatype datatype, MPI_Aint *true_lb, MPI_Aint *true_extent); int PMPI_Unpack_external(const char datarep[], const void *inbuf, MPI_Aint insize, MPI_Aint *position, void *outbuf, int outcount, MPI_Datatype datatype) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,7); int PMPI_Win_create_errhandler(MPI_Win_errhandler_function *win_errhandler_fn, MPI_Errhandler *errhandler); int PMPI_Win_get_errhandler(MPI_Win win, MPI_Errhandler *errhandler); int PMPI_Win_set_errhandler(MPI_Win win, MPI_Errhandler errhandler); /* Fortran 90-related functions. These routines are available only if Fortran 90 support is enabled */ int PMPI_Type_create_f90_integer(int r, MPI_Datatype *newtype); int PMPI_Type_create_f90_real(int p, int r, MPI_Datatype *newtype); int PMPI_Type_create_f90_complex(int p, int r, MPI_Datatype *newtype); int PMPI_Reduce_local(const void *inbuf, void *inoutbuf, int count, MPI_Datatype datatype, MPI_Op op) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Op_commutative(MPI_Op op, int *commute); int PMPI_Reduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Dist_graph_create_adjacent(MPI_Comm comm_old, int indegree, const int sources[], const int sourceweights[], int outdegree, const int destinations[], const int destweights[], MPI_Info info, int reorder, MPI_Comm *comm_dist_graph); int PMPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[], const int degrees[], const int destinations[], const int weights[], MPI_Info info, int reorder, MPI_Comm *comm_dist_graph); int PMPI_Dist_graph_neighbors_count(MPI_Comm comm, int *indegree, int *outdegree, int *weighted); int PMPI_Dist_graph_neighbors(MPI_Comm comm, int maxindegree, int sources[], int sourceweights[], int maxoutdegree, int destinations[], int destweights[]); /* Matched probe functionality */ int PMPI_Improbe(int source, int tag, MPI_Comm comm, int *flag, MPI_Message *message, MPI_Status *status); int PMPI_Imrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Mprobe(int source, int tag, MPI_Comm comm, MPI_Message *message, MPI_Status *status); int PMPI_Mrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); /* Nonblocking collectives */ int PMPI_Comm_idup(MPI_Comm comm, MPI_Comm *newcomm, MPI_Request *request); int PMPI_Ibarrier(MPI_Comm comm, MPI_Request *request); int PMPI_Ibcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int PMPI_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Iscatterv(const void *sendbuf, const int sendcounts[], const int displs[], MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,7); int PMPI_Iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int PMPI_Ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Ialltoallv(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,8); int PMPI_Ialltoallw(const void *sendbuf, const int sendcounts[], const int sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const int rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm, MPI_Request *request); int PMPI_Ireduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Iallreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Ireduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[], MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Iscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Iexscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); /* Neighborhood collectives */ int PMPI_Ineighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Ineighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int PMPI_Ineighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,8); int PMPI_Ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm, MPI_Request *request); int PMPI_Neighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Neighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int PMPI_Neighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Neighbor_alltoallv(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,8); int PMPI_Neighbor_alltoallw(const void *sendbuf, const int sendcounts[], const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm); /* Shared memory */ int PMPI_Comm_split_type(MPI_Comm comm, int split_type, int key, MPI_Info info, MPI_Comm *newcomm); /* Noncollective communicator creation */ int PMPI_Comm_create_group(MPI_Comm comm, MPI_Group group, int tag, MPI_Comm *newcomm); /* MPI-3 "large count" routines */ int PMPI_Get_elements_x(const MPI_Status *status, MPI_Datatype datatype, MPI_Count *count); int PMPI_Status_set_elements_x(MPI_Status *status, MPI_Datatype datatype, MPI_Count count); int PMPI_Type_get_extent_x(MPI_Datatype datatype, MPI_Count *lb, MPI_Count *extent); int PMPI_Type_get_true_extent_x(MPI_Datatype datatype, MPI_Count *lb, MPI_Count *extent); int PMPI_Type_size_x(MPI_Datatype datatype, MPI_Count *size); /* MPI_Aint addressing arithmetic */ MPI_Aint PMPI_Aint_add(MPI_Aint base, MPI_Aint disp); MPI_Aint PMPI_Aint_diff(MPI_Aint addr1, MPI_Aint addr2); /* MPI_T interface */ /* The MPI_T routines are available only in C bindings - tell tools that they can skip these prototypes */ /* Begin Skip Prototypes */ int PMPI_T_init_thread(int required, int *provided); int PMPI_T_finalize(void); int PMPI_T_enum_get_info(MPI_T_enum enumtype, int *num, char *name, int *name_len); int PMPI_T_enum_get_item(MPI_T_enum enumtype, int indx, int *value, char *name, int *name_len); int PMPI_T_cvar_get_num(int *num_cvar); int PMPI_T_cvar_get_info(int cvar_index, char *name, int *name_len, int *verbosity, MPI_Datatype *datatype, MPI_T_enum *enumtype, char *desc, int *desc_len, int *binding, int *scope); int PMPI_T_cvar_handle_alloc(int cvar_index, void *obj_handle, MPI_T_cvar_handle *handle, int *count); int PMPI_T_cvar_handle_free(MPI_T_cvar_handle *handle); int PMPI_T_cvar_read(MPI_T_cvar_handle handle, void *buf); int PMPI_T_cvar_write(MPI_T_cvar_handle handle, const void *buf); int PMPI_T_pvar_get_num(int *num_pvar); int PMPI_T_pvar_get_info(int pvar_index, char *name, int *name_len, int *verbosity, int *var_class, MPI_Datatype *datatype, MPI_T_enum *enumtype, char *desc, int *desc_len, int *binding, int *readonly, int *continuous, int *atomic); int PMPI_T_pvar_session_create(MPI_T_pvar_session *session); int PMPI_T_pvar_session_free(MPI_T_pvar_session *session); int PMPI_T_pvar_handle_alloc(MPI_T_pvar_session session, int pvar_index, void *obj_handle, MPI_T_pvar_handle *handle, int *count); int PMPI_T_pvar_handle_free(MPI_T_pvar_session session, MPI_T_pvar_handle *handle); int PMPI_T_pvar_start(MPI_T_pvar_session session, MPI_T_pvar_handle handle); int PMPI_T_pvar_stop(MPI_T_pvar_session session, MPI_T_pvar_handle handle); int PMPI_T_pvar_read(MPI_T_pvar_session session, MPI_T_pvar_handle handle, void *buf); int PMPI_T_pvar_write(MPI_T_pvar_session session, MPI_T_pvar_handle handle, const void *buf); int PMPI_T_pvar_reset(MPI_T_pvar_session session, MPI_T_pvar_handle handle); int PMPI_T_pvar_readreset(MPI_T_pvar_session session, MPI_T_pvar_handle handle, void *buf); int PMPI_T_category_get_num(int *num_cat); int PMPI_T_category_get_info(int cat_index, char *name, int *name_len, char *desc, int *desc_len, int *num_cvars, int *num_pvars, int *num_categories); int PMPI_T_category_get_cvars(int cat_index, int len, int indices[]); int PMPI_T_category_get_pvars(int cat_index, int len, int indices[]); int PMPI_T_category_get_categories(int cat_index, int len, int indices[]); int PMPI_T_category_changed(int *stamp); int PMPI_T_cvar_get_index(const char *name, int *cvar_index); int PMPI_T_pvar_get_index(const char *name, int var_class, int *pvar_index); int PMPI_T_category_get_index(const char *name, int *cat_index); /* End Skip Prototypes */ /* Non-standard but public extensions to MPI */ /* Fault Tolerance Extensions */ int PMPIX_Comm_failure_ack(MPI_Comm comm); int PMPIX_Comm_failure_get_acked(MPI_Comm comm, MPI_Group *failedgrp); int PMPIX_Comm_revoke(MPI_Comm comm); int PMPIX_Comm_shrink(MPI_Comm comm, MPI_Comm *newcomm); int PMPIX_Comm_agree(MPI_Comm comm, int *flag); #endif /* MPI_BUILD_PROFILING */ # 2203 "./src/include/mpi.h" /* End of MPI bindings */ /* feature advertisement */ #define MPIIMPL_ADVERTISES_FEATURES 1 #define MPIIMPL_HAVE_MPI_INFO 1 #define MPIIMPL_HAVE_MPI_COMBINER_DARRAY 1 #define MPIIMPL_HAVE_MPI_TYPE_CREATE_DARRAY 1 #define MPIIMPL_HAVE_MPI_COMBINER_SUBARRAY 1 #define MPIIMPL_HAVE_MPI_TYPE_CREATE_DARRAY 1 #define MPIIMPL_HAVE_MPI_COMBINER_DUP 1 #define MPIIMPL_HAVE_MPI_GREQUEST 1 #define MPIIMPL_HAVE_STATUS_SET_BYTES 1 #define MPIIMPL_HAVE_STATUS_SET_INFO 1 #if 0 /* expanded by -frewrite-includes */ #include "mpio.h" #endif /* expanded by -frewrite-includes */ # 2217 "./src/include/mpi.h" # 1 "./src/include/mpio.h" 1 /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* * * Copyright (C) 1997 University of Chicago. * See COPYRIGHT notice in top-level directory. */ /* user include file for MPI-IO programs */ #ifndef MPIO_INCLUDE #define MPIO_INCLUDE #if 0 /* expanded by -frewrite-includes */ #include "mpi.h" #endif /* expanded by -frewrite-includes */ # 13 "./src/include/mpio.h" # 1 "./src/include/mpi.h" 1 /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ /* src/include/mpi.h. Generated from mpi.h.in by configure. */ #ifndef MPI_INCLUDED #define MPI_INCLUDED /* user include file for MPI programs */ /* Keep C++ compilers from getting confused */ #if defined(__cplusplus) extern "C" { #endif # 16 "./src/include/mpi.h" #define NO_TAGS_WITH_MODIFIERS 1 #undef MPICH_DEFINE_ATTR_TYPE_TYPES #if defined(__has_attribute) # if __has_attribute(pointer_with_type_tag) && \ __has_attribute(type_tag_for_datatype) && \ !defined(NO_TAGS_WITH_MODIFIERS) &&\ !defined(MPICH_NO_ATTR_TYPE_TAGS) # define MPICH_DEFINE_ATTR_TYPE_TYPES 1 # define MPICH_ATTR_POINTER_WITH_TYPE_TAG(buffer_idx, type_idx) __attribute__((pointer_with_type_tag(MPI,buffer_idx,type_idx))) # define MPICH_ATTR_TYPE_TAG(type) __attribute__((type_tag_for_datatype(MPI,type))) # define MPICH_ATTR_TYPE_TAG_LAYOUT_COMPATIBLE(type) __attribute__((type_tag_for_datatype(MPI,type,layout_compatible))) # define MPICH_ATTR_TYPE_TAG_MUST_BE_NULL() __attribute__((type_tag_for_datatype(MPI,void,must_be_null))) #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 29 "./src/include/mpi.h" # 30 "./src/include/mpi.h" # endif # 31 "./src/include/mpi.h" #endif # 32 "./src/include/mpi.h" #if !defined(MPICH_ATTR_POINTER_WITH_TYPE_TAG) # define MPICH_ATTR_POINTER_WITH_TYPE_TAG(buffer_idx, type_idx) # define MPICH_ATTR_TYPE_TAG(type) # define MPICH_ATTR_TYPE_TAG_LAYOUT_COMPATIBLE(type) # define MPICH_ATTR_TYPE_TAG_MUST_BE_NULL() #endif # 39 "./src/include/mpi.h" #if !defined(INT8_C) /* stdint.h was not included, see if we can get it */ # if defined(__cplusplus) # if __cplusplus >= 201103 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 44 "./src/include/mpi.h" # 45 "./src/include/mpi.h" # endif # 46 "./src/include/mpi.h" # endif # 47 "./src/include/mpi.h" #endif # 48 "./src/include/mpi.h" #if !defined(INT8_C) /* stdint.h was not included, see if we can get it */ # if defined(__STDC_VERSION__) # if __STDC_VERSION__ >= 199901 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 53 "./src/include/mpi.h" # 54 "./src/include/mpi.h" # endif # 55 "./src/include/mpi.h" # endif # 56 "./src/include/mpi.h" #endif # 57 "./src/include/mpi.h" #if defined(INT8_C) /* stdint.h was included, so we can annotate these types */ # define MPICH_ATTR_TYPE_TAG_STDINT(type) MPICH_ATTR_TYPE_TAG(type) #else # 62 "./src/include/mpi.h" # define MPICH_ATTR_TYPE_TAG_STDINT(type) #endif # 64 "./src/include/mpi.h" #ifdef __STDC_VERSION__ #if __STDC_VERSION__ >= 199901 # define MPICH_ATTR_TYPE_TAG_C99(type) MPICH_ATTR_TYPE_TAG(type) #else # 69 "./src/include/mpi.h" # define MPICH_ATTR_TYPE_TAG_C99(type) #endif # 71 "./src/include/mpi.h" #else # 72 "./src/include/mpi.h" # define MPICH_ATTR_TYPE_TAG_C99(type) #endif # 74 "./src/include/mpi.h" #if defined(__cplusplus) # define MPICH_ATTR_TYPE_TAG_CXX(type) MPICH_ATTR_TYPE_TAG(type) #else # 78 "./src/include/mpi.h" # define MPICH_ATTR_TYPE_TAG_CXX(type) #endif # 80 "./src/include/mpi.h" /* Define some null objects */ #define MPI_COMM_NULL ((MPI_Comm)0x04000000) #define MPI_OP_NULL ((MPI_Op)0x18000000) #define MPI_GROUP_NULL ((MPI_Group)0x08000000) #define MPI_DATATYPE_NULL ((MPI_Datatype)0x0c000000) #define MPI_REQUEST_NULL ((MPI_Request)0x2c000000) #define MPI_ERRHANDLER_NULL ((MPI_Errhandler)0x14000000) #define MPI_MESSAGE_NULL ((MPI_Message)0x2c000000) #define MPI_MESSAGE_NO_PROC ((MPI_Message)0x6c000000) /* Results of the compare operations. */ #define MPI_IDENT 0 #define MPI_CONGRUENT 1 #define MPI_SIMILAR 2 #define MPI_UNEQUAL 3 typedef int MPI_Datatype; #define MPI_CHAR ((MPI_Datatype)0x4c000101) #define MPI_SIGNED_CHAR ((MPI_Datatype)0x4c000118) #define MPI_UNSIGNED_CHAR ((MPI_Datatype)0x4c000102) #define MPI_BYTE ((MPI_Datatype)0x4c00010d) #define MPI_WCHAR ((MPI_Datatype)0x4c00040e) #define MPI_SHORT ((MPI_Datatype)0x4c000203) #define MPI_UNSIGNED_SHORT ((MPI_Datatype)0x4c000204) #define MPI_INT ((MPI_Datatype)0x4c000405) #define MPI_UNSIGNED ((MPI_Datatype)0x4c000406) #define MPI_LONG ((MPI_Datatype)0x4c000807) #define MPI_UNSIGNED_LONG ((MPI_Datatype)0x4c000808) #define MPI_FLOAT ((MPI_Datatype)0x4c00040a) #define MPI_DOUBLE ((MPI_Datatype)0x4c00080b) #define MPI_LONG_DOUBLE ((MPI_Datatype)0x4c00100c) #define MPI_LONG_LONG_INT ((MPI_Datatype)0x4c000809) #define MPI_UNSIGNED_LONG_LONG ((MPI_Datatype)0x4c000819) #define MPI_LONG_LONG MPI_LONG_LONG_INT #ifdef MPICH_DEFINE_ATTR_TYPE_TYPES static const MPI_Datatype mpich_mpi_char MPICH_ATTR_TYPE_TAG(char) = MPI_CHAR; static const MPI_Datatype mpich_mpi_signed_char MPICH_ATTR_TYPE_TAG(signed char) = MPI_SIGNED_CHAR; static const MPI_Datatype mpich_mpi_unsigned_char MPICH_ATTR_TYPE_TAG(unsigned char) = MPI_UNSIGNED_CHAR; /*static const MPI_Datatype mpich_mpi_byte MPICH_ATTR_TYPE_TAG(char) = MPI_BYTE;*/ static const MPI_Datatype mpich_mpi_wchar MPICH_ATTR_TYPE_TAG(wchar_t) = MPI_WCHAR; static const MPI_Datatype mpich_mpi_short MPICH_ATTR_TYPE_TAG(short) = MPI_SHORT; static const MPI_Datatype mpich_mpi_unsigned_short MPICH_ATTR_TYPE_TAG(unsigned short) = MPI_UNSIGNED_SHORT; static const MPI_Datatype mpich_mpi_int MPICH_ATTR_TYPE_TAG(int) = MPI_INT; static const MPI_Datatype mpich_mpi_unsigned MPICH_ATTR_TYPE_TAG(unsigned) = MPI_UNSIGNED; static const MPI_Datatype mpich_mpi_long MPICH_ATTR_TYPE_TAG(long) = MPI_LONG; static const MPI_Datatype mpich_mpi_unsigned_long MPICH_ATTR_TYPE_TAG(unsigned long) = MPI_UNSIGNED_LONG; static const MPI_Datatype mpich_mpi_float MPICH_ATTR_TYPE_TAG(float) = MPI_FLOAT; static const MPI_Datatype mpich_mpi_double MPICH_ATTR_TYPE_TAG(double) = MPI_DOUBLE; #if 0x4c00100c != 0x0c000000 static const MPI_Datatype mpich_mpi_long_double MPICH_ATTR_TYPE_TAG(long double) = MPI_LONG_DOUBLE; #endif # 134 "./src/include/mpi.h" static const MPI_Datatype mpich_mpi_long_long_int MPICH_ATTR_TYPE_TAG(long long int) = MPI_LONG_LONG_INT; static const MPI_Datatype mpich_mpi_unsigned_long_long MPICH_ATTR_TYPE_TAG(unsigned long long) = MPI_UNSIGNED_LONG_LONG; #endif # 137 "./src/include/mpi.h" #define MPI_PACKED ((MPI_Datatype)0x4c00010f) #define MPI_LB ((MPI_Datatype)0x4c000010) #define MPI_UB ((MPI_Datatype)0x4c000011) /* The layouts for the types MPI_DOUBLE_INT etc are simply struct { double var; int loc; } This is documented in the man pages on the various datatypes. */ #define MPI_FLOAT_INT ((MPI_Datatype)0x8c000000) #define MPI_DOUBLE_INT ((MPI_Datatype)0x8c000001) #define MPI_LONG_INT ((MPI_Datatype)0x8c000002) #define MPI_SHORT_INT ((MPI_Datatype)0x8c000003) #define MPI_2INT ((MPI_Datatype)0x4c000816) #define MPI_LONG_DOUBLE_INT ((MPI_Datatype)0x8c000004) #ifdef MPICH_DEFINE_ATTR_TYPE_TYPES struct mpich_struct_mpi_float_int { float f; int i; }; struct mpich_struct_mpi_double_int { double d; int i; }; struct mpich_struct_mpi_long_int { long l; int i; }; struct mpich_struct_mpi_short_int { short s; int i; }; struct mpich_struct_mpi_2int { int i1; int i2; }; #if 0x8c000004 != 0x0c000000 struct mpich_struct_mpi_long_double_int { long double ld; int i; }; #endif # 166 "./src/include/mpi.h" static const MPI_Datatype mpich_mpi_float_int MPICH_ATTR_TYPE_TAG_LAYOUT_COMPATIBLE(struct mpich_struct_mpi_float_int) = MPI_FLOAT_INT; static const MPI_Datatype mpich_mpi_double_int MPICH_ATTR_TYPE_TAG_LAYOUT_COMPATIBLE(struct mpich_struct_mpi_double_int) = MPI_DOUBLE_INT; static const MPI_Datatype mpich_mpi_long_int MPICH_ATTR_TYPE_TAG_LAYOUT_COMPATIBLE(struct mpich_struct_mpi_long_int) = MPI_LONG_INT; static const MPI_Datatype mpich_mpi_short_int MPICH_ATTR_TYPE_TAG_LAYOUT_COMPATIBLE(struct mpich_struct_mpi_short_int) = MPI_SHORT_INT; /* * The MPI_2INT line is commented out because currently Clang 3.3 flags * struct {int i1; int i2;} as different from int[2]. But actually these * two types are of the same layout. Clang gives a type mismatch warning * for a definitely correct code like the following: * int in[2], out[2]; * MPI_Reduce(in, out, 1, MPI_2INT, MPI_MAXLOC, 0, MPI_COMM_WORLD); * * So, we disable type checking for MPI_2INT until Clang fixes this bug. */ /* static const MPI_Datatype mpich_mpi_2int MPICH_ATTR_TYPE_TAG_LAYOUT_COMPATIBLE(struct mpich_struct_mpi_2int) = MPI_2INT */ #if 0x8c000004 != 0x0c000000 static const MPI_Datatype mpich_mpi_long_double_int MPICH_ATTR_TYPE_TAG_LAYOUT_COMPATIBLE(struct mpich_struct_mpi_long_double_int) = MPI_LONG_DOUBLE_INT; #endif # 189 "./src/include/mpi.h" #endif # 190 "./src/include/mpi.h" /* Fortran types */ #define MPI_COMPLEX ((MPI_Datatype)1275070494) #define MPI_DOUBLE_COMPLEX ((MPI_Datatype)1275072546) #define MPI_LOGICAL ((MPI_Datatype)1275069469) #define MPI_REAL ((MPI_Datatype)1275069468) #define MPI_DOUBLE_PRECISION ((MPI_Datatype)1275070495) #define MPI_INTEGER ((MPI_Datatype)1275069467) #define MPI_2INTEGER ((MPI_Datatype)1275070496) /* * MPI_2COMPLEX and MPI_2DOUBLE_COMPLEX were defined by accident in * MPI 1.0 and removed in MPI 1.1. * * This definition provides backward compatibility. These definitions * will be removed in a subsequent MPICH release */ #ifdef MPICH_DEFINE_2COMPLEX #define MPI_2COMPLEX ((MPI_Datatype)1275072548) #define MPI_2DOUBLE_COMPLEX ((MPI_Datatype)1275076645) #endif # 210 "./src/include/mpi.h" #define MPI_2REAL ((MPI_Datatype)1275070497) #define MPI_2DOUBLE_PRECISION ((MPI_Datatype)1275072547) #define MPI_CHARACTER ((MPI_Datatype)1275068698) /* Size-specific types (see MPI-2, 10.2.5) */ #define MPI_REAL4 ((MPI_Datatype)0x4c000427) #define MPI_REAL8 ((MPI_Datatype)0x4c000829) #define MPI_REAL16 ((MPI_Datatype)0x4c00102b) #define MPI_COMPLEX8 ((MPI_Datatype)0x4c000828) #define MPI_COMPLEX16 ((MPI_Datatype)0x4c00102a) #define MPI_COMPLEX32 ((MPI_Datatype)0x4c00202c) #define MPI_INTEGER1 ((MPI_Datatype)0x4c00012d) #define MPI_INTEGER2 ((MPI_Datatype)0x4c00022f) #define MPI_INTEGER4 ((MPI_Datatype)0x4c000430) #define MPI_INTEGER8 ((MPI_Datatype)0x4c000831) #define MPI_INTEGER16 ((MPI_Datatype)MPI_DATATYPE_NULL) /* C99 fixed-width datatypes */ #define MPI_INT8_T ((MPI_Datatype)0x4c000137) #define MPI_INT16_T ((MPI_Datatype)0x4c000238) #define MPI_INT32_T ((MPI_Datatype)0x4c000439) #define MPI_INT64_T ((MPI_Datatype)0x4c00083a) #define MPI_UINT8_T ((MPI_Datatype)0x4c00013b) #define MPI_UINT16_T ((MPI_Datatype)0x4c00023c) #define MPI_UINT32_T ((MPI_Datatype)0x4c00043d) #define MPI_UINT64_T ((MPI_Datatype)0x4c00083e) #ifdef MPICH_DEFINE_ATTR_TYPE_TYPES static const MPI_Datatype mpich_mpi_int8_t MPICH_ATTR_TYPE_TAG_STDINT(int8_t) = MPI_INT8_T; static const MPI_Datatype mpich_mpi_int16_t MPICH_ATTR_TYPE_TAG_STDINT(int16_t) = MPI_INT16_T; static const MPI_Datatype mpich_mpi_int32_t MPICH_ATTR_TYPE_TAG_STDINT(int32_t) = MPI_INT32_T; static const MPI_Datatype mpich_mpi_int64_t MPICH_ATTR_TYPE_TAG_STDINT(int64_t) = MPI_INT64_T; static const MPI_Datatype mpich_mpi_uint8_t MPICH_ATTR_TYPE_TAG_STDINT(uint8_t) = MPI_UINT8_T; static const MPI_Datatype mpich_mpi_uint16_t MPICH_ATTR_TYPE_TAG_STDINT(uint16_t) = MPI_UINT16_T; static const MPI_Datatype mpich_mpi_uint32_t MPICH_ATTR_TYPE_TAG_STDINT(uint32_t) = MPI_UINT32_T; static const MPI_Datatype mpich_mpi_uint64_t MPICH_ATTR_TYPE_TAG_STDINT(uint64_t) = MPI_UINT64_T; #endif # 247 "./src/include/mpi.h" /* other C99 types */ #define MPI_C_BOOL ((MPI_Datatype)0x4c00013f) #define MPI_C_FLOAT_COMPLEX ((MPI_Datatype)0x4c000840) #define MPI_C_COMPLEX MPI_C_FLOAT_COMPLEX #define MPI_C_DOUBLE_COMPLEX ((MPI_Datatype)0x4c001041) #define MPI_C_LONG_DOUBLE_COMPLEX ((MPI_Datatype)0x4c002042) #ifdef MPICH_DEFINE_ATTR_TYPE_TYPES static const MPI_Datatype mpich_mpi_c_bool MPICH_ATTR_TYPE_TAG_C99(_Bool) = MPI_C_BOOL; static const MPI_Datatype mpich_mpi_c_float_complex MPICH_ATTR_TYPE_TAG_C99(float _Complex) = MPI_C_FLOAT_COMPLEX; static const MPI_Datatype mpich_mpi_c_double_complex MPICH_ATTR_TYPE_TAG_C99(double _Complex) = MPI_C_DOUBLE_COMPLEX; #if 0x4c002042 != 0x0c000000 static const MPI_Datatype mpich_mpi_c_long_double_complex MPICH_ATTR_TYPE_TAG_C99(long double _Complex) = MPI_C_LONG_DOUBLE_COMPLEX; #endif # 262 "./src/include/mpi.h" #endif # 263 "./src/include/mpi.h" /* address/offset types */ #define MPI_AINT ((MPI_Datatype)0x4c000843) #define MPI_OFFSET ((MPI_Datatype)0x4c000844) #define MPI_COUNT ((MPI_Datatype)0x4c000845) /* MPI-3 C++ types */ #define MPI_CXX_BOOL ((MPI_Datatype)0x4c000133) #define MPI_CXX_FLOAT_COMPLEX ((MPI_Datatype)0x4c000834) #define MPI_CXX_DOUBLE_COMPLEX ((MPI_Datatype)0x4c001035) #define MPI_CXX_LONG_DOUBLE_COMPLEX ((MPI_Datatype)0x4c002036) /* typeclasses */ #define MPI_TYPECLASS_REAL 1 #define MPI_TYPECLASS_INTEGER 2 #define MPI_TYPECLASS_COMPLEX 3 /* Communicators */ typedef int MPI_Comm; #define MPI_COMM_WORLD ((MPI_Comm)0x44000000) #define MPI_COMM_SELF ((MPI_Comm)0x44000001) /* Groups */ typedef int MPI_Group; #define MPI_GROUP_EMPTY ((MPI_Group)0x48000000) /* RMA and Windows */ typedef int MPI_Win; #define MPI_WIN_NULL ((MPI_Win)0x20000000) /* File and IO */ /* This define lets ROMIO know that MPI_File has been defined */ #define MPI_FILE_DEFINED /* ROMIO uses a pointer for MPI_File objects. This must be the same definition as in src/mpi/romio/include/mpio.h.in */ typedef struct ADIOI_FileD *MPI_File; #define MPI_FILE_NULL ((MPI_File)0) /* Collective operations */ typedef int MPI_Op; #define MPI_MAX (MPI_Op)(0x58000001) #define MPI_MIN (MPI_Op)(0x58000002) #define MPI_SUM (MPI_Op)(0x58000003) #define MPI_PROD (MPI_Op)(0x58000004) #define MPI_LAND (MPI_Op)(0x58000005) #define MPI_BAND (MPI_Op)(0x58000006) #define MPI_LOR (MPI_Op)(0x58000007) #define MPI_BOR (MPI_Op)(0x58000008) #define MPI_LXOR (MPI_Op)(0x58000009) #define MPI_BXOR (MPI_Op)(0x5800000a) #define MPI_MINLOC (MPI_Op)(0x5800000b) #define MPI_MAXLOC (MPI_Op)(0x5800000c) #define MPI_REPLACE (MPI_Op)(0x5800000d) #define MPI_NO_OP (MPI_Op)(0x5800000e) /* Permanent key values */ /* C Versions (return pointer to value), Fortran Versions (return integer value). Handled directly by the attribute value routine DO NOT CHANGE THESE. The values encode: builtin kind (0x1 in bit 30-31) Keyval object (0x9 in bits 26-29) for communicator (0x1 in bits 22-25) Fortran versions of the attributes are formed by adding one to the C version. */ #define MPI_TAG_UB 0x64400001 #define MPI_HOST 0x64400003 #define MPI_IO 0x64400005 #define MPI_WTIME_IS_GLOBAL 0x64400007 #define MPI_UNIVERSE_SIZE 0x64400009 #define MPI_LASTUSEDCODE 0x6440000b #define MPI_APPNUM 0x6440000d /* In addition, there are 5 predefined window attributes that are defined for every window */ #define MPI_WIN_BASE 0x66000001 #define MPI_WIN_SIZE 0x66000003 #define MPI_WIN_DISP_UNIT 0x66000005 #define MPI_WIN_CREATE_FLAVOR 0x66000007 #define MPI_WIN_MODEL 0x66000009 #ifdef MPICH_DEFINE_ATTR_TYPE_TYPES static const MPI_Datatype mpich_mpi_datatype_null MPICH_ATTR_TYPE_TAG_MUST_BE_NULL() = MPI_DATATYPE_NULL; #endif # 351 "./src/include/mpi.h" /* These are only guesses; make sure you change them in mpif.h as well */ #define MPI_MAX_PROCESSOR_NAME 128 #define MPI_MAX_LIBRARY_VERSION_STRING 8192 #define MPI_MAX_ERROR_STRING 512 #define MPI_MAX_PORT_NAME 256 #define MPI_MAX_OBJECT_NAME 128 /* Pre-defined constants */ #define MPI_UNDEFINED (-32766) #define MPI_KEYVAL_INVALID 0x24000000 /* MPI-3 window flavors */ typedef enum MPIR_Win_flavor { MPI_WIN_FLAVOR_CREATE = 1, MPI_WIN_FLAVOR_ALLOCATE = 2, MPI_WIN_FLAVOR_DYNAMIC = 3, MPI_WIN_FLAVOR_SHARED = 4 } MPIR_Win_flavor_t; /* MPI-3 window consistency models */ typedef enum MPIR_Win_model { MPI_WIN_SEPARATE = 1, MPI_WIN_UNIFIED = 2 } MPIR_Win_model_t; /* Upper bound on the overhead in bsend for each message buffer */ #define MPI_BSEND_OVERHEAD 96 /* Topology types */ typedef enum MPIR_Topo_type { MPI_GRAPH=1, MPI_CART=2, MPI_DIST_GRAPH=3 } MPIR_Topo_type; #define MPI_BOTTOM (void *)0 extern int * const MPI_UNWEIGHTED; extern int * const MPI_WEIGHTS_EMPTY; #define MPI_PROC_NULL (-1) #define MPI_ANY_SOURCE (-2) #define MPI_ROOT (-3) #define MPI_ANY_TAG (-1) #define MPI_LOCK_EXCLUSIVE 234 #define MPI_LOCK_SHARED 235 /* C functions */ typedef void (MPI_Handler_function) ( MPI_Comm *, int *, ... ); typedef int (MPI_Comm_copy_attr_function)(MPI_Comm, int, void *, void *, void *, int *); typedef int (MPI_Comm_delete_attr_function)(MPI_Comm, int, void *, void *); typedef int (MPI_Type_copy_attr_function)(MPI_Datatype, int, void *, void *, void *, int *); typedef int (MPI_Type_delete_attr_function)(MPI_Datatype, int, void *, void *); typedef int (MPI_Win_copy_attr_function)(MPI_Win, int, void *, void *, void *, int *); typedef int (MPI_Win_delete_attr_function)(MPI_Win, int, void *, void *); /* added in MPI-2.2 */ typedef void (MPI_Comm_errhandler_function)(MPI_Comm *, int *, ...); typedef void (MPI_File_errhandler_function)(MPI_File *, int *, ...); typedef void (MPI_Win_errhandler_function)(MPI_Win *, int *, ...); /* names that were added in MPI-2.0 and deprecated in MPI-2.2 */ typedef MPI_Comm_errhandler_function MPI_Comm_errhandler_fn; typedef MPI_File_errhandler_function MPI_File_errhandler_fn; typedef MPI_Win_errhandler_function MPI_Win_errhandler_fn; /* Built in (0x1 in 30-31), errhandler (0x5 in bits 26-29, allkind (0 in 22-25), index in the low bits */ #define MPI_ERRORS_ARE_FATAL ((MPI_Errhandler)0x54000000) #define MPI_ERRORS_RETURN ((MPI_Errhandler)0x54000001) /* MPIR_ERRORS_THROW_EXCEPTIONS is not part of the MPI standard, it is here to facilitate the c++ binding which has MPI::ERRORS_THROW_EXCEPTIONS. Using the MPIR prefix preserved the MPI_ names for objects defined by the standard. */ #define MPIR_ERRORS_THROW_EXCEPTIONS ((MPI_Errhandler)0x54000002) typedef int MPI_Errhandler; /* Make the C names for the dup function mixed case. This is required for systems that use all uppercase names for Fortran externals. */ /* MPI 1 names */ #define MPI_NULL_COPY_FN ((MPI_Copy_function *)0) #define MPI_NULL_DELETE_FN ((MPI_Delete_function *)0) #define MPI_DUP_FN MPIR_Dup_fn /* MPI 2 names */ #define MPI_COMM_NULL_COPY_FN ((MPI_Comm_copy_attr_function*)0) #define MPI_COMM_NULL_DELETE_FN ((MPI_Comm_delete_attr_function*)0) #define MPI_COMM_DUP_FN ((MPI_Comm_copy_attr_function *)MPI_DUP_FN) #define MPI_WIN_NULL_COPY_FN ((MPI_Win_copy_attr_function*)0) #define MPI_WIN_NULL_DELETE_FN ((MPI_Win_delete_attr_function*)0) #define MPI_WIN_DUP_FN ((MPI_Win_copy_attr_function*)MPI_DUP_FN) #define MPI_TYPE_NULL_COPY_FN ((MPI_Type_copy_attr_function*)0) #define MPI_TYPE_NULL_DELETE_FN ((MPI_Type_delete_attr_function*)0) #define MPI_TYPE_DUP_FN ((MPI_Type_copy_attr_function*)MPI_DUP_FN) /* MPI request opjects */ typedef int MPI_Request; /* MPI message objects for Mprobe and related functions */ typedef int MPI_Message; /* User combination function */ typedef void (MPI_User_function) ( void *, void *, int *, MPI_Datatype * ); /* MPI Attribute copy and delete functions */ typedef int (MPI_Copy_function) ( MPI_Comm, int, void *, void *, void *, int * ); typedef int (MPI_Delete_function) ( MPI_Comm, int, void *, void * ); #define MPI_VERSION 3 #define MPI_SUBVERSION 1 #define MPICH_NAME 3 #define MPICH 1 #define MPICH_HAS_C2F 1 /* MPICH_VERSION is the version string. MPICH_NUMVERSION is the * numeric version that can be used in numeric comparisons. * * MPICH_VERSION uses the following format: * Version: [MAJ].[MIN].[REV][EXT][EXT_NUMBER] * Example: 1.0.7rc1 has * MAJ = 1 * MIN = 0 * REV = 7 * EXT = rc * EXT_NUMBER = 1 * * MPICH_NUMVERSION will convert EXT to a format number: * ALPHA (a) = 0 * BETA (b) = 1 * RC (rc) = 2 * PATCH (p) = 3 * Regular releases are treated as patch 0 * * Numeric version will have 1 digit for MAJ, 2 digits for MIN, 2 * digits for REV, 1 digit for EXT and 2 digits for EXT_NUMBER. So, * 1.0.7rc1 will have the numeric version 10007201. */ #define MPICH_VERSION "3.3a1" #define MPICH_NUMVERSION 30300001 #define MPICH_RELEASE_TYPE_ALPHA 0 #define MPICH_RELEASE_TYPE_BETA 1 #define MPICH_RELEASE_TYPE_RC 2 #define MPICH_RELEASE_TYPE_PATCH 3 #define MPICH_CALC_VERSION(MAJOR, MINOR, REVISION, TYPE, PATCH) \ (((MAJOR) * 10000000) + ((MINOR) * 100000) + ((REVISION) * 1000) + ((TYPE) * 100) + (PATCH)) /* for the datatype decoders */ enum MPIR_Combiner_enum { MPI_COMBINER_NAMED = 1, MPI_COMBINER_DUP = 2, MPI_COMBINER_CONTIGUOUS = 3, MPI_COMBINER_VECTOR = 4, MPI_COMBINER_HVECTOR_INTEGER = 5, MPI_COMBINER_HVECTOR = 6, MPI_COMBINER_INDEXED = 7, MPI_COMBINER_HINDEXED_INTEGER = 8, MPI_COMBINER_HINDEXED = 9, MPI_COMBINER_INDEXED_BLOCK = 10, MPI_COMBINER_STRUCT_INTEGER = 11, MPI_COMBINER_STRUCT = 12, MPI_COMBINER_SUBARRAY = 13, MPI_COMBINER_DARRAY = 14, MPI_COMBINER_F90_REAL = 15, MPI_COMBINER_F90_COMPLEX = 16, MPI_COMBINER_F90_INTEGER = 17, MPI_COMBINER_RESIZED = 18, MPI_COMBINER_HINDEXED_BLOCK = 19 }; /* for info */ typedef int MPI_Info; #define MPI_INFO_NULL ((MPI_Info)0x1c000000) #define MPI_INFO_ENV ((MPI_Info)0x5c000001) #define MPI_MAX_INFO_KEY 255 #define MPI_MAX_INFO_VAL 1024 /* for subarray and darray constructors */ #define MPI_ORDER_C 56 #define MPI_ORDER_FORTRAN 57 #define MPI_DISTRIBUTE_BLOCK 121 #define MPI_DISTRIBUTE_CYCLIC 122 #define MPI_DISTRIBUTE_NONE 123 #define MPI_DISTRIBUTE_DFLT_DARG -49767 #define MPI_IN_PLACE (void *) -1 /* asserts for one-sided communication */ #define MPI_MODE_NOCHECK 1024 #define MPI_MODE_NOSTORE 2048 #define MPI_MODE_NOPUT 4096 #define MPI_MODE_NOPRECEDE 8192 #define MPI_MODE_NOSUCCEED 16384 /* predefined types for MPI_Comm_split_type */ #define MPI_COMM_TYPE_SHARED 1 /* MPICH-specific types */ #define MPIX_COMM_TYPE_NEIGHBORHOOD 2 /* Definitions that are determined by configure. */ typedef long MPI_Aint; typedef int MPI_Fint; typedef long long MPI_Count; #ifdef MPICH_DEFINE_ATTR_TYPE_TYPES static const MPI_Datatype mpich_mpi_aint MPICH_ATTR_TYPE_TAG(MPI_Aint) = MPI_AINT; #endif # 559 "./src/include/mpi.h" /* FIXME: The following two definition are not defined by MPI and must not be included in the mpi.h file, as the MPI namespace is reserved to the MPI standard */ #define MPI_AINT_FMT_DEC_SPEC "%ld" #define MPI_AINT_FMT_HEX_SPEC "%lx" /* Let ROMIO know that MPI_Offset is already defined */ #define HAVE_MPI_OFFSET /* MPI_OFFSET_TYPEDEF is set in configure and is typedef $MPI_OFFSET MPI_Offset; where $MPI_OFFSET is the correct C type */ typedef long long MPI_Offset; #ifdef MPICH_DEFINE_ATTR_TYPE_TYPES static const MPI_Datatype mpich_mpi_offset MPICH_ATTR_TYPE_TAG(MPI_Offset) = MPI_OFFSET; #endif # 576 "./src/include/mpi.h" /* The order of these elements must match that in mpif.h, mpi_f08_types.f90, and mpi_c_interface_types.f90 */ typedef struct MPI_Status { int count_lo; int count_hi_and_cancelled; int MPI_SOURCE; int MPI_TAG; int MPI_ERROR; } MPI_Status; /* types for the MPI_T_ interface */ struct MPIR_T_enum_s; struct MPIR_T_cvar_handle_s; struct MPIR_T_pvar_handle_s; struct MPIR_T_pvar_session_s; typedef struct MPIR_T_enum_s * MPI_T_enum; typedef struct MPIR_T_cvar_handle_s * MPI_T_cvar_handle; typedef struct MPIR_T_pvar_handle_s * MPI_T_pvar_handle; typedef struct MPIR_T_pvar_session_s * MPI_T_pvar_session; /* extra const at front would be safer, but is incompatible with MPI_T_ prototypes */ extern struct MPIR_T_pvar_handle_s * const MPI_T_PVAR_ALL_HANDLES; #define MPI_T_ENUM_NULL ((MPI_T_enum)NULL) #define MPI_T_CVAR_HANDLE_NULL ((MPI_T_cvar_handle)NULL) #define MPI_T_PVAR_HANDLE_NULL ((MPI_T_pvar_handle)NULL) #define MPI_T_PVAR_SESSION_NULL ((MPI_T_pvar_session)NULL) /* the MPI_T_ interface requires that these VERBOSITY constants occur in this * relative order with increasing values */ typedef enum MPIR_T_verbosity_t { /* don't name-shift this if/when MPI_T_ is accepted, this is an MPICH-only * extension */ MPIX_T_VERBOSITY_INVALID = 0, /* arbitrarily shift values to aid debugging and reduce accidental errors */ MPI_T_VERBOSITY_USER_BASIC = 221, MPI_T_VERBOSITY_USER_DETAIL, MPI_T_VERBOSITY_USER_ALL, MPI_T_VERBOSITY_TUNER_BASIC, MPI_T_VERBOSITY_TUNER_DETAIL, MPI_T_VERBOSITY_TUNER_ALL, MPI_T_VERBOSITY_MPIDEV_BASIC, MPI_T_VERBOSITY_MPIDEV_DETAIL, MPI_T_VERBOSITY_MPIDEV_ALL } MPIR_T_verbosity_t; typedef enum MPIR_T_bind_t { /* don't name-shift this if/when MPI_T_ is accepted, this is an MPICH-only * extension */ MPIX_T_BIND_INVALID = 0, /* arbitrarily shift values to aid debugging and reduce accidental errors */ MPI_T_BIND_NO_OBJECT = 9700, MPI_T_BIND_MPI_COMM, MPI_T_BIND_MPI_DATATYPE, MPI_T_BIND_MPI_ERRHANDLER, MPI_T_BIND_MPI_FILE, MPI_T_BIND_MPI_GROUP, MPI_T_BIND_MPI_OP, MPI_T_BIND_MPI_REQUEST, MPI_T_BIND_MPI_WIN, MPI_T_BIND_MPI_MESSAGE, MPI_T_BIND_MPI_INFO } MPIR_T_bind_t; typedef enum MPIR_T_scope_t { /* don't name-shift this if/when MPI_T_ is accepted, this is an MPICH-only * extension */ MPIX_T_SCOPE_INVALID = 0, /* arbitrarily shift values to aid debugging and reduce accidental errors */ MPI_T_SCOPE_CONSTANT = 60438, MPI_T_SCOPE_READONLY, MPI_T_SCOPE_LOCAL, MPI_T_SCOPE_GROUP, MPI_T_SCOPE_GROUP_EQ, MPI_T_SCOPE_ALL, MPI_T_SCOPE_ALL_EQ } MPIR_T_scope_t; typedef enum MPIR_T_pvar_class_t { /* don't name-shift this if/when MPI_T_ is accepted, this is an MPICH-only * extension */ MPIX_T_PVAR_CLASS_INVALID = 0, /* arbitrarily shift values to aid debugging and reduce accidental errors */ MPIR_T_PVAR_CLASS_FIRST = 240, MPI_T_PVAR_CLASS_STATE = MPIR_T_PVAR_CLASS_FIRST, MPI_T_PVAR_CLASS_LEVEL, MPI_T_PVAR_CLASS_SIZE, MPI_T_PVAR_CLASS_PERCENTAGE, MPI_T_PVAR_CLASS_HIGHWATERMARK, MPI_T_PVAR_CLASS_LOWWATERMARK, MPI_T_PVAR_CLASS_COUNTER, MPI_T_PVAR_CLASS_AGGREGATE, MPI_T_PVAR_CLASS_TIMER, MPI_T_PVAR_CLASS_GENERIC, MPIR_T_PVAR_CLASS_LAST, MPIR_T_PVAR_CLASS_NUMBER = MPIR_T_PVAR_CLASS_LAST - MPIR_T_PVAR_CLASS_FIRST } MPIR_T_pvar_class_t; /* Handle conversion types/functions */ /* Programs that need to convert types used in MPICH should use these */ #define MPI_Comm_c2f(comm) (MPI_Fint)(comm) #define MPI_Comm_f2c(comm) (MPI_Comm)(comm) #define MPI_Type_c2f(datatype) (MPI_Fint)(datatype) #define MPI_Type_f2c(datatype) (MPI_Datatype)(datatype) #define MPI_Group_c2f(group) (MPI_Fint)(group) #define MPI_Group_f2c(group) (MPI_Group)(group) #define MPI_Info_c2f(info) (MPI_Fint)(info) #define MPI_Info_f2c(info) (MPI_Info)(info) #define MPI_Request_f2c(request) (MPI_Request)(request) #define MPI_Request_c2f(request) (MPI_Fint)(request) #define MPI_Op_c2f(op) (MPI_Fint)(op) #define MPI_Op_f2c(op) (MPI_Op)(op) #define MPI_Errhandler_c2f(errhandler) (MPI_Fint)(errhandler) #define MPI_Errhandler_f2c(errhandler) (MPI_Errhandler)(errhandler) #define MPI_Win_c2f(win) (MPI_Fint)(win) #define MPI_Win_f2c(win) (MPI_Win)(win) #define MPI_Message_c2f(msg) ((MPI_Fint)(msg)) #define MPI_Message_f2c(msg) ((MPI_Message)(msg)) /* PMPI versions of the handle transfer functions. See section 4.17 */ #define PMPI_Comm_c2f(comm) (MPI_Fint)(comm) #define PMPI_Comm_f2c(comm) (MPI_Comm)(comm) #define PMPI_Type_c2f(datatype) (MPI_Fint)(datatype) #define PMPI_Type_f2c(datatype) (MPI_Datatype)(datatype) #define PMPI_Group_c2f(group) (MPI_Fint)(group) #define PMPI_Group_f2c(group) (MPI_Group)(group) #define PMPI_Info_c2f(info) (MPI_Fint)(info) #define PMPI_Info_f2c(info) (MPI_Info)(info) #define PMPI_Request_f2c(request) (MPI_Request)(request) #define PMPI_Request_c2f(request) (MPI_Fint)(request) #define PMPI_Op_c2f(op) (MPI_Fint)(op) #define PMPI_Op_f2c(op) (MPI_Op)(op) #define PMPI_Errhandler_c2f(errhandler) (MPI_Fint)(errhandler) #define PMPI_Errhandler_f2c(errhandler) (MPI_Errhandler)(errhandler) #define PMPI_Win_c2f(win) (MPI_Fint)(win) #define PMPI_Win_f2c(win) (MPI_Win)(win) #define PMPI_Message_c2f(msg) ((MPI_Fint)(msg)) #define PMPI_Message_f2c(msg) ((MPI_Message)(msg)) #define MPI_STATUS_IGNORE (MPI_Status *)1 #define MPI_STATUSES_IGNORE (MPI_Status *)1 #define MPI_ERRCODES_IGNORE (int *)0 /* See 4.12.5 for MPI_F_STATUS(ES)_IGNORE */ #define MPIU_DLL_SPEC extern MPIU_DLL_SPEC MPI_Fint * MPI_F_STATUS_IGNORE; extern MPIU_DLL_SPEC MPI_Fint * MPI_F_STATUSES_IGNORE; /* The annotation MPIU_DLL_SPEC to the extern statements is used as a hook for systems that require C extensions to correctly construct DLLs, and is defined as an empty string otherwise */ /* The MPI standard requires that the ARGV_NULL values be the same as NULL (see 5.3.2) */ #define MPI_ARGV_NULL (char **)0 #define MPI_ARGVS_NULL (char ***)0 /* C type for MPI_STATUS in F08. The field order should match that in mpi_f08_types.f90, and mpi_c_interface_types.f90. */ typedef struct { MPI_Fint count_lo; MPI_Fint count_hi_and_cancelled; MPI_Fint MPI_SOURCE; MPI_Fint MPI_TAG; MPI_Fint MPI_ERROR; } MPI_F08_Status; extern MPI_F08_Status MPIR_F08_MPI_STATUS_IGNORE_OBJ; extern MPI_F08_Status MPIR_F08_MPI_STATUSES_IGNORE_OBJ[1]; extern int MPIR_F08_MPI_IN_PLACE; extern int MPIR_F08_MPI_BOTTOM; /* Pointers to above objects */ extern MPI_F08_Status *MPI_F08_STATUS_IGNORE; extern MPI_F08_Status *MPI_F08_STATUSES_IGNORE; /* For supported thread levels */ #define MPI_THREAD_SINGLE 0 #define MPI_THREAD_FUNNELED 1 #define MPI_THREAD_SERIALIZED 2 #define MPI_THREAD_MULTIPLE 3 /* Typedefs for generalized requests */ typedef int (MPI_Grequest_cancel_function)(void *, int); typedef int (MPI_Grequest_free_function)(void *); typedef int (MPI_Grequest_query_function)(void *, MPI_Status *); typedef int (MPIX_Grequest_poll_function)(void *, MPI_Status *); typedef int (MPIX_Grequest_wait_function)(int, void **, double, MPI_Status *); /* MPI's error classes */ #define MPI_SUCCESS 0 /* Successful return code */ /* Communication argument parameters */ #define MPI_ERR_BUFFER 1 /* Invalid buffer pointer */ #define MPI_ERR_COUNT 2 /* Invalid count argument */ #define MPI_ERR_TYPE 3 /* Invalid datatype argument */ #define MPI_ERR_TAG 4 /* Invalid tag argument */ #define MPI_ERR_COMM 5 /* Invalid communicator */ #define MPI_ERR_RANK 6 /* Invalid rank */ #define MPI_ERR_ROOT 7 /* Invalid root */ #define MPI_ERR_TRUNCATE 14 /* Message truncated on receive */ /* MPI Objects (other than COMM) */ #define MPI_ERR_GROUP 8 /* Invalid group */ #define MPI_ERR_OP 9 /* Invalid operation */ #define MPI_ERR_REQUEST 19 /* Invalid mpi_request handle */ /* Special topology argument parameters */ #define MPI_ERR_TOPOLOGY 10 /* Invalid topology */ #define MPI_ERR_DIMS 11 /* Invalid dimension argument */ /* All other arguments. This is a class with many kinds */ #define MPI_ERR_ARG 12 /* Invalid argument */ /* Other errors that are not simply an invalid argument */ #define MPI_ERR_OTHER 15 /* Other error; use Error_string */ #define MPI_ERR_UNKNOWN 13 /* Unknown error */ #define MPI_ERR_INTERN 16 /* Internal error code */ /* Multiple completion has three special error classes */ #define MPI_ERR_IN_STATUS 17 /* Look in status for error value */ #define MPI_ERR_PENDING 18 /* Pending request */ /* New MPI-2 Error classes */ #define MPI_ERR_ACCESS 20 /* */ #define MPI_ERR_AMODE 21 /* */ #define MPI_ERR_BAD_FILE 22 /* */ #define MPI_ERR_CONVERSION 23 /* */ #define MPI_ERR_DUP_DATAREP 24 /* */ #define MPI_ERR_FILE_EXISTS 25 /* */ #define MPI_ERR_FILE_IN_USE 26 /* */ #define MPI_ERR_FILE 27 /* */ #define MPI_ERR_IO 32 /* */ #define MPI_ERR_NO_SPACE 36 /* */ #define MPI_ERR_NO_SUCH_FILE 37 /* */ #define MPI_ERR_READ_ONLY 40 /* */ #define MPI_ERR_UNSUPPORTED_DATAREP 43 /* */ /* MPI_ERR_INFO is NOT defined in the MPI-2 standard. I believe that this is an oversight */ #define MPI_ERR_INFO 28 /* */ #define MPI_ERR_INFO_KEY 29 /* */ #define MPI_ERR_INFO_VALUE 30 /* */ #define MPI_ERR_INFO_NOKEY 31 /* */ #define MPI_ERR_NAME 33 /* */ #define MPI_ERR_NO_MEM 34 /* Alloc_mem could not allocate memory */ #define MPI_ERR_NOT_SAME 35 /* */ #define MPI_ERR_PORT 38 /* */ #define MPI_ERR_QUOTA 39 /* */ #define MPI_ERR_SERVICE 41 /* */ #define MPI_ERR_SPAWN 42 /* */ #define MPI_ERR_UNSUPPORTED_OPERATION 44 /* */ #define MPI_ERR_WIN 45 /* */ #define MPI_ERR_BASE 46 /* */ #define MPI_ERR_LOCKTYPE 47 /* */ #define MPI_ERR_KEYVAL 48 /* Erroneous attribute key */ #define MPI_ERR_RMA_CONFLICT 49 /* */ #define MPI_ERR_RMA_SYNC 50 /* */ #define MPI_ERR_SIZE 51 /* */ #define MPI_ERR_DISP 52 /* */ #define MPI_ERR_ASSERT 53 /* */ #define MPI_ERR_RMA_RANGE 55 /* */ #define MPI_ERR_RMA_ATTACH 56 /* */ #define MPI_ERR_RMA_SHARED 57 /* */ #define MPI_ERR_RMA_FLAVOR 58 /* */ /* Return codes for functions in the MPI Tool Information Interface */ #define MPI_T_ERR_MEMORY 59 /* Out of memory */ #define MPI_T_ERR_NOT_INITIALIZED 60 /* Interface not initialized */ #define MPI_T_ERR_CANNOT_INIT 61 /* Interface not in the state to be initialized */ #define MPI_T_ERR_INVALID_INDEX 62 /* The index is invalid or has been deleted */ #define MPI_T_ERR_INVALID_ITEM 63 /* Item index queried is out of range */ #define MPI_T_ERR_INVALID_HANDLE 64 /* The handle is invalid */ #define MPI_T_ERR_OUT_OF_HANDLES 65 /* No more handles available */ #define MPI_T_ERR_OUT_OF_SESSIONS 66 /* No more sessions available */ #define MPI_T_ERR_INVALID_SESSION 67 /* Session argument is not valid */ #define MPI_T_ERR_CVAR_SET_NOT_NOW 68 /* Cvar can't be set at this moment */ #define MPI_T_ERR_CVAR_SET_NEVER 69 /* Cvar can't be set until end of execution */ #define MPI_T_ERR_PVAR_NO_STARTSTOP 70 /* Pvar can't be started or stopped */ #define MPI_T_ERR_PVAR_NO_WRITE 71 /* Pvar can't be written or reset */ #define MPI_T_ERR_PVAR_NO_ATOMIC 72 /* Pvar can't be R/W atomically */ #define MPI_T_ERR_INVALID_NAME 73 /* Name doesn't match */ #define MPI_T_ERR_INVALID 74 /* Generic error code for MPI_T added in MPI-3.1 */ #define MPI_ERR_LASTCODE 0x3fffffff /* Last valid error code for a predefined error class */ #define MPICH_ERR_LAST_CLASS 74 /* It is also helpful to know the last valid class */ #define MPICH_ERR_FIRST_MPIX 100 /* Define a gap here because sock is * already using some of the values in this * range. All MPIX error codes will be * above this value to be ABI complaint. */ #define MPIX_ERR_PROC_FAILED MPICH_ERR_FIRST_MPIX+1 /* Process failure */ #define MPIX_ERR_PROC_FAILED_PENDING MPICH_ERR_FIRST_MPIX+2 /* A failure has caused this request * to be pending */ #define MPIX_ERR_REVOKED MPICH_ERR_FIRST_MPIX+3 /* The communciation object has been revoked */ #define MPICH_ERR_LAST_MPIX MPICH_ERR_FIRST_MPIX+3 /* End of MPI's error classes */ /* Function type defs */ typedef int (MPI_Datarep_conversion_function)(void *, MPI_Datatype, int, void *, MPI_Offset, void *); typedef int (MPI_Datarep_extent_function)(MPI_Datatype datatype, MPI_Aint *, void *); #define MPI_CONVERSION_FN_NULL ((MPI_Datarep_conversion_function *)0) /* For systems that may need to add additional definitions to support different declaration styles and options (e.g., different calling conventions or DLL import/export controls). */ /* --Insert Additional Definitions Here-- */ /* * Normally, we provide prototypes for all MPI routines. In a few weird * cases, we need to suppress the prototypes. */ #ifndef MPICH_SUPPRESS_PROTOTYPES /* We require that the C compiler support prototypes */ /* Begin Prototypes */ int MPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Get_count(const MPI_Status *status, MPI_Datatype datatype, int *count); int MPI_Bsend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Rsend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Buffer_attach(void *buffer, int size); int MPI_Buffer_detach(void *buffer_addr, int *size); int MPI_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Ibsend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Issend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Irsend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Irecv(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Wait(MPI_Request *request, MPI_Status *status); int MPI_Test(MPI_Request *request, int *flag, MPI_Status *status); int MPI_Request_free(MPI_Request *request); int MPI_Waitany(int count, MPI_Request array_of_requests[], int *indx, MPI_Status *status); int MPI_Testany(int count, MPI_Request array_of_requests[], int *indx, int *flag, MPI_Status *status); int MPI_Waitall(int count, MPI_Request array_of_requests[], MPI_Status array_of_statuses[]); int MPI_Testall(int count, MPI_Request array_of_requests[], int *flag, MPI_Status array_of_statuses[]); int MPI_Waitsome(int incount, MPI_Request array_of_requests[], int *outcount, int array_of_indices[], MPI_Status array_of_statuses[]); int MPI_Testsome(int incount, MPI_Request array_of_requests[], int *outcount, int array_of_indices[], MPI_Status array_of_statuses[]); int MPI_Iprobe(int source, int tag, MPI_Comm comm, int *flag, MPI_Status *status); int MPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status); int MPI_Cancel(MPI_Request *request); int MPI_Test_cancelled(const MPI_Status *status, int *flag); int MPI_Send_init(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Bsend_init(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Ssend_init(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Rsend_init(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Recv_init(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Start(MPI_Request *request); int MPI_Startall(int count, MPI_Request array_of_requests[]); int MPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, int dest, int sendtag, void *recvbuf, int recvcount, MPI_Datatype recvtype, int source, int recvtag, MPI_Comm comm, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(6,8); int MPI_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype, int dest, int sendtag, int source, int recvtag, MPI_Comm comm, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Type_contiguous(int count, MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_vector(int count, int blocklength, int stride, MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_hvector(int count, int blocklength, MPI_Aint stride, MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_indexed(int count, const int *array_of_blocklengths, const int *array_of_displacements, MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_hindexed(int count, int *array_of_blocklengths, MPI_Aint *array_of_displacements, MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_struct(int count, int *array_of_blocklengths, MPI_Aint *array_of_displacements, MPI_Datatype *array_of_types, MPI_Datatype *newtype); int MPI_Address(void *location, MPI_Aint *address); int MPI_Type_extent(MPI_Datatype datatype, MPI_Aint *extent); int MPI_Type_size(MPI_Datatype datatype, int *size); int MPI_Type_lb(MPI_Datatype datatype, MPI_Aint *displacement); int MPI_Type_ub(MPI_Datatype datatype, MPI_Aint *displacement); int MPI_Type_commit(MPI_Datatype *datatype); int MPI_Type_free(MPI_Datatype *datatype); int MPI_Get_elements(const MPI_Status *status, MPI_Datatype datatype, int *count); int MPI_Pack(const void *inbuf, int incount, MPI_Datatype datatype, void *outbuf, int outsize, int *position, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Unpack(const void *inbuf, int insize, int *position, void *outbuf, int outcount, MPI_Datatype datatype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Pack_size(int incount, MPI_Datatype datatype, MPI_Comm comm, int *size); int MPI_Barrier(MPI_Comm comm); int MPI_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int MPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,7); int MPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int MPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Alltoallv(const void *sendbuf, const int *sendcounts, const int *sdispls, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *rdispls, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,8); int MPI_Alltoallw(const void *sendbuf, const int sendcounts[], const int sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const int rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm); int MPI_Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Op_create(MPI_User_function *user_fn, int commute, MPI_Op *op); int MPI_Op_free(MPI_Op *op); int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[], MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Scan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Group_size(MPI_Group group, int *size); int MPI_Group_rank(MPI_Group group, int *rank); int MPI_Group_translate_ranks(MPI_Group group1, int n, const int ranks1[], MPI_Group group2, int ranks2[]); int MPI_Group_compare(MPI_Group group1, MPI_Group group2, int *result); int MPI_Comm_group(MPI_Comm comm, MPI_Group *group); int MPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup); int MPI_Group_intersection(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup); int MPI_Group_difference(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup); int MPI_Group_incl(MPI_Group group, int n, const int ranks[], MPI_Group *newgroup); int MPI_Group_excl(MPI_Group group, int n, const int ranks[], MPI_Group *newgroup); int MPI_Group_range_incl(MPI_Group group, int n, int ranges[][3], MPI_Group *newgroup); int MPI_Group_range_excl(MPI_Group group, int n, int ranges[][3], MPI_Group *newgroup); int MPI_Group_free(MPI_Group *group); int MPI_Comm_size(MPI_Comm comm, int *size); int MPI_Comm_rank(MPI_Comm comm, int *rank); int MPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, int *result); int MPI_Comm_dup(MPI_Comm comm, MPI_Comm *newcomm); int MPI_Comm_dup_with_info(MPI_Comm comm, MPI_Info info, MPI_Comm *newcomm); int MPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm *newcomm); int MPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm); int MPI_Comm_free(MPI_Comm *comm); int MPI_Comm_test_inter(MPI_Comm comm, int *flag); int MPI_Comm_remote_size(MPI_Comm comm, int *size); int MPI_Comm_remote_group(MPI_Comm comm, MPI_Group *group); int MPI_Intercomm_create(MPI_Comm local_comm, int local_leader, MPI_Comm peer_comm, int remote_leader, int tag, MPI_Comm *newintercomm); int MPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm *newintracomm); int MPI_Keyval_create(MPI_Copy_function *copy_fn, MPI_Delete_function *delete_fn, int *keyval, void *extra_state); int MPI_Keyval_free(int *keyval); int MPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val); int MPI_Attr_get(MPI_Comm comm, int keyval, void *attribute_val, int *flag); int MPI_Attr_delete(MPI_Comm comm, int keyval); int MPI_Topo_test(MPI_Comm comm, int *status); int MPI_Cart_create(MPI_Comm comm_old, int ndims, const int dims[], const int periods[], int reorder, MPI_Comm *comm_cart); int MPI_Dims_create(int nnodes, int ndims, int dims[]); int MPI_Graph_create(MPI_Comm comm_old, int nnodes, const int indx[], const int edges[], int reorder, MPI_Comm *comm_graph); int MPI_Graphdims_get(MPI_Comm comm, int *nnodes, int *nedges); int MPI_Graph_get(MPI_Comm comm, int maxindex, int maxedges, int indx[], int edges[]); int MPI_Cartdim_get(MPI_Comm comm, int *ndims); int MPI_Cart_get(MPI_Comm comm, int maxdims, int dims[], int periods[], int coords[]); int MPI_Cart_rank(MPI_Comm comm, const int coords[], int *rank); int MPI_Cart_coords(MPI_Comm comm, int rank, int maxdims, int coords[]); int MPI_Graph_neighbors_count(MPI_Comm comm, int rank, int *nneighbors); int MPI_Graph_neighbors(MPI_Comm comm, int rank, int maxneighbors, int neighbors[]); int MPI_Cart_shift(MPI_Comm comm, int direction, int disp, int *rank_source, int *rank_dest); int MPI_Cart_sub(MPI_Comm comm, const int remain_dims[], MPI_Comm *newcomm); int MPI_Cart_map(MPI_Comm comm, int ndims, const int dims[], const int periods[], int *newrank); int MPI_Graph_map(MPI_Comm comm, int nnodes, const int indx[], const int edges[], int *newrank); int MPI_Get_processor_name(char *name, int *resultlen); int MPI_Get_version(int *version, int *subversion); int MPI_Get_library_version(char *version, int *resultlen); int MPI_Errhandler_create(MPI_Handler_function *function, MPI_Errhandler *errhandler); int MPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler); int MPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler *errhandler); int MPI_Errhandler_free(MPI_Errhandler *errhandler); int MPI_Error_string(int errorcode, char *string, int *resultlen); int MPI_Error_class(int errorcode, int *errorclass); double MPI_Wtime(void); double MPI_Wtick(void); int MPI_Init(int *argc, char ***argv); int MPI_Finalize(void); int MPI_Initialized(int *flag); int MPI_Abort(MPI_Comm comm, int errorcode); /* Note that we may need to define a @PCONTROL_LIST@ depending on whether stdargs are supported */ int MPI_Pcontrol(const int level, ...); int MPI_DUP_FN(MPI_Comm oldcomm, int keyval, void *extra_state, void *attribute_val_in, void *attribute_val_out, int *flag); /* Process Creation and Management */ int MPI_Close_port(const char *port_name); int MPI_Comm_accept(const char *port_name, MPI_Info info, int root, MPI_Comm comm, MPI_Comm *newcomm); int MPI_Comm_connect(const char *port_name, MPI_Info info, int root, MPI_Comm comm, MPI_Comm *newcomm); int MPI_Comm_disconnect(MPI_Comm *comm); int MPI_Comm_get_parent(MPI_Comm *parent); int MPI_Comm_join(int fd, MPI_Comm *intercomm); int MPI_Comm_spawn(const char *command, char *argv[], int maxprocs, MPI_Info info, int root, MPI_Comm comm, MPI_Comm *intercomm, int array_of_errcodes[]); int MPI_Comm_spawn_multiple(int count, char *array_of_commands[], char **array_of_argv[], const int array_of_maxprocs[], const MPI_Info array_of_info[], int root, MPI_Comm comm, MPI_Comm *intercomm, int array_of_errcodes[]); int MPI_Lookup_name(const char *service_name, MPI_Info info, char *port_name); int MPI_Open_port(MPI_Info info, char *port_name); int MPI_Publish_name(const char *service_name, MPI_Info info, const char *port_name); int MPI_Unpublish_name(const char *service_name, MPI_Info info, const char *port_name); int MPI_Comm_set_info(MPI_Comm comm, MPI_Info info); int MPI_Comm_get_info(MPI_Comm comm, MPI_Info *info); /* One-Sided Communications */ int MPI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Get(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Put(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Win_complete(MPI_Win win); int MPI_Win_create(void *base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, MPI_Win *win); int MPI_Win_fence(int assert, MPI_Win win); int MPI_Win_free(MPI_Win *win); int MPI_Win_get_group(MPI_Win win, MPI_Group *group); int MPI_Win_lock(int lock_type, int rank, int assert, MPI_Win win); int MPI_Win_post(MPI_Group group, int assert, MPI_Win win); int MPI_Win_start(MPI_Group group, int assert, MPI_Win win); int MPI_Win_test(MPI_Win win, int *flag); int MPI_Win_unlock(int rank, MPI_Win win); int MPI_Win_wait(MPI_Win win); /* MPI-3 One-Sided Communication Routines */ int MPI_Win_allocate(MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, void *baseptr, MPI_Win *win); int MPI_Win_allocate_shared(MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, void *baseptr, MPI_Win *win); int MPI_Win_shared_query(MPI_Win win, int rank, MPI_Aint *size, int *disp_unit, void *baseptr); int MPI_Win_create_dynamic(MPI_Info info, MPI_Comm comm, MPI_Win *win); int MPI_Win_attach(MPI_Win win, void *base, MPI_Aint size); int MPI_Win_detach(MPI_Win win, const void *base); int MPI_Win_get_info(MPI_Win win, MPI_Info *info_used); int MPI_Win_set_info(MPI_Win win, MPI_Info info); int MPI_Get_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Fetch_and_op(const void *origin_addr, void *result_addr, MPI_Datatype datatype, int target_rank, MPI_Aint target_disp, MPI_Op op, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Compare_and_swap(const void *origin_addr, const void *compare_addr, void *result_addr, MPI_Datatype datatype, int target_rank, MPI_Aint target_disp, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,4); int MPI_Rput(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Rget(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Raccumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Rget_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Win_lock_all(int assert, MPI_Win win); int MPI_Win_unlock_all(MPI_Win win); int MPI_Win_flush(int rank, MPI_Win win); int MPI_Win_flush_all(MPI_Win win); int MPI_Win_flush_local(int rank, MPI_Win win); int MPI_Win_flush_local_all(MPI_Win win); int MPI_Win_sync(MPI_Win win); /* External Interfaces */ int MPI_Add_error_class(int *errorclass); int MPI_Add_error_code(int errorclass, int *errorcode); int MPI_Add_error_string(int errorcode, const char *string); int MPI_Comm_call_errhandler(MPI_Comm comm, int errorcode); int MPI_Comm_create_keyval(MPI_Comm_copy_attr_function *comm_copy_attr_fn, MPI_Comm_delete_attr_function *comm_delete_attr_fn, int *comm_keyval, void *extra_state); int MPI_Comm_delete_attr(MPI_Comm comm, int comm_keyval); int MPI_Comm_free_keyval(int *comm_keyval); int MPI_Comm_get_attr(MPI_Comm comm, int comm_keyval, void *attribute_val, int *flag); int MPI_Comm_get_name(MPI_Comm comm, char *comm_name, int *resultlen); int MPI_Comm_set_attr(MPI_Comm comm, int comm_keyval, void *attribute_val); int MPI_Comm_set_name(MPI_Comm comm, const char *comm_name); int MPI_File_call_errhandler(MPI_File fh, int errorcode); int MPI_Grequest_complete(MPI_Request request); int MPI_Grequest_start(MPI_Grequest_query_function *query_fn, MPI_Grequest_free_function *free_fn, MPI_Grequest_cancel_function *cancel_fn, void *extra_state, MPI_Request *request); int MPI_Init_thread(int *argc, char ***argv, int required, int *provided); int MPI_Is_thread_main(int *flag); int MPI_Query_thread(int *provided); int MPI_Status_set_cancelled(MPI_Status *status, int flag); int MPI_Status_set_elements(MPI_Status *status, MPI_Datatype datatype, int count); int MPI_Type_create_keyval(MPI_Type_copy_attr_function *type_copy_attr_fn, MPI_Type_delete_attr_function *type_delete_attr_fn, int *type_keyval, void *extra_state); int MPI_Type_delete_attr(MPI_Datatype datatype, int type_keyval); int MPI_Type_dup(MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_free_keyval(int *type_keyval); int MPI_Type_get_attr(MPI_Datatype datatype, int type_keyval, void *attribute_val, int *flag); int MPI_Type_get_contents(MPI_Datatype datatype, int max_integers, int max_addresses, int max_datatypes, int array_of_integers[], MPI_Aint array_of_addresses[], MPI_Datatype array_of_datatypes[]); int MPI_Type_get_envelope(MPI_Datatype datatype, int *num_integers, int *num_addresses, int *num_datatypes, int *combiner); int MPI_Type_get_name(MPI_Datatype datatype, char *type_name, int *resultlen); int MPI_Type_set_attr(MPI_Datatype datatype, int type_keyval, void *attribute_val); int MPI_Type_set_name(MPI_Datatype datatype, const char *type_name); int MPI_Type_match_size(int typeclass, int size, MPI_Datatype *datatype); int MPI_Win_call_errhandler(MPI_Win win, int errorcode); int MPI_Win_create_keyval(MPI_Win_copy_attr_function *win_copy_attr_fn, MPI_Win_delete_attr_function *win_delete_attr_fn, int *win_keyval, void *extra_state); int MPI_Win_delete_attr(MPI_Win win, int win_keyval); int MPI_Win_free_keyval(int *win_keyval); int MPI_Win_get_attr(MPI_Win win, int win_keyval, void *attribute_val, int *flag); int MPI_Win_get_name(MPI_Win win, char *win_name, int *resultlen); int MPI_Win_set_attr(MPI_Win win, int win_keyval, void *attribute_val); int MPI_Win_set_name(MPI_Win win, const char *win_name); int MPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr); int MPI_Comm_create_errhandler(MPI_Comm_errhandler_function *comm_errhandler_fn, MPI_Errhandler *errhandler); int MPI_Comm_get_errhandler(MPI_Comm comm, MPI_Errhandler *errhandler); int MPI_Comm_set_errhandler(MPI_Comm comm, MPI_Errhandler errhandler); int MPI_File_create_errhandler(MPI_File_errhandler_function *file_errhandler_fn, MPI_Errhandler *errhandler); int MPI_File_get_errhandler(MPI_File file, MPI_Errhandler *errhandler); int MPI_File_set_errhandler(MPI_File file, MPI_Errhandler errhandler); int MPI_Finalized(int *flag); int MPI_Free_mem(void *base); int MPI_Get_address(const void *location, MPI_Aint *address); int MPI_Info_create(MPI_Info *info); int MPI_Info_delete(MPI_Info info, const char *key); int MPI_Info_dup(MPI_Info info, MPI_Info *newinfo); int MPI_Info_free(MPI_Info *info); int MPI_Info_get(MPI_Info info, const char *key, int valuelen, char *value, int *flag); int MPI_Info_get_nkeys(MPI_Info info, int *nkeys); int MPI_Info_get_nthkey(MPI_Info info, int n, char *key); int MPI_Info_get_valuelen(MPI_Info info, const char *key, int *valuelen, int *flag); int MPI_Info_set(MPI_Info info, const char *key, const char *value); int MPI_Pack_external(const char datarep[], const void *inbuf, int incount, MPI_Datatype datatype, void *outbuf, MPI_Aint outsize, MPI_Aint *position) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Pack_external_size(const char datarep[], int incount, MPI_Datatype datatype, MPI_Aint *size); int MPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status); int MPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status); int MPI_Status_f2c(const MPI_Fint *f_status, MPI_Status *c_status); int MPI_Type_create_darray(int size, int rank, int ndims, const int array_of_gsizes[], const int array_of_distribs[], const int array_of_dargs[], const int array_of_psizes[], int order, MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_create_hindexed(int count, const int array_of_blocklengths[], const MPI_Aint array_of_displacements[], MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_create_hvector(int count, int blocklength, MPI_Aint stride, MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_create_indexed_block(int count, int blocklength, const int array_of_displacements[], MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_create_hindexed_block(int count, int blocklength, const MPI_Aint array_of_displacements[], MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_create_resized(MPI_Datatype oldtype, MPI_Aint lb, MPI_Aint extent, MPI_Datatype *newtype); int MPI_Type_create_struct(int count, const int array_of_blocklengths[], const MPI_Aint array_of_displacements[], const MPI_Datatype array_of_types[], MPI_Datatype *newtype); int MPI_Type_create_subarray(int ndims, const int array_of_sizes[], const int array_of_subsizes[], const int array_of_starts[], int order, MPI_Datatype oldtype, MPI_Datatype *newtype); int MPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint *lb, MPI_Aint *extent); int MPI_Type_get_true_extent(MPI_Datatype datatype, MPI_Aint *true_lb, MPI_Aint *true_extent); int MPI_Unpack_external(const char datarep[], const void *inbuf, MPI_Aint insize, MPI_Aint *position, void *outbuf, int outcount, MPI_Datatype datatype) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,7); int MPI_Win_create_errhandler(MPI_Win_errhandler_function *win_errhandler_fn, MPI_Errhandler *errhandler); int MPI_Win_get_errhandler(MPI_Win win, MPI_Errhandler *errhandler); int MPI_Win_set_errhandler(MPI_Win win, MPI_Errhandler errhandler); /* Fortran 90-related functions. These routines are available only if Fortran 90 support is enabled */ int MPI_Type_create_f90_integer(int range, MPI_Datatype *newtype); int MPI_Type_create_f90_real(int precision, int range, MPI_Datatype *newtype); int MPI_Type_create_f90_complex(int precision, int range, MPI_Datatype *newtype); int MPI_Reduce_local(const void *inbuf, void *inoutbuf, int count, MPI_Datatype datatype, MPI_Op op) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Op_commutative(MPI_Op op, int *commute); int MPI_Reduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Dist_graph_create_adjacent(MPI_Comm comm_old, int indegree, const int sources[], const int sourceweights[], int outdegree, const int destinations[], const int destweights[], MPI_Info info, int reorder, MPI_Comm *comm_dist_graph); int MPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[], const int degrees[], const int destinations[], const int weights[], MPI_Info info, int reorder, MPI_Comm *comm_dist_graph); int MPI_Dist_graph_neighbors_count(MPI_Comm comm, int *indegree, int *outdegree, int *weighted); int MPI_Dist_graph_neighbors(MPI_Comm comm, int maxindegree, int sources[], int sourceweights[], int maxoutdegree, int destinations[], int destweights[]); /* Matched probe functionality */ int MPI_Improbe(int source, int tag, MPI_Comm comm, int *flag, MPI_Message *message, MPI_Status *status); int MPI_Imrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Mprobe(int source, int tag, MPI_Comm comm, MPI_Message *message, MPI_Status *status); int MPI_Mrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); /* Nonblocking collectives */ int MPI_Comm_idup(MPI_Comm comm, MPI_Comm *newcomm, MPI_Request *request); int MPI_Ibarrier(MPI_Comm comm, MPI_Request *request); int MPI_Ibcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int MPI_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int MPI_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Iscatterv(const void *sendbuf, const int sendcounts[], const int displs[], MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,7); int MPI_Iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int MPI_Ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Ialltoallv(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,8); int MPI_Ialltoallw(const void *sendbuf, const int sendcounts[], const int sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const int rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm, MPI_Request *request); int MPI_Ireduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Iallreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Ireduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[], MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Iscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_Iexscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); /* Neighborhood collectives */ int MPI_Ineighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Ineighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int MPI_Ineighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,8); int MPI_Ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm, MPI_Request *request); int MPI_Neighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Neighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int MPI_Neighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int MPI_Neighbor_alltoallv(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,8); int MPI_Neighbor_alltoallw(const void *sendbuf, const int sendcounts[], const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm); /* Shared memory */ int MPI_Comm_split_type(MPI_Comm comm, int split_type, int key, MPI_Info info, MPI_Comm *newcomm); /* MPI-3 "large count" routines */ int MPI_Get_elements_x(const MPI_Status *status, MPI_Datatype datatype, MPI_Count *count); int MPI_Status_set_elements_x(MPI_Status *status, MPI_Datatype datatype, MPI_Count count); int MPI_Type_get_extent_x(MPI_Datatype datatype, MPI_Count *lb, MPI_Count *extent); int MPI_Type_get_true_extent_x(MPI_Datatype datatype, MPI_Count *lb, MPI_Count *extent); int MPI_Type_size_x(MPI_Datatype datatype, MPI_Count *size); /* Noncollective communicator creation */ int MPI_Comm_create_group(MPI_Comm comm, MPI_Group group, int tag, MPI_Comm *newcomm); /* MPI_Aint addressing arithmetic */ MPI_Aint MPI_Aint_add(MPI_Aint base, MPI_Aint disp); MPI_Aint MPI_Aint_diff(MPI_Aint addr1, MPI_Aint addr2); /* MPI_T interface */ /* The MPI_T routines are available only in C bindings - tell tools that they can skip these prototypes */ /* Begin Skip Prototypes */ int MPI_T_init_thread(int required, int *provided); int MPI_T_finalize(void); int MPI_T_enum_get_info(MPI_T_enum enumtype, int *num, char *name, int *name_len); int MPI_T_enum_get_item(MPI_T_enum enumtype, int indx, int *value, char *name, int *name_len); int MPI_T_cvar_get_num(int *num_cvar); int MPI_T_cvar_get_info(int cvar_index, char *name, int *name_len, int *verbosity, MPI_Datatype *datatype, MPI_T_enum *enumtype, char *desc, int *desc_len, int *binding, int *scope); int MPI_T_cvar_handle_alloc(int cvar_index, void *obj_handle, MPI_T_cvar_handle *handle, int *count); int MPI_T_cvar_handle_free(MPI_T_cvar_handle *handle); int MPI_T_cvar_read(MPI_T_cvar_handle handle, void *buf); int MPI_T_cvar_write(MPI_T_cvar_handle handle, const void *buf); int MPI_T_pvar_get_num(int *num_pvar); int MPI_T_pvar_get_info(int pvar_index, char *name, int *name_len, int *verbosity, int *var_class, MPI_Datatype *datatype, MPI_T_enum *enumtype, char *desc, int *desc_len, int *binding, int *readonly, int *continuous, int *atomic); int MPI_T_pvar_session_create(MPI_T_pvar_session *session); int MPI_T_pvar_session_free(MPI_T_pvar_session *session); int MPI_T_pvar_handle_alloc(MPI_T_pvar_session session, int pvar_index, void *obj_handle, MPI_T_pvar_handle *handle, int *count); int MPI_T_pvar_handle_free(MPI_T_pvar_session session, MPI_T_pvar_handle *handle); int MPI_T_pvar_start(MPI_T_pvar_session session, MPI_T_pvar_handle handle); int MPI_T_pvar_stop(MPI_T_pvar_session session, MPI_T_pvar_handle handle); int MPI_T_pvar_read(MPI_T_pvar_session session, MPI_T_pvar_handle handle, void *buf); int MPI_T_pvar_write(MPI_T_pvar_session session, MPI_T_pvar_handle handle, const void *buf); int MPI_T_pvar_reset(MPI_T_pvar_session session, MPI_T_pvar_handle handle); int MPI_T_pvar_readreset(MPI_T_pvar_session session, MPI_T_pvar_handle handle, void *buf); int MPI_T_category_get_num(int *num_cat); int MPI_T_category_get_info(int cat_index, char *name, int *name_len, char *desc, int *desc_len, int *num_cvars, int *num_pvars, int *num_categories); int MPI_T_category_get_cvars(int cat_index, int len, int indices[]); int MPI_T_category_get_pvars(int cat_index, int len, int indices[]); int MPI_T_category_get_categories(int cat_index, int len, int indices[]); int MPI_T_category_changed(int *stamp); int MPI_T_cvar_get_index(const char *name, int *cvar_index); int MPI_T_pvar_get_index(const char *name, int var_class, int *pvar_index); int MPI_T_category_get_index(const char *name, int *cat_index); /* End Skip Prototypes */ /* Non-standard but public extensions to MPI */ /* Fault Tolerance Extensions */ int MPIX_Comm_failure_ack(MPI_Comm comm); int MPIX_Comm_failure_get_acked(MPI_Comm comm, MPI_Group *failedgrp); int MPIX_Comm_revoke(MPI_Comm comm); int MPIX_Comm_shrink(MPI_Comm comm, MPI_Comm *newcomm); int MPIX_Comm_agree(MPI_Comm comm, int *flag); /* End Prototypes */ #endif /* MPICH_SUPPRESS_PROTOTYPES */ # 1559 "./src/include/mpi.h" /* Here are the bindings of the profiling routines */ #if !defined(MPI_BUILD_PROFILING) int PMPI_Send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Recv(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Get_count(const MPI_Status *status, MPI_Datatype datatype, int *count); int PMPI_Bsend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Ssend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Rsend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Buffer_attach(void *buffer, int size); int PMPI_Buffer_detach(void *buffer_addr, int *size); int PMPI_Isend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Ibsend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Issend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Irsend(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Irecv(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Wait(MPI_Request *request, MPI_Status *status); int PMPI_Test(MPI_Request *request, int *flag, MPI_Status *status); int PMPI_Request_free(MPI_Request *request); int PMPI_Waitany(int count, MPI_Request array_of_requests[], int *indx, MPI_Status *status); int PMPI_Testany(int count, MPI_Request array_of_requests[], int *indx, int *flag, MPI_Status *status); int PMPI_Waitall(int count, MPI_Request array_of_requests[], MPI_Status array_of_statuses[]); int PMPI_Testall(int count, MPI_Request array_of_requests[], int *flag, MPI_Status array_of_statuses[]); int PMPI_Waitsome(int incount, MPI_Request array_of_requests[], int *outcount, int array_of_indices[], MPI_Status array_of_statuses[]); int PMPI_Testsome(int incount, MPI_Request array_of_requests[], int *outcount, int array_of_indices[], MPI_Status array_of_statuses[]); int PMPI_Iprobe(int source, int tag, MPI_Comm comm, int *flag, MPI_Status *status); int PMPI_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status); int PMPI_Cancel(MPI_Request *request); int PMPI_Test_cancelled(const MPI_Status *status, int *flag); int PMPI_Send_init(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Bsend_init(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Ssend_init(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Rsend_init(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Recv_init(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Start(MPI_Request *request); int PMPI_Startall(int count, MPI_Request array_of_requests[]); int PMPI_Sendrecv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, int dest, int sendtag, void *recvbuf, int recvcount, MPI_Datatype recvtype, int source, int recvtag, MPI_Comm comm, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(6,8); int PMPI_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype, int dest, int sendtag, int source, int recvtag, MPI_Comm comm, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Type_contiguous(int count, MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_vector(int count, int blocklength, int stride, MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_hvector(int count, int blocklength, MPI_Aint stride, MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_indexed(int count, const int *array_of_blocklengths, const int *array_of_displacements, MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_hindexed(int count, int *array_of_blocklengths, MPI_Aint *array_of_displacements, MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_struct(int count, int *array_of_blocklengths, MPI_Aint *array_of_displacements, MPI_Datatype *array_of_types, MPI_Datatype *newtype); int PMPI_Address(void *location, MPI_Aint *address); int PMPI_Type_extent(MPI_Datatype datatype, MPI_Aint *extent); int PMPI_Type_size(MPI_Datatype datatype, int *size); int PMPI_Type_lb(MPI_Datatype datatype, MPI_Aint *displacement); int PMPI_Type_ub(MPI_Datatype datatype, MPI_Aint *displacement); int PMPI_Type_commit(MPI_Datatype *datatype); int PMPI_Type_free(MPI_Datatype *datatype); int PMPI_Get_elements(const MPI_Status *status, MPI_Datatype datatype, int *count); int PMPI_Pack(const void *inbuf, int incount, MPI_Datatype datatype, void *outbuf, int outsize, int *position, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Unpack(const void *inbuf, int insize, int *position, void *outbuf, int outcount, MPI_Datatype datatype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Pack_size(int incount, MPI_Datatype datatype, MPI_Comm comm, int *size); int PMPI_Barrier(MPI_Comm comm); int PMPI_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int PMPI_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,7); int PMPI_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int PMPI_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Alltoallv(const void *sendbuf, const int *sendcounts, const int *sdispls, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *rdispls, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,8); int PMPI_Alltoallw(const void *sendbuf, const int sendcounts[], const int sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const int rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm); int PMPI_Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Op_create(MPI_User_function *user_fn, int commute, MPI_Op *op); int PMPI_Op_free(MPI_Op *op); int PMPI_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[], MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Scan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Group_size(MPI_Group group, int *size); int PMPI_Group_rank(MPI_Group group, int *rank); int PMPI_Group_translate_ranks(MPI_Group group1, int n, const int ranks1[], MPI_Group group2, int ranks2[]); int PMPI_Group_compare(MPI_Group group1, MPI_Group group2, int *result); int PMPI_Comm_group(MPI_Comm comm, MPI_Group *group); int PMPI_Group_union(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup); int PMPI_Group_intersection(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup); int PMPI_Group_difference(MPI_Group group1, MPI_Group group2, MPI_Group *newgroup); int PMPI_Group_incl(MPI_Group group, int n, const int ranks[], MPI_Group *newgroup); int PMPI_Group_excl(MPI_Group group, int n, const int ranks[], MPI_Group *newgroup); int PMPI_Group_range_incl(MPI_Group group, int n, int ranges[][3], MPI_Group *newgroup); int PMPI_Group_range_excl(MPI_Group group, int n, int ranges[][3], MPI_Group *newgroup); int PMPI_Group_free(MPI_Group *group); int PMPI_Comm_size(MPI_Comm comm, int *size); int PMPI_Comm_rank(MPI_Comm comm, int *rank); int PMPI_Comm_compare(MPI_Comm comm1, MPI_Comm comm2, int *result); int PMPI_Comm_dup(MPI_Comm comm, MPI_Comm *newcomm); int PMPI_Comm_dup_with_info(MPI_Comm comm, MPI_Info info, MPI_Comm *newcomm); int PMPI_Comm_create(MPI_Comm comm, MPI_Group group, MPI_Comm *newcomm); int PMPI_Comm_split(MPI_Comm comm, int color, int key, MPI_Comm *newcomm); int PMPI_Comm_free(MPI_Comm *comm); int PMPI_Comm_test_inter(MPI_Comm comm, int *flag); int PMPI_Comm_remote_size(MPI_Comm comm, int *size); int PMPI_Comm_remote_group(MPI_Comm comm, MPI_Group *group); int PMPI_Intercomm_create(MPI_Comm local_comm, int local_leader, MPI_Comm peer_comm, int remote_leader, int tag, MPI_Comm *newintercomm); int PMPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm *newintracomm); int PMPI_Keyval_create(MPI_Copy_function *copy_fn, MPI_Delete_function *delete_fn, int *keyval, void *extra_state); int PMPI_Keyval_free(int *keyval); int PMPI_Attr_put(MPI_Comm comm, int keyval, void *attribute_val); int PMPI_Attr_get(MPI_Comm comm, int keyval, void *attribute_val, int *flag); int PMPI_Attr_delete(MPI_Comm comm, int keyval); int PMPI_Topo_test(MPI_Comm comm, int *status); int PMPI_Cart_create(MPI_Comm comm_old, int ndims, const int dims[], const int periods[], int reorder, MPI_Comm *comm_cart); int PMPI_Dims_create(int nnodes, int ndims, int dims[]); int PMPI_Graph_create(MPI_Comm comm_old, int nnodes, const int indx[], const int edges[], int reorder, MPI_Comm *comm_graph); int PMPI_Graphdims_get(MPI_Comm comm, int *nnodes, int *nedges); int PMPI_Graph_get(MPI_Comm comm, int maxindex, int maxedges, int indx[], int edges[]); int PMPI_Cartdim_get(MPI_Comm comm, int *ndims); int PMPI_Cart_get(MPI_Comm comm, int maxdims, int dims[], int periods[], int coords[]); int PMPI_Cart_rank(MPI_Comm comm, const int coords[], int *rank); int PMPI_Cart_coords(MPI_Comm comm, int rank, int maxdims, int coords[]); int PMPI_Graph_neighbors_count(MPI_Comm comm, int rank, int *nneighbors); int PMPI_Graph_neighbors(MPI_Comm comm, int rank, int maxneighbors, int neighbors[]); int PMPI_Cart_shift(MPI_Comm comm, int direction, int disp, int *rank_source, int *rank_dest); int PMPI_Cart_sub(MPI_Comm comm, const int remain_dims[], MPI_Comm *newcomm); int PMPI_Cart_map(MPI_Comm comm, int ndims, const int dims[], const int periods[], int *newrank); int PMPI_Graph_map(MPI_Comm comm, int nnodes, const int indx[], const int edges[], int *newrank); int PMPI_Get_processor_name(char *name, int *resultlen); int PMPI_Get_version(int *version, int *subversion); int PMPI_Get_library_version(char *version, int *resultlen); int PMPI_Errhandler_create(MPI_Handler_function *function, MPI_Errhandler *errhandler); int PMPI_Errhandler_set(MPI_Comm comm, MPI_Errhandler errhandler); int PMPI_Errhandler_get(MPI_Comm comm, MPI_Errhandler *errhandler); int PMPI_Errhandler_free(MPI_Errhandler *errhandler); int PMPI_Error_string(int errorcode, char *string, int *resultlen); int PMPI_Error_class(int errorcode, int *errorclass); double PMPI_Wtime(void); double PMPI_Wtick(void); int PMPI_Init(int *argc, char ***argv); int PMPI_Finalize(void); int PMPI_Initialized(int *flag); int PMPI_Abort(MPI_Comm comm, int errorcode); /* Note that we may need to define a @PCONTROL_LIST@ depending on whether stdargs are supported */ int PMPI_Pcontrol(const int level, ...); /* Process Creation and Management */ int PMPI_Close_port(const char *port_name); int PMPI_Comm_accept(const char *port_name, MPI_Info info, int root, MPI_Comm comm, MPI_Comm *newcomm); int PMPI_Comm_connect(const char *port_name, MPI_Info info, int root, MPI_Comm comm, MPI_Comm *newcomm); int PMPI_Comm_disconnect(MPI_Comm *comm); int PMPI_Comm_get_parent(MPI_Comm *parent); int PMPI_Comm_join(int fd, MPI_Comm *intercomm); int PMPI_Comm_spawn(const char *command, char *argv[], int maxprocs, MPI_Info info, int root, MPI_Comm comm, MPI_Comm *intercomm, int array_of_errcodes[]); int PMPI_Comm_spawn_multiple(int count, char *array_of_commands[], char **array_of_argv[], const int array_of_maxprocs[], const MPI_Info array_of_info[], int root, MPI_Comm comm, MPI_Comm *intercomm, int array_of_errcodes[]); int PMPI_Lookup_name(const char *service_name, MPI_Info info, char *port_name); int PMPI_Open_port(MPI_Info info, char *port_name); int PMPI_Publish_name(const char *service_name, MPI_Info info, const char *port_name); int PMPI_Unpublish_name(const char *service_name, MPI_Info info, const char *port_name); int PMPI_Comm_set_info(MPI_Comm comm, MPI_Info info); int PMPI_Comm_get_info(MPI_Comm comm, MPI_Info *info); /* One-Sided Communications */ int PMPI_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Get(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Put(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Win_complete(MPI_Win win); int PMPI_Win_create(void *base, MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, MPI_Win *win); int PMPI_Win_fence(int assert, MPI_Win win); int PMPI_Win_free(MPI_Win *win); int PMPI_Win_get_group(MPI_Win win, MPI_Group *group); int PMPI_Win_lock(int lock_type, int rank, int assert, MPI_Win win); int PMPI_Win_post(MPI_Group group, int assert, MPI_Win win); int PMPI_Win_start(MPI_Group group, int assert, MPI_Win win); int PMPI_Win_test(MPI_Win win, int *flag); int PMPI_Win_unlock(int rank, MPI_Win win); int PMPI_Win_wait(MPI_Win win); /* MPI-3 One-Sided Communication Routines */ int PMPI_Win_allocate(MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, void *baseptr, MPI_Win *win); int PMPI_Win_allocate_shared(MPI_Aint size, int disp_unit, MPI_Info info, MPI_Comm comm, void *baseptr, MPI_Win *win); int PMPI_Win_shared_query(MPI_Win win, int rank, MPI_Aint *size, int *disp_unit, void *baseptr); int PMPI_Win_create_dynamic(MPI_Info info, MPI_Comm comm, MPI_Win *win); int PMPI_Win_attach(MPI_Win win, void *base, MPI_Aint size); int PMPI_Win_detach(MPI_Win win, const void *base); int PMPI_Win_get_info(MPI_Win win, MPI_Info *info_used); int PMPI_Win_set_info(MPI_Win win, MPI_Info info); int PMPI_Get_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Fetch_and_op(const void *origin_addr, void *result_addr, MPI_Datatype datatype, int target_rank, MPI_Aint target_disp, MPI_Op op, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Compare_and_swap(const void *origin_addr, const void *compare_addr, void *result_addr, MPI_Datatype datatype, int target_rank, MPI_Aint target_disp, MPI_Win win) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,4); int PMPI_Rput(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Rget(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Win win, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Raccumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Rget_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPI_Win win, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Win_lock_all(int assert, MPI_Win win); int PMPI_Win_unlock_all(MPI_Win win); int PMPI_Win_flush(int rank, MPI_Win win); int PMPI_Win_flush_all(MPI_Win win); int PMPI_Win_flush_local(int rank, MPI_Win win); int PMPI_Win_flush_local_all(MPI_Win win); int PMPI_Win_sync(MPI_Win win); /* External Interfaces */ int PMPI_Add_error_class(int *errorclass); int PMPI_Add_error_code(int errorclass, int *errorcode); int PMPI_Add_error_string(int errorcode, const char *string); int PMPI_Comm_call_errhandler(MPI_Comm comm, int errorcode); int PMPI_Comm_create_keyval(MPI_Comm_copy_attr_function *comm_copy_attr_fn, MPI_Comm_delete_attr_function *comm_delete_attr_fn, int *comm_keyval, void *extra_state); int PMPI_Comm_delete_attr(MPI_Comm comm, int comm_keyval); int PMPI_Comm_free_keyval(int *comm_keyval); int PMPI_Comm_get_attr(MPI_Comm comm, int comm_keyval, void *attribute_val, int *flag); int PMPI_Comm_get_name(MPI_Comm comm, char *comm_name, int *resultlen); int PMPI_Comm_set_attr(MPI_Comm comm, int comm_keyval, void *attribute_val); int PMPI_Comm_set_name(MPI_Comm comm, const char *comm_name); int PMPI_File_call_errhandler(MPI_File fh, int errorcode); int PMPI_Grequest_complete(MPI_Request request); int PMPI_Grequest_start(MPI_Grequest_query_function *query_fn, MPI_Grequest_free_function *free_fn, MPI_Grequest_cancel_function *cancel_fn, void *extra_state, MPI_Request *request); int PMPI_Init_thread(int *argc, char ***argv, int required, int *provided); int PMPI_Is_thread_main(int *flag); int PMPI_Query_thread(int *provided); int PMPI_Status_set_cancelled(MPI_Status *status, int flag); int PMPI_Status_set_elements(MPI_Status *status, MPI_Datatype datatype, int count); int PMPI_Type_create_keyval(MPI_Type_copy_attr_function *type_copy_attr_fn, MPI_Type_delete_attr_function *type_delete_attr_fn, int *type_keyval, void *extra_state); int PMPI_Type_delete_attr(MPI_Datatype datatype, int type_keyval); int PMPI_Type_dup(MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_free_keyval(int *type_keyval); int PMPI_Type_get_attr(MPI_Datatype datatype, int type_keyval, void *attribute_val, int *flag); int PMPI_Type_get_contents(MPI_Datatype datatype, int max_integers, int max_addresses, int max_datatypes, int array_of_integers[], MPI_Aint array_of_addresses[], MPI_Datatype array_of_datatypes[]); int PMPI_Type_get_envelope(MPI_Datatype datatype, int *num_integers, int *num_addresses, int *num_datatypes, int *combiner); int PMPI_Type_get_name(MPI_Datatype datatype, char *type_name, int *resultlen); int PMPI_Type_set_attr(MPI_Datatype datatype, int type_keyval, void *attribute_val); int PMPI_Type_set_name(MPI_Datatype datatype, const char *type_name); int PMPI_Type_match_size(int typeclass, int size, MPI_Datatype *datatype); int PMPI_Win_call_errhandler(MPI_Win win, int errorcode); int PMPI_Win_create_keyval(MPI_Win_copy_attr_function *win_copy_attr_fn, MPI_Win_delete_attr_function *win_delete_attr_fn, int *win_keyval, void *extra_state); int PMPI_Win_delete_attr(MPI_Win win, int win_keyval); int PMPI_Win_free_keyval(int *win_keyval); int PMPI_Win_get_attr(MPI_Win win, int win_keyval, void *attribute_val, int *flag); int PMPI_Win_get_name(MPI_Win win, char *win_name, int *resultlen); int PMPI_Win_set_attr(MPI_Win win, int win_keyval, void *attribute_val); int PMPI_Win_set_name(MPI_Win win, const char *win_name); int PMPI_Alloc_mem(MPI_Aint size, MPI_Info info, void *baseptr); int PMPI_Comm_create_errhandler(MPI_Comm_errhandler_function *comm_errhandler_fn, MPI_Errhandler *errhandler); int PMPI_Comm_get_errhandler(MPI_Comm comm, MPI_Errhandler *errhandler); int PMPI_Comm_set_errhandler(MPI_Comm comm, MPI_Errhandler errhandler); int PMPI_File_create_errhandler(MPI_File_errhandler_function *file_errhandler_fn, MPI_Errhandler *errhandler); int PMPI_File_get_errhandler(MPI_File file, MPI_Errhandler *errhandler); int PMPI_File_set_errhandler(MPI_File file, MPI_Errhandler errhandler); int PMPI_Finalized(int *flag); int PMPI_Free_mem(void *base); int PMPI_Get_address(const void *location, MPI_Aint *address); int PMPI_Info_create(MPI_Info *info); int PMPI_Info_delete(MPI_Info info, const char *key); int PMPI_Info_dup(MPI_Info info, MPI_Info *newinfo); int PMPI_Info_free(MPI_Info *info); int PMPI_Info_get(MPI_Info info, const char *key, int valuelen, char *value, int *flag); int PMPI_Info_get_nkeys(MPI_Info info, int *nkeys); int PMPI_Info_get_nthkey(MPI_Info info, int n, char *key); int PMPI_Info_get_valuelen(MPI_Info info, const char *key, int *valuelen, int *flag); int PMPI_Info_set(MPI_Info info, const char *key, const char *value); int PMPI_Pack_external(const char datarep[], const void *inbuf, int incount, MPI_Datatype datatype, void *outbuf, MPI_Aint outsize, MPI_Aint *position) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Pack_external_size(const char datarep[], int incount, MPI_Datatype datatype, MPI_Aint *size); int PMPI_Request_get_status(MPI_Request request, int *flag, MPI_Status *status); int PMPI_Status_c2f(const MPI_Status *c_status, MPI_Fint *f_status); int PMPI_Status_f2c(const MPI_Fint *f_status, MPI_Status *c_status); int PMPI_Type_create_darray(int size, int rank, int ndims, const int array_of_gsizes[], const int array_of_distribs[], const int array_of_dargs[], const int array_of_psizes[], int order, MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_create_hindexed(int count, const int array_of_blocklengths[], const MPI_Aint array_of_displacements[], MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_create_hvector(int count, int blocklength, MPI_Aint stride, MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_create_indexed_block(int count, int blocklength, const int array_of_displacements[], MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_create_hindexed_block(int count, int blocklength, const MPI_Aint array_of_displacements[], MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_create_resized(MPI_Datatype oldtype, MPI_Aint lb, MPI_Aint extent, MPI_Datatype *newtype); int PMPI_Type_create_struct(int count, const int array_of_blocklengths[], const MPI_Aint array_of_displacements[], const MPI_Datatype array_of_types[], MPI_Datatype *newtype); int PMPI_Type_create_subarray(int ndims, const int array_of_sizes[], const int array_of_subsizes[], const int array_of_starts[], int order, MPI_Datatype oldtype, MPI_Datatype *newtype); int PMPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint *lb, MPI_Aint *extent); int PMPI_Type_get_true_extent(MPI_Datatype datatype, MPI_Aint *true_lb, MPI_Aint *true_extent); int PMPI_Unpack_external(const char datarep[], const void *inbuf, MPI_Aint insize, MPI_Aint *position, void *outbuf, int outcount, MPI_Datatype datatype) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,7); int PMPI_Win_create_errhandler(MPI_Win_errhandler_function *win_errhandler_fn, MPI_Errhandler *errhandler); int PMPI_Win_get_errhandler(MPI_Win win, MPI_Errhandler *errhandler); int PMPI_Win_set_errhandler(MPI_Win win, MPI_Errhandler errhandler); /* Fortran 90-related functions. These routines are available only if Fortran 90 support is enabled */ int PMPI_Type_create_f90_integer(int r, MPI_Datatype *newtype); int PMPI_Type_create_f90_real(int p, int r, MPI_Datatype *newtype); int PMPI_Type_create_f90_complex(int p, int r, MPI_Datatype *newtype); int PMPI_Reduce_local(const void *inbuf, void *inoutbuf, int count, MPI_Datatype datatype, MPI_Op op) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Op_commutative(MPI_Op op, int *commute); int PMPI_Reduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Dist_graph_create_adjacent(MPI_Comm comm_old, int indegree, const int sources[], const int sourceweights[], int outdegree, const int destinations[], const int destweights[], MPI_Info info, int reorder, MPI_Comm *comm_dist_graph); int PMPI_Dist_graph_create(MPI_Comm comm_old, int n, const int sources[], const int degrees[], const int destinations[], const int weights[], MPI_Info info, int reorder, MPI_Comm *comm_dist_graph); int PMPI_Dist_graph_neighbors_count(MPI_Comm comm, int *indegree, int *outdegree, int *weighted); int PMPI_Dist_graph_neighbors(MPI_Comm comm, int maxindegree, int sources[], int sourceweights[], int maxoutdegree, int destinations[], int destweights[]); /* Matched probe functionality */ int PMPI_Improbe(int source, int tag, MPI_Comm comm, int *flag, MPI_Message *message, MPI_Status *status); int PMPI_Imrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Mprobe(int source, int tag, MPI_Comm comm, MPI_Message *message, MPI_Status *status); int PMPI_Mrecv(void *buf, int count, MPI_Datatype datatype, MPI_Message *message, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); /* Nonblocking collectives */ int PMPI_Comm_idup(MPI_Comm comm, MPI_Comm *newcomm, MPI_Request *request); int PMPI_Ibarrier(MPI_Comm comm, MPI_Request *request); int PMPI_Ibcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3); int PMPI_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int PMPI_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Iscatterv(const void *sendbuf, const int sendcounts[], const int displs[], MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,7); int PMPI_Iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int PMPI_Ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Ialltoallv(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,8); int PMPI_Ialltoallw(const void *sendbuf, const int sendcounts[], const int sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const int rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm, MPI_Request *request); int PMPI_Ireduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Iallreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Ireduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[], MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Iscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_Iexscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); /* Neighborhood collectives */ int PMPI_Ineighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Ineighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int PMPI_Ineighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPI_Comm comm, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,8); int PMPI_Ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm, MPI_Request *request); int PMPI_Neighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Neighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,7); int PMPI_Neighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,3) MPICH_ATTR_POINTER_WITH_TYPE_TAG(4,6); int PMPI_Neighbor_alltoallv(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPI_Comm comm) MPICH_ATTR_POINTER_WITH_TYPE_TAG(1,4) MPICH_ATTR_POINTER_WITH_TYPE_TAG(5,8); int PMPI_Neighbor_alltoallw(const void *sendbuf, const int sendcounts[], const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPI_Comm comm); /* Shared memory */ int PMPI_Comm_split_type(MPI_Comm comm, int split_type, int key, MPI_Info info, MPI_Comm *newcomm); /* Noncollective communicator creation */ int PMPI_Comm_create_group(MPI_Comm comm, MPI_Group group, int tag, MPI_Comm *newcomm); /* MPI-3 "large count" routines */ int PMPI_Get_elements_x(const MPI_Status *status, MPI_Datatype datatype, MPI_Count *count); int PMPI_Status_set_elements_x(MPI_Status *status, MPI_Datatype datatype, MPI_Count count); int PMPI_Type_get_extent_x(MPI_Datatype datatype, MPI_Count *lb, MPI_Count *extent); int PMPI_Type_get_true_extent_x(MPI_Datatype datatype, MPI_Count *lb, MPI_Count *extent); int PMPI_Type_size_x(MPI_Datatype datatype, MPI_Count *size); /* MPI_Aint addressing arithmetic */ MPI_Aint PMPI_Aint_add(MPI_Aint base, MPI_Aint disp); MPI_Aint PMPI_Aint_diff(MPI_Aint addr1, MPI_Aint addr2); /* MPI_T interface */ /* The MPI_T routines are available only in C bindings - tell tools that they can skip these prototypes */ /* Begin Skip Prototypes */ int PMPI_T_init_thread(int required, int *provided); int PMPI_T_finalize(void); int PMPI_T_enum_get_info(MPI_T_enum enumtype, int *num, char *name, int *name_len); int PMPI_T_enum_get_item(MPI_T_enum enumtype, int indx, int *value, char *name, int *name_len); int PMPI_T_cvar_get_num(int *num_cvar); int PMPI_T_cvar_get_info(int cvar_index, char *name, int *name_len, int *verbosity, MPI_Datatype *datatype, MPI_T_enum *enumtype, char *desc, int *desc_len, int *binding, int *scope); int PMPI_T_cvar_handle_alloc(int cvar_index, void *obj_handle, MPI_T_cvar_handle *handle, int *count); int PMPI_T_cvar_handle_free(MPI_T_cvar_handle *handle); int PMPI_T_cvar_read(MPI_T_cvar_handle handle, void *buf); int PMPI_T_cvar_write(MPI_T_cvar_handle handle, const void *buf); int PMPI_T_pvar_get_num(int *num_pvar); int PMPI_T_pvar_get_info(int pvar_index, char *name, int *name_len, int *verbosity, int *var_class, MPI_Datatype *datatype, MPI_T_enum *enumtype, char *desc, int *desc_len, int *binding, int *readonly, int *continuous, int *atomic); int PMPI_T_pvar_session_create(MPI_T_pvar_session *session); int PMPI_T_pvar_session_free(MPI_T_pvar_session *session); int PMPI_T_pvar_handle_alloc(MPI_T_pvar_session session, int pvar_index, void *obj_handle, MPI_T_pvar_handle *handle, int *count); int PMPI_T_pvar_handle_free(MPI_T_pvar_session session, MPI_T_pvar_handle *handle); int PMPI_T_pvar_start(MPI_T_pvar_session session, MPI_T_pvar_handle handle); int PMPI_T_pvar_stop(MPI_T_pvar_session session, MPI_T_pvar_handle handle); int PMPI_T_pvar_read(MPI_T_pvar_session session, MPI_T_pvar_handle handle, void *buf); int PMPI_T_pvar_write(MPI_T_pvar_session session, MPI_T_pvar_handle handle, const void *buf); int PMPI_T_pvar_reset(MPI_T_pvar_session session, MPI_T_pvar_handle handle); int PMPI_T_pvar_readreset(MPI_T_pvar_session session, MPI_T_pvar_handle handle, void *buf); int PMPI_T_category_get_num(int *num_cat); int PMPI_T_category_get_info(int cat_index, char *name, int *name_len, char *desc, int *desc_len, int *num_cvars, int *num_pvars, int *num_categories); int PMPI_T_category_get_cvars(int cat_index, int len, int indices[]); int PMPI_T_category_get_pvars(int cat_index, int len, int indices[]); int PMPI_T_category_get_categories(int cat_index, int len, int indices[]); int PMPI_T_category_changed(int *stamp); int PMPI_T_cvar_get_index(const char *name, int *cvar_index); int PMPI_T_pvar_get_index(const char *name, int var_class, int *pvar_index); int PMPI_T_category_get_index(const char *name, int *cat_index); /* End Skip Prototypes */ /* Non-standard but public extensions to MPI */ /* Fault Tolerance Extensions */ int PMPIX_Comm_failure_ack(MPI_Comm comm); int PMPIX_Comm_failure_get_acked(MPI_Comm comm, MPI_Group *failedgrp); int PMPIX_Comm_revoke(MPI_Comm comm); int PMPIX_Comm_shrink(MPI_Comm comm, MPI_Comm *newcomm); int PMPIX_Comm_agree(MPI_Comm comm, int *flag); #endif /* MPI_BUILD_PROFILING */ # 2203 "./src/include/mpi.h" /* End of MPI bindings */ /* feature advertisement */ #define MPIIMPL_ADVERTISES_FEATURES 1 #define MPIIMPL_HAVE_MPI_INFO 1 #define MPIIMPL_HAVE_MPI_COMBINER_DARRAY 1 #define MPIIMPL_HAVE_MPI_TYPE_CREATE_DARRAY 1 #define MPIIMPL_HAVE_MPI_COMBINER_SUBARRAY 1 #define MPIIMPL_HAVE_MPI_TYPE_CREATE_DARRAY 1 #define MPIIMPL_HAVE_MPI_COMBINER_DUP 1 #define MPIIMPL_HAVE_MPI_GREQUEST 1 #define MPIIMPL_HAVE_STATUS_SET_BYTES 1 #define MPIIMPL_HAVE_STATUS_SET_INFO 1 #if 0 /* expanded by -frewrite-includes */ #include "mpio.h" #endif /* expanded by -frewrite-includes */ # 2217 "./src/include/mpi.h" # 2218 "./src/include/mpi.h" #if defined(__cplusplus) } /* Add the C++ bindings */ /* If MPICH_SKIP_MPICXX is defined, the mpicxx.h file will *not* be included. This is necessary, for example, when building the C++ interfaces. It can also be used when you want to use a C++ compiler to compile C code, and do not want to load the C++ bindings. These definitions can be made by the C++ compilation script */ #if !defined(MPICH_SKIP_MPICXX) /* mpicxx.h contains the MPI C++ binding. In the mpi.h.in file, this include is in an autoconf variable in case the compiler is a C++ compiler but MPI was built without the C++ bindings */ #if 0 /* expanded by -frewrite-includes */ #include "mpicxx.h" #endif /* expanded by -frewrite-includes */ # 2233 "./src/include/mpi.h" # 2234 "./src/include/mpi.h" #endif # 2235 "./src/include/mpi.h" #endif # 2236 "./src/include/mpi.h" /* Generalized requests extensions */ typedef int MPIX_Grequest_class; int MPIX_Grequest_class_create(MPI_Grequest_query_function *query_fn, MPI_Grequest_free_function *free_fn, MPI_Grequest_cancel_function *cancel_fn, MPIX_Grequest_poll_function *poll_fn, MPIX_Grequest_wait_function *wait_fn, MPIX_Grequest_class *greq_class); int MPIX_Grequest_class_allocate(MPIX_Grequest_class greq_class, void *extra_state, MPI_Request *request); int MPIX_Grequest_start(MPI_Grequest_query_function *query_fn, MPI_Grequest_free_function *free_fn, MPI_Grequest_cancel_function *cancel_fn, MPIX_Grequest_poll_function *poll_fn, MPIX_Grequest_wait_function *wait_fn, void *extra_state, MPI_Request *request); /* RMA Mutexes Extensions */ struct mpixi_mutex_s; typedef struct mpixi_mutex_s * MPIX_Mutex; int MPIX_Mutex_create(int count, MPI_Comm comm, MPIX_Mutex *hdl); int MPIX_Mutex_free(MPIX_Mutex *hdl); int MPIX_Mutex_lock(MPIX_Mutex hdl, int mutex, int proc); int MPIX_Mutex_unlock(MPIX_Mutex hdl, int mutex, int proc); #if !defined(MPI_BUILD_PROFILING) /* Generalized requests extensions */ int PMPIX_Grequest_class_create(MPI_Grequest_query_function *query_fn, MPI_Grequest_free_function *free_fn, MPI_Grequest_cancel_function *cancel_fn, MPIX_Grequest_poll_function *poll_fn, MPIX_Grequest_wait_function *wait_fn, MPIX_Grequest_class *greq_class); int PMPIX_Grequest_class_allocate(MPIX_Grequest_class greq_class, void *extra_state, MPI_Request *request); int PMPIX_Grequest_start(MPI_Grequest_query_function *query_fn, MPI_Grequest_free_function *free_fn, MPI_Grequest_cancel_function *cancel_fn, MPIX_Grequest_poll_function *poll_fn, MPIX_Grequest_wait_function *wait_fn, void *extra_state, MPI_Request *request); /* RMA Mutexes Extensions */ int PMPIX_Mutex_create(int count, MPI_Comm comm, MPIX_Mutex *hdl); int PMPIX_Mutex_free(MPIX_Mutex *hdl); int PMPIX_Mutex_lock(MPIX_Mutex hdl, int mutex, int proc); int PMPIX_Mutex_unlock(MPIX_Mutex hdl, int mutex, int proc); #endif /* MPI_BUILD_PROFILING */ # 2287 "./src/include/mpi.h" #endif # 2289 "./src/include/mpi.h" # 14 "./src/include/mpio.h" 2 #if defined(__cplusplus) extern "C" { #endif # 18 "./src/include/mpio.h" #define ROMIO_VERSION 126 /* version 1.2.6 */ /* define MPI-IO datatypes and constants */ #ifndef MPI_FILE_DEFINED typedef struct ADIOI_FileD *MPI_File; #endif # 26 "./src/include/mpio.h" #define HAVE_MPI_GREQUEST 1 #ifndef HAVE_MPI_GREQUEST typedef struct ADIOI_RequestD *MPIO_Request; #else # 31 "./src/include/mpio.h" #define MPIO_Request MPI_Request #define MPIO_USES_MPI_REQUEST /* Also rename the MPIO routines to get the MPI versions */ #define MPIO_Wait MPI_Wait #define MPIO_Test MPI_Test #define PMPIO_Wait PMPI_Wait #define PMPIO_Test PMPI_Test #endif # 39 "./src/include/mpio.h" #define MPIO_REQUEST_DEFINED #ifndef HAVE_MPI_OFFSET typedef long long MPI_Offset; /* If we needed to define MPI_Offset, then we also need to make this definition. */ #ifndef HAVE_MPI_DATAREP_FUNCTIONS #define HAVE_MPI_DATAREP_FUNCTIONS typedef int (MPI_Datarep_conversion_function)(void *, MPI_Datatype, int, void *, MPI_Offset, void *); typedef int (MPI_Datarep_extent_function)(MPI_Datatype datatype, MPI_Aint *, void *); #endif # 52 "./src/include/mpio.h" #endif # 53 "./src/include/mpio.h" #ifndef NEEDS_MPI_FINT #endif # 57 "./src/include/mpio.h" #ifdef NEEDS_MPI_FINT typedef int MPI_Fint; #endif # 60 "./src/include/mpio.h" #ifndef HAVE_MPI_INFO #define HAVE_MPI_INFO #endif # 64 "./src/include/mpio.h" #ifndef HAVE_MPI_INFO typedef struct MPIR_Info *MPI_Info; # define MPI_INFO_NULL ((MPI_Info) 0) # define MPI_MAX_INFO_KEY 255 # define MPI_MAX_INFO_VAL 1024 #endif # 70 "./src/include/mpio.h" #define MPI_MODE_RDONLY 2 /* ADIO_RDONLY */ #define MPI_MODE_RDWR 8 /* ADIO_RDWR */ #define MPI_MODE_WRONLY 4 /* ADIO_WRONLY */ #define MPI_MODE_CREATE 1 /* ADIO_CREATE */ #define MPI_MODE_EXCL 64 /* ADIO_EXCL */ #define MPI_MODE_DELETE_ON_CLOSE 16 /* ADIO_DELETE_ON_CLOSE */ #define MPI_MODE_UNIQUE_OPEN 32 /* ADIO_UNIQUE_OPEN */ #define MPI_MODE_APPEND 128 /* ADIO_APPEND */ #define MPI_MODE_SEQUENTIAL 256 /* ADIO_SEQUENTIAL */ #define MPI_DISPLACEMENT_CURRENT -54278278 #ifndef MPICH /* FIXME: Make sure that we get a consistent definition of MPI_FILE_NULL in MPICH */ /* MPICH defines null object handles differently */ #define MPI_FILE_NULL ((MPI_File) 0) #endif # 89 "./src/include/mpio.h" #define MPIO_REQUEST_NULL ((MPIO_Request) 0) #define MPI_SEEK_SET 600 #define MPI_SEEK_CUR 602 #define MPI_SEEK_END 604 /* Open MPI: don't define MPI_MAX_DATAREP_STRING here; it's defined in OMPI's mpi.h. */ #ifndef OPEN_MPI #define MPI_MAX_DATAREP_STRING 128 #endif # 100 "./src/include/mpio.h" #ifndef HAVE_MPI_DARRAY_SUBARRAY #define HAVE_MPI_DARRAY_SUBARRAY #endif # 104 "./src/include/mpio.h" #ifndef HAVE_MPI_DARRAY_SUBARRAY # define MPI_ORDER_C 56 # define MPI_ORDER_FORTRAN 57 # define MPI_DISTRIBUTE_BLOCK 121 # define MPI_DISTRIBUTE_CYCLIC 122 # define MPI_DISTRIBUTE_NONE 123 # define MPI_DISTRIBUTE_DFLT_DARG -49767 #endif # 112 "./src/include/mpio.h" /* MPI-IO function prototypes */ /* The compiler must support ANSI C style prototypes, otherwise long long constants (e.g. 0) may get passed as ints. */ #ifndef HAVE_PRAGMA_HP_SEC_DEF /* Section 9.2 */ /* Begin Prototypes */ int MPI_File_open(MPI_Comm comm, const char *filename, int amode, MPI_Info info, MPI_File *fh); int MPI_File_close(MPI_File *fh); int MPI_File_delete(const char *filename, MPI_Info info); int MPI_File_set_size(MPI_File fh, MPI_Offset size); int MPI_File_preallocate(MPI_File fh, MPI_Offset size); int MPI_File_get_size(MPI_File fh, MPI_Offset *size); int MPI_File_get_group(MPI_File fh, MPI_Group *group); int MPI_File_get_amode(MPI_File fh, int *amode); int MPI_File_set_info(MPI_File fh, MPI_Info info); int MPI_File_get_info(MPI_File fh, MPI_Info *info_used); /* Section 9.3 */ int MPI_File_set_view(MPI_File fh, MPI_Offset disp, MPI_Datatype etype, MPI_Datatype filetype, const char *datarep, MPI_Info info); int MPI_File_get_view(MPI_File fh, MPI_Offset *disp, MPI_Datatype *etype, MPI_Datatype *filetype, char *datarep); /* Section 9.4.2 */ int MPI_File_read_at(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5); int MPI_File_read_at_all(MPI_File fh, MPI_Offset offset, void * buf, int count, MPI_Datatype datatype, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5); int MPI_File_write_at(MPI_File fh, MPI_Offset offset, const void * buf, int count, MPI_Datatype datatype, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5); int MPI_File_write_at_all(MPI_File fh, MPI_Offset offset, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5); /* nonblocking calls currently use MPIO_Request, because generalized requests not yet implemented. For the same reason, MPIO_Test and MPIO_Wait are used to test and wait on nonblocking I/O requests */ int MPI_File_iread_at(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5); int MPI_File_iwrite_at(MPI_File fh, MPI_Offset offset, const void *buf, int count, MPI_Datatype datatype, MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5); /* Section 9.4.3 */ int MPI_File_read(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_File_read_all(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_File_write(MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_File_write_all(MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); /* nonblocking calls currently use MPIO_Request, because generalized requests not yet implemented. For the same reason, MPIO_Test and MPIO_Wait are used to test and wait on nonblocking I/O requests */ int MPI_File_iread(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_File_iwrite(MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_File_seek(MPI_File fh, MPI_Offset offset, int whence); int MPI_File_get_position(MPI_File fh, MPI_Offset *offset); int MPI_File_get_byte_offset(MPI_File fh, MPI_Offset offset, MPI_Offset *disp); /* Section 9.4.4 */ int MPI_File_read_shared(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_File_write_shared(MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_File_iread_shared(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_File_iwrite_shared(MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPIO_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_File_read_ordered(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_File_write_ordered(MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Status *status) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_File_seek_shared(MPI_File fh, MPI_Offset offset, int whence); int MPI_File_get_position_shared(MPI_File fh, MPI_Offset *offset); /* Section 9.4.5 */ int MPI_File_read_at_all_begin(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5); int MPI_File_read_at_all_end(MPI_File fh, void *buf, MPI_Status *status); int MPI_File_write_at_all_begin(MPI_File fh, MPI_Offset offset, const void *buf, int count, MPI_Datatype datatype) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5); int MPI_File_write_at_all_end(MPI_File fh, const void *buf, MPI_Status *status); int MPI_File_read_all_begin(MPI_File fh, void *buf, int count, MPI_Datatype datatype) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_File_read_all_end(MPI_File fh, void *buf, MPI_Status *status); int MPI_File_write_all_begin(MPI_File fh, const void *buf, int count, MPI_Datatype datatype) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_File_write_all_end(MPI_File fh, const void *buf, MPI_Status *status); int MPI_File_read_ordered_begin(MPI_File fh, void *buf, int count, MPI_Datatype datatype) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_File_read_ordered_end(MPI_File fh, void *buf, MPI_Status *status); int MPI_File_write_ordered_begin(MPI_File fh, const void *buf, int count, MPI_Datatype datatype) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_File_write_ordered_end(MPI_File fh, const void *buf, MPI_Status *status); /* Section 9.5.1 */ int MPI_File_get_type_extent(MPI_File fh, MPI_Datatype datatype, MPI_Aint *extent); /* Section 9.5.3 */ int MPI_Register_datarep(const char *datarep, MPI_Datarep_conversion_function *read_conversion_fn, MPI_Datarep_conversion_function *write_conversion_fn, MPI_Datarep_extent_function *dtype_file_extent_fn, void *extra_state); /* Section 9.6.1 */ int MPI_File_set_atomicity(MPI_File fh, int flag); int MPI_File_get_atomicity(MPI_File fh, int *flag); int MPI_File_sync(MPI_File fh); /* Section 4.13.3 */ #ifndef MPICH /* MPICH provides these definitions */ int MPI_File_set_errhandler(MPI_File file, MPI_Errhandler errhandler); int MPI_File_get_errhandler(MPI_File file, MPI_Errhandler *errhandler); #endif # 240 "./src/include/mpio.h" /* For MPI 3.1 */ int MPI_File_iread_at_all(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5); int MPI_File_iwrite_at_all(MPI_File fh, MPI_Offset offset, const void *buf, int count, MPI_Datatype datatype, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5); int MPI_File_iread_all(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int MPI_File_iwrite_all(MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); /* End Prototypes */ #ifndef HAVE_MPI_DARRAY_SUBARRAY /* Section 4.14.4 */ int MPI_Type_create_subarray(int ndims, const int array_of_sizes[], const int array_of_subsizes[], const int array_of_starts[], int order, MPI_Datatype oldtype, MPI_Datatype *newtype); /* Section 4.14.5 */ int MPI_Type_create_darray(int size, int rank, int ndims, const int array_of_gsizes[], const int array_of_distribs[], const int array_of_dargs[], const int array_of_psizes, int order, MPI_Datatype oldtype, MPI_Datatype *newtype); #endif # 268 "./src/include/mpio.h" /* The globus2 device has to rename MPI_ symbols in order to use the vendor MPI as one of its transport mechanisms. Therefore, the following undefines should only happen if MPICH_RENAMING_MPI_FUNCS is not defined. */ /* Section 4.12.4 */ #if !defined(MPICH_RENAMING_MPI_FUNCS) #ifdef MPI_File_f2c #undef MPI_File_f2c #endif # 277 "./src/include/mpio.h" #ifdef MPI_File_c2f #undef MPI_File_c2f #endif # 280 "./src/include/mpio.h" #endif # 281 "./src/include/mpio.h" /* above needed for some versions of mpi.h in MPICH!! */ MPI_File MPI_File_f2c(MPI_Fint file); MPI_Fint MPI_File_c2f(MPI_File file); #ifndef HAVE_MPI_GREQUEST /* The following functions are required if generalized requests are not available, because in that case, an MPIO_Request object is currently used for nonblocking I/O. */ int MPIO_Test(MPIO_Request *request, int *flag, MPI_Status *status); int MPIO_Wait(MPIO_Request *request, MPI_Status *status); int MPIO_Testall(int count, MPIO_Request array_of_requests[], int *flag, MPI_Status array_of_statuses[]); int MPIO_Waitall(int count, MPIO_Request array_of_requests[], MPI_Status array_of_statuses[]); int MPIO_Testany(int count, MPIO_Request array_of_requests[], int *indx, int *flag, MPI_Status *status); int MPIO_Waitany(int count, MPIO_Request array_of_requests[], int *indx, MPI_Status *status); int MPIO_Waitsome(int incount, MPIO_Request array_of_requests[], int *outcount, int array_of_indices[], MPI_Status array_of_statuses[]); int MPIO_Testsome(int incount, MPIO_Request array_of_requests[], int *outcount, int array_of_indices[], MPI_Status array_of_statuses[]); MPI_Fint MPIO_Request_c2f(MPIO_Request request); MPIO_Request MPIO_Request_f2c(MPI_Fint request); #endif /* HAVE_MPI_GREQUEST */ # 306 "./src/include/mpio.h" /* info functions if not defined in the MPI implementation */ #ifndef HAVE_MPI_INFO int MPI_Info_create(MPI_Info *info); int MPI_Info_set(MPI_Info info, const char *key, const char *value); int MPI_Info_delete(MPI_Info info, const char *key); int MPI_Info_get(MPI_Info info, const char *key, int valuelen, char *value, int *flag); int MPI_Info_get_valuelen(MPI_Info info, const char *key, int *valuelen, int *flag); int MPI_Info_get_nkeys(MPI_Info info, int *nkeys); int MPI_Info_get_nthkey(MPI_Info info, int n, char *key); int MPI_Info_dup(MPI_Info info, MPI_Info *newinfo); int MPI_Info_free(MPI_Info *info); /* The globus2 device has to rename MPI_ symbols in order to use the vendor MPI as one of its transport mechanisms. Therefore, the following undefines should only happen if MPICH_RENAMING_MPI_FUNCS is not defined. */ #if !defined(MPICH_RENAMING_MPI_FUNCS) #ifdef MPI_Info_f2c #undef MPI_Info_f2c #endif # 327 "./src/include/mpio.h" #ifdef MPI_Info_c2f #undef MPI_Info_c2f #endif # 330 "./src/include/mpio.h" #endif # 331 "./src/include/mpio.h" /* above needed for some versions of mpi.h in MPICH!! */ MPI_Fint MPI_Info_c2f(MPI_Info info); MPI_Info MPI_Info_f2c(MPI_Fint info); #endif # 335 "./src/include/mpio.h" #endif /* HAVE_PRAGMA_HP_SEC_DEF */ # 337 "./src/include/mpio.h" /**************** BINDINGS FOR THE PROFILING INTERFACE ***************/ /* Section 9.2 */ int PMPI_File_open(MPI_Comm, const char *, int, MPI_Info, MPI_File *); int PMPI_File_close(MPI_File *); int PMPI_File_delete(const char *, MPI_Info); int PMPI_File_set_size(MPI_File, MPI_Offset); int PMPI_File_preallocate(MPI_File, MPI_Offset); int PMPI_File_get_size(MPI_File, MPI_Offset *); int PMPI_File_get_group(MPI_File, MPI_Group *); int PMPI_File_get_amode(MPI_File, int *); int PMPI_File_set_info(MPI_File, MPI_Info); int PMPI_File_get_info(MPI_File, MPI_Info *); /* Section 9.3 */ int PMPI_File_set_view(MPI_File, MPI_Offset, MPI_Datatype, MPI_Datatype, const char *, MPI_Info); int PMPI_File_get_view(MPI_File, MPI_Offset *, MPI_Datatype *, MPI_Datatype *, char *); /* Section 9.4.2 */ int PMPI_File_read_at(MPI_File, MPI_Offset, void *, int, MPI_Datatype, MPI_Status *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5); int PMPI_File_read_at_all(MPI_File, MPI_Offset, void *, int, MPI_Datatype, MPI_Status *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5); int PMPI_File_write_at(MPI_File, MPI_Offset, const void *, int, MPI_Datatype, MPI_Status *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5); int PMPI_File_write_at_all(MPI_File, MPI_Offset, const void *, int, MPI_Datatype, MPI_Status *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5); /* nonblocking calls currently use MPIO_Request, because generalized requests not yet implemented. For the same reason, MPIO_Test and MPIO_Wait are used to test and wait on nonblocking I/O requests */ int PMPI_File_iread_at(MPI_File, MPI_Offset, void *, int, MPI_Datatype, MPIO_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5); int PMPI_File_iwrite_at(MPI_File, MPI_Offset, const void *, int, MPI_Datatype, MPIO_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5); /* Section 9.4.3 */ int PMPI_File_read(MPI_File, void *, int, MPI_Datatype, MPI_Status *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_File_read_all(MPI_File, void *, int, MPI_Datatype, MPI_Status *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_File_write(MPI_File, const void *, int, MPI_Datatype, MPI_Status *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_File_write_all(MPI_File, const void *, int, MPI_Datatype, MPI_Status *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); /* nonblocking calls currently use MPIO_Request, because generalized requests not yet implemented. For the same reason, MPIO_Test and MPIO_Wait are used to test and wait on nonblocking I/O requests */ int PMPI_File_iread(MPI_File, void *, int, MPI_Datatype, MPIO_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_File_iwrite(MPI_File, const void *, int, MPI_Datatype, MPIO_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_File_seek(MPI_File, MPI_Offset, int); int PMPI_File_get_position(MPI_File, MPI_Offset *); int PMPI_File_get_byte_offset(MPI_File, MPI_Offset, MPI_Offset *); /* Section 9.4.4 */ int PMPI_File_read_shared(MPI_File, void *, int, MPI_Datatype, MPI_Status *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_File_write_shared(MPI_File, const void *, int, MPI_Datatype, MPI_Status *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_File_iread_shared(MPI_File, void *, int, MPI_Datatype, MPIO_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_File_iwrite_shared(MPI_File, const void *, int, MPI_Datatype, MPIO_Request *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_File_read_ordered(MPI_File, void *, int, MPI_Datatype, MPI_Status *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_File_write_ordered(MPI_File, const void *, int, MPI_Datatype, MPI_Status *) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_File_seek_shared(MPI_File, MPI_Offset, int); int PMPI_File_get_position_shared(MPI_File, MPI_Offset *); /* Section 9.4.5 */ int PMPI_File_read_at_all_begin(MPI_File, MPI_Offset, void *, int, MPI_Datatype) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5); int PMPI_File_read_at_all_end(MPI_File, void *, MPI_Status *); int PMPI_File_write_at_all_begin(MPI_File, MPI_Offset, const void *, int, MPI_Datatype) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5); int PMPI_File_write_at_all_end(MPI_File, const void *, MPI_Status *); int PMPI_File_read_all_begin(MPI_File, void *, int, MPI_Datatype) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_File_read_all_end(MPI_File, void *, MPI_Status *); int PMPI_File_write_all_begin(MPI_File, const void *, int, MPI_Datatype) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_File_write_all_end(MPI_File, const void *, MPI_Status *); int PMPI_File_read_ordered_begin(MPI_File, void *, int, MPI_Datatype) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_File_read_ordered_end(MPI_File, void *, MPI_Status *); int PMPI_File_write_ordered_begin(MPI_File, const void *, int, MPI_Datatype) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_File_write_ordered_end(MPI_File, const void *, MPI_Status *); /* Section 9.5.1 */ int PMPI_File_get_type_extent(MPI_File, MPI_Datatype, MPI_Aint *); /* Section 9.5.3 */ int PMPI_Register_datarep(const char *, MPI_Datarep_conversion_function *, MPI_Datarep_conversion_function *, MPI_Datarep_extent_function *, void *); /* Section 9.6.1 */ int PMPI_File_set_atomicity(MPI_File, int); int PMPI_File_get_atomicity(MPI_File, int *); int PMPI_File_sync(MPI_File); /* Section 4.13.3 */ #ifndef MPICH /* MPICH provides these definitions */ int PMPI_File_set_errhandler( MPI_File, MPI_Errhandler ); int PMPI_File_get_errhandler( MPI_File, MPI_Errhandler * ); #endif # 469 "./src/include/mpio.h" /* For MPI 3.1 */ int PMPI_File_iread_at_all(MPI_File fh, MPI_Offset offset, void *buf, int count, MPI_Datatype datatype, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5); int PMPI_File_iwrite_at_all(MPI_File fh, MPI_Offset offset, const void *buf, int count, MPI_Datatype datatype, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(3,5); int PMPI_File_iread_all(MPI_File fh, void *buf, int count, MPI_Datatype datatype, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); int PMPI_File_iwrite_all(MPI_File fh, const void *buf, int count, MPI_Datatype datatype, MPI_Request *request) MPICH_ATTR_POINTER_WITH_TYPE_TAG(2,4); #ifndef HAVE_MPI_DARRAY_SUBARRAY /* Section 4.14.4 */ int PMPI_Type_create_subarray(int, int *, int *, int *, int, MPI_Datatype, MPI_Datatype *); /* Section 4.14.5 */ int PMPI_Type_create_darray(int, int, int, int *, int *, int *, int *, int, MPI_Datatype, MPI_Datatype *); #endif # 493 "./src/include/mpio.h" /* Section 4.12.4 */ MPI_File PMPI_File_f2c(MPI_Fint); MPI_Fint PMPI_File_c2f(MPI_File); #ifndef HAVE_MPI_GREQUEST /* The following functions are required if generalized requests are not available, because in that case, an MPIO_Request object is currently used for nonblocking I/O. */ int PMPIO_Test(MPIO_Request *, int *, MPI_Status *); int PMPIO_Wait(MPIO_Request *, MPI_Status *); int PMPIO_Testall(int, MPIO_Request *, int *, MPI_Status *); int PMPIO_Waitall(int, MPIO_Request *, MPI_Status *); int PMPIO_Testany(int, MPIO_Request *, int *, int *, MPI_Status *); int PMPIO_Waitany(int, MPIO_Request *, int *, MPI_Status *); int PMPIO_Waitsome(int, MPIO_Request *, int *, int *, MPI_Status *); int PMPIO_Testsome(int, MPIO_Request *, int *, int *, MPI_Status *); MPI_Fint PMPIO_Request_c2f(MPIO_Request); MPIO_Request PMPIO_Request_f2c(MPI_Fint); #endif /* HAVE_MPI_GREQUEST */ # 513 "./src/include/mpio.h" /* info functions if not defined in the MPI implementation */ #ifndef HAVE_MPI_INFO int PMPI_Info_create(MPI_Info *); int PMPI_Info_set(MPI_Info, char *, char *); int PMPI_Info_delete(MPI_Info, char *); int PMPI_Info_get(MPI_Info, char *, int, char *, int *); int PMPI_Info_get_valuelen(MPI_Info, char *, int *, int *); int PMPI_Info_get_nkeys(MPI_Info, int *); int PMPI_Info_get_nthkey(MPI_Info, int, char *); int PMPI_Info_dup(MPI_Info, MPI_Info *); int PMPI_Info_free(MPI_Info *); MPI_Fint PMPI_Info_c2f(MPI_Info); MPI_Info PMPI_Info_f2c(MPI_Fint); #endif # 530 "./src/include/mpio.h" #if defined(__cplusplus) } #endif # 534 "./src/include/mpio.h" #endif # 536 "./src/include/mpio.h" # 2218 "./src/include/mpi.h" 2 #if defined(__cplusplus) } /* Add the C++ bindings */ /* If MPICH_SKIP_MPICXX is defined, the mpicxx.h file will *not* be included. This is necessary, for example, when building the C++ interfaces. It can also be used when you want to use a C++ compiler to compile C code, and do not want to load the C++ bindings. These definitions can be made by the C++ compilation script */ #if !defined(MPICH_SKIP_MPICXX) /* mpicxx.h contains the MPI C++ binding. In the mpi.h.in file, this include is in an autoconf variable in case the compiler is a C++ compiler but MPI was built without the C++ bindings */ #if 0 /* expanded by -frewrite-includes */ #include "mpicxx.h" #endif /* expanded by -frewrite-includes */ # 2233 "./src/include/mpi.h" # 2234 "./src/include/mpi.h" #endif # 2235 "./src/include/mpi.h" #endif # 2236 "./src/include/mpi.h" /* Generalized requests extensions */ typedef int MPIX_Grequest_class; int MPIX_Grequest_class_create(MPI_Grequest_query_function *query_fn, MPI_Grequest_free_function *free_fn, MPI_Grequest_cancel_function *cancel_fn, MPIX_Grequest_poll_function *poll_fn, MPIX_Grequest_wait_function *wait_fn, MPIX_Grequest_class *greq_class); int MPIX_Grequest_class_allocate(MPIX_Grequest_class greq_class, void *extra_state, MPI_Request *request); int MPIX_Grequest_start(MPI_Grequest_query_function *query_fn, MPI_Grequest_free_function *free_fn, MPI_Grequest_cancel_function *cancel_fn, MPIX_Grequest_poll_function *poll_fn, MPIX_Grequest_wait_function *wait_fn, void *extra_state, MPI_Request *request); /* RMA Mutexes Extensions */ struct mpixi_mutex_s; typedef struct mpixi_mutex_s * MPIX_Mutex; int MPIX_Mutex_create(int count, MPI_Comm comm, MPIX_Mutex *hdl); int MPIX_Mutex_free(MPIX_Mutex *hdl); int MPIX_Mutex_lock(MPIX_Mutex hdl, int mutex, int proc); int MPIX_Mutex_unlock(MPIX_Mutex hdl, int mutex, int proc); #if !defined(MPI_BUILD_PROFILING) /* Generalized requests extensions */ int PMPIX_Grequest_class_create(MPI_Grequest_query_function *query_fn, MPI_Grequest_free_function *free_fn, MPI_Grequest_cancel_function *cancel_fn, MPIX_Grequest_poll_function *poll_fn, MPIX_Grequest_wait_function *wait_fn, MPIX_Grequest_class *greq_class); int PMPIX_Grequest_class_allocate(MPIX_Grequest_class greq_class, void *extra_state, MPI_Request *request); int PMPIX_Grequest_start(MPI_Grequest_query_function *query_fn, MPI_Grequest_free_function *free_fn, MPI_Grequest_cancel_function *cancel_fn, MPIX_Grequest_poll_function *poll_fn, MPIX_Grequest_wait_function *wait_fn, void *extra_state, MPI_Request *request); /* RMA Mutexes Extensions */ int PMPIX_Mutex_create(int count, MPI_Comm comm, MPIX_Mutex *hdl); int PMPIX_Mutex_free(MPIX_Mutex *hdl); int PMPIX_Mutex_lock(MPIX_Mutex hdl, int mutex, int proc); int PMPIX_Mutex_unlock(MPIX_Mutex hdl, int mutex, int proc); #endif /* MPI_BUILD_PROFILING */ # 2287 "./src/include/mpi.h" #endif # 2289 "./src/include/mpi.h" # 139 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 /*****************************************************************************/ /*********************** PART 2: FORWARD DECLARATION *************************/ /*****************************************************************************/ struct MPIR_Request; typedef struct MPIR_Request MPIR_Request; struct MPIR_Comm; typedef struct MPIR_Comm MPIR_Comm; struct MPIR_Datatype; /* FIXME: waiting for Wes' patch revert to fix this */ /* typedef struct MPIR_Datatype MPIR_Datatype; */ struct MPIR_Win; typedef struct MPIR_Win MPIR_Win; struct MPIR_Info; typedef struct MPIR_Info MPIR_Info; struct MPIR_Group; typedef struct MPIR_Group MPIR_Group; struct MPIR_Topology; typedef struct MPIR_Topology MPIR_Topology; /*****************************************************************************/ /******************* PART 3: DEVICE INDEPENDENT HEADERS **********************/ /*****************************************************************************/ #if 0 /* expanded by -frewrite-includes */ #include "mpir_misc.h" #endif /* expanded by -frewrite-includes */ # 172 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_misc.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPIR_MISC_H_INCLUDED #define MPIR_MISC_H_INCLUDED #define MPIR_UNIVERSE_SIZE_NOT_SET -1 #define MPIR_UNIVERSE_SIZE_NOT_AVAILABLE -2 #define MPIR_FINALIZE_CALLBACK_PRIO 5 #define MPIR_FINALIZE_CALLBACK_HANDLE_CHECK_PRIO 1 #define MPIR_FINALIZE_CALLBACK_DEFAULT_PRIO 0 #define MPIR_FINALIZE_CALLBACK_MAX_PRIO 10 /* Define a typedef for the errflag value used by many internal * functions. If an error needs to be returned, these values can be * used to signal such. More details can be found further down in the * code with the bitmasking logic */ typedef enum { MPIR_ERR_NONE = MPI_SUCCESS, MPIR_ERR_PROC_FAILED = MPIX_ERR_PROC_FAILED, MPIR_ERR_OTHER = MPI_ERR_OTHER } MPIR_Errflag_t; /*E MPIR_Lang_t - Known language bindings for MPI A few operations in MPI need to know what language they were called from or created by. This type enumerates the possible languages so that the MPI implementation can choose the correct behavior. An example of this are the keyval attribute copy and delete functions. Module: Attribute-DS E*/ typedef enum MPIR_Lang_t { MPIR_LANG__C #ifdef HAVE_FORTRAN_BINDING , MPIR_LANG__FORTRAN , MPIR_LANG__FORTRAN90 #endif # 46 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_misc.h" #ifdef HAVE_CXX_BINDING , MPIR_LANG__CXX #endif # 49 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_misc.h" } MPIR_Lang_t; extern const char MPII_Version_string[]; extern const char MPII_Version_date[]; extern const char MPII_Version_configure[]; extern const char MPII_Version_device[]; extern const char MPII_Version_CC[]; extern const char MPII_Version_CXX[]; extern const char MPII_Version_F77[]; extern const char MPII_Version_FC[]; extern const char MPII_Version_custom[]; int MPIR_Localcopy(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype); /*@ MPIR_Add_finalize - Add a routine to be called when MPI_Finalize is invoked + routine - Routine to call . extra - Void pointer to data to pass to the routine - priority - Indicates the priority of this callback and controls the order in which callbacks are executed. Use a priority of zero for most handlers; higher priorities will be executed first. Notes: The routine 'MPID_Finalize' is executed with priority 'MPIR_FINALIZE_CALLBACK_PRIO' (currently defined as 5). Handlers with a higher priority execute before 'MPID_Finalize' is called; those with a lower priority after 'MPID_Finalize' is called. @*/ void MPIR_Add_finalize( int (*routine)( void * ), void *extra, int priority ); /* Routines for determining local and remote processes */ int MPIR_Find_local_and_external(struct MPIR_Comm *comm, int *local_size_p, int *local_rank_p, int **local_ranks_p, int *external_size_p, int *external_rank_p, int **external_ranks_p, int **intranode_table, int **internode_table_p); int MPIR_Get_internode_rank(MPIR_Comm *comm_ptr, int r); int MPIR_Get_intranode_rank(MPIR_Comm *comm_ptr, int r); int MPIR_Close_port_impl(const char *port_name); int MPIR_Open_port_impl(MPIR_Info *info_ptr, char *port_name); int MPIR_Cancel_impl(MPIR_Request *request_ptr); #endif /* MPIR_MISC_H_INCLUDED */ # 92 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_misc.h" # 173 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_dbg.h" #endif /* expanded by -frewrite-includes */ # 173 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_dbg.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPIR_DBG_H_INCLUDED #define MPIR_DBG_H_INCLUDED #if defined (MPL_USE_DBG_LOGGING) extern MPL_dbg_class MPIR_DBG_INIT; extern MPL_dbg_class MPIR_DBG_PT2PT; extern MPL_dbg_class MPIR_DBG_THREAD; extern MPL_dbg_class MPIR_DBG_DATATYPE; extern MPL_dbg_class MPIR_DBG_COMM; extern MPL_dbg_class MPIR_DBG_BSEND; extern MPL_dbg_class MPIR_DBG_ERRHAND; extern MPL_dbg_class MPIR_DBG_OTHER; extern MPL_dbg_class MPIR_DBG_REQUEST; extern MPL_dbg_class MPIR_DBG_ASSERT; #endif /* MPL_USE_DBG_LOGGING */ # 23 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_dbg.h" #endif /* MPIR_DBG_H_INCLUDED */ # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_dbg.h" # 174 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_objects.h" #endif /* expanded by -frewrite-includes */ # 174 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_objects.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPIR_OBJECTS_H_INCLUDED #define MPIR_OBJECTS_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpichconf.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_objects.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_objects.h" /*TDSOverview.tex MPI has a number of data structures, most of which are represented by an opaque handle in an MPI program. In the MPICH implementation of MPI, these handles are represented as integers; this makes implementation of the C/Fortran handle transfer calls (part of MPI-2) easy. MPIR objects are allocated by a common set of object allocation functions. where 'objmem' is a pointer to a memory allocation object that knows enough to allocate objects, including the size of the object and the location of preallocated memory, as well as the type of memory allocator. By providing the routines to allocate and free the memory, we make it easy to use the same interface to allocate both local and shared memory for objects (always using the same kind for each type of object). The names create/destroy were chosen because they are different from new/delete (C++ operations) and malloc/free. Any name choice will have some conflicts with other uses, of course. Reference Counts: Many MPI objects have reference count semantics. The semantics of MPI require that many objects that have been freed by the user (e.g., with 'MPI_Type_free' or 'MPI_Comm_free') remain valid until all pending references to that object (e.g., by an 'MPI_Irecv') are complete. There are several ways to implement this; MPICH uses `reference counts` in the objects. To support the 'MPI_THREAD_MULTIPLE' level of thread-safety, these reference counts must be accessed and updated atomically. A reference count for `any` object can be incremented (atomically) with 'MPIR_Object_add_ref(objptr)' and decremented with 'MPIR_Object_release_ref(objptr,newval_ptr)'. These have been designed so that then can be implemented as inlined macros rather than function calls, even in the multithreaded case, and can use special processor instructions that guarantee atomicity to avoid thread locks. The decrement routine sets the value pointed at by 'inuse_ptr' to 0 if the postdecrement value of the reference counter is zero, and to a non-zero value otherwise. If this value is zero, then the routine that decremented the reference count should free the object. This may be as simple as calling 'destroy' (for simple objects with no other allocated storage) or may require calling a separate routine to destroy the object. Because MPI uses 'MPI_xxx_free' to both decrement the reference count and free the object if the reference count is zero, we avoid the use of 'free' in the MPIR destruction routines. The 'inuse_ptr' approach is used rather than requiring the post-decrement value because, for reference-count semantics, all that is necessary is to know when the reference count reaches zero, and this can sometimes be implemented more cheaply that requiring the post-decrement value (e.g., on IA32, there is an instruction for this operation). Question: Should we state that this is a macro so that we can use a register for the output value? That avoids a store. Alternately, have the macro return the value as if it was a function? Structure Definitions: The structure definitions in this document define `only` that part of a structure that may be used by code that is making use of the ADI. Thus, some structures, such as 'MPIR_Comm', have many defined fields; these are used to support MPI routines such as 'MPI_Comm_size' and 'MPI_Comm_remote_group'. Other structures may have few or no defined members; these structures have no fields used outside of the ADI. In C++ terms, all members of these structures are 'private'. For the initial implementation, we expect that the structure definitions will be designed for the multimethod device. However, all items that are specific to a particular device (including the multi-method device) will be placed at the end of the structure; the document will clearly identify the members that all implementations will provide. This simplifies much of the code in both the ADI and the implementation of the MPI routines because structure member can be directly accessed rather than using some macro or C++ style method interface. T*/ /*TOpaqOverview.tex MPI Opaque Objects: MPI Opaque objects such as 'MPI_Comm' or 'MPI_Datatype' are specified by integers (in the MPICH implementation); the MPI standard calls these handles. Out of range values are invalid; the value 0 is reserved. For most (with the possible exception of 'MPI_Request' for performance reasons) MPI Opaque objects, the integer encodes both the kind of object (allowing runtime tests to detect a datatype passed where a communicator is expected) and important properties of the object. Even the 'MPI_xxx_NULL' values should be encoded so that different null handles can be distinguished. The details of the encoding of the handles is covered in more detail in the MPICH Design Document. For the most part, the ADI uses pointers to the underlying structures rather than the handles themselves. However, each structure contains an 'handle' field that is the corresponding integer handle for the MPI object. MPIR objects are not opaque. T*/ /* Known MPI object types. These are used for both the error handlers and for the handles. This is a 4 bit value. 0 is reserved for so that all-zero handles can be flagged as an error. */ /*E MPII_Object_kind - Object kind (communicator, window, or file) Notes: This enum is used by keyvals and errhandlers to indicate the type of object for which MPI opaque types the data is valid. These are defined as bits to allow future expansion to the case where an object is value for multiple types (for example, we may want a universal error handler for errors return). This is also used to indicate the type of MPI object a MPI handle represents. It is an enum because only this applies only the the MPI and internal MPICH objects. The 'MPIR_PROCGROUP' kind is used to manage process groups (different from MPI Groups) that are used to keep track of collections of processes (each 'MPIR_PROCGROUP' corresponds to a group of processes that define an 'MPI_COMM_WORLD'. This becomes important only when MPI-2 dynamic process features are supported. 'MPIR_VCONN' is a virtual connection; while this is not part of the overall ADI3 design, an object that manages connections to other processes is a common need, and 'MPIR_VCONN' may be used for that. Module: Attribute-DS E*/ typedef enum MPII_Object_kind { MPIR_COMM = 0x1, MPIR_GROUP = 0x2, MPIR_DATATYPE = 0x3, MPIR_FILE = 0x4, /* only used obliquely inside MPIR_Errhandler objs */ MPIR_ERRHANDLER = 0x5, MPIR_OP = 0x6, MPIR_INFO = 0x7, MPIR_WIN = 0x8, MPIR_KEYVAL = 0x9, MPIR_ATTR = 0xa, MPIR_REQUEST = 0xb, MPIR_PROCGROUP = 0xc, /* These are internal device objects */ MPIR_VCONN = 0xd, MPIR_GREQ_CLASS = 0xf } MPII_Object_kind; #define HANDLE_MPI_KIND_SHIFT 26 #define HANDLE_GET_MPI_KIND(a) ( ((a)&0x3c000000) >> HANDLE_MPI_KIND_SHIFT ) #define HANDLE_SET_MPI_KIND(a,kind) ((a) | ((kind) << HANDLE_MPI_KIND_SHIFT)) /* returns the name of the handle kind for debugging/logging purposes */ const char *MPIR_Handle_get_kind_str(int kind); /* Handle types. These are really 2 bits */ #define HANDLE_KIND_INVALID 0x0 #define HANDLE_KIND_BUILTIN 0x1 #define HANDLE_KIND_DIRECT 0x2 #define HANDLE_KIND_INDIRECT 0x3 /* Mask assumes that ints are at least 4 bytes */ #define HANDLE_KIND_MASK 0xc0000000 #define HANDLE_KIND_SHIFT 30 #define HANDLE_GET_KIND(a) (((unsigned)(a)&HANDLE_KIND_MASK)>>HANDLE_KIND_SHIFT) #define HANDLE_SET_KIND(a,kind) ((a)|((kind)<> HANDLE_INDIRECT_SHIFT) #define HANDLE_BLOCK_INDEX(a) ((a) & 0x00000FFF) /* Number of blocks is between 1 and 16384 */ #if defined MPID_HANDLE_NUM_BLOCKS #define HANDLE_NUM_BLOCKS MPID_HANDLE_NUM_BLOCKS #else # 190 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_objects.h" #define HANDLE_NUM_BLOCKS 8192 #endif /* MPID_HANDLE_NUM_BLOCKS */ # 192 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_objects.h" /* Number of objects in a block is bewtween 1 and 4096 (each obj has an index * within its block) */ #if defined MPID_HANDLE_NUM_INDICES #define HANDLE_NUM_INDICES MPID_HANDLE_NUM_INDICES #else # 198 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_objects.h" #define HANDLE_NUM_INDICES 1024 #endif /* MPID_HANDLE_NUM_INDICES */ # 200 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_objects.h" /* For direct, the remainder of the handle is the index into a predefined block */ #define HANDLE_MASK 0x03FFFFFF #define HANDLE_INDEX(a) ((a)& HANDLE_MASK) #if defined (MPL_USE_DBG_LOGGING) extern MPL_dbg_class MPIR_DBG_HANDLE; #endif /* MPL_USE_DBG_LOGGING */ # 209 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_objects.h" /* ------------------------------------------------------------------------- */ /* reference counting macros */ /* If we're debugging the handles (including reference counts), add an additional test. The check on a max refcount helps to detect objects whose refcounts are not decremented as many times as they are incremented */ #ifdef MPICH_DEBUG_HANDLES #define MPICH_DEBUG_MAX_REFCOUNT 64 #define HANDLE_CHECK_REFCOUNT(objptr_,op_) \ do { \ int local_ref_count_ = MPIR_Object_get_ref(objptr_); \ if (local_ref_count_ > MPICH_DEBUG_MAX_REFCOUNT || local_ref_count_ < 0) \ { \ MPL_DBG_MSG_FMT(MPIR_DBG_HANDLE,TYPICAL,(MPL_DBG_FDEST, \ "Invalid refcount (%d) in %p (0x%08x) %s", \ local_ref_count_, (objptr_), (objptr_)->handle, op_)); \ } \ MPIR_Assert(local_ref_count_ >= 0); \ } while (0) #else # 231 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_objects.h" #define HANDLE_CHECK_REFCOUNT(objptr_,op_) \ MPIR_Assert(MPIR_Object_get_ref(objptr_) >= 0) #endif # 234 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_objects.h" #define HANDLE_LOG_REFCOUNT_CHANGE(objptr_, action_str_) \ MPL_DBG_MSG_FMT(MPIR_DBG_HANDLE,TYPICAL,(MPL_DBG_FDEST, \ "%s %p (0x%08x kind=%s) refcount to %d", \ (action_str_), \ (objptr_), \ (objptr_)->handle, \ MPIR_Handle_get_kind_str(HANDLE_GET_MPI_KIND((objptr_)->handle)), \ MPIR_Object_get_ref(objptr_))) /* The "_always" versions of these macros unconditionally manipulate the * reference count of the given object. They exist to permit an optimization * of not reference counting predefined objects. */ /* The MPL_DBG... statements are macros that vanish unless --enable-g=log is selected. HANDLE_CHECK_REFCOUNT is defined above, and adds an additional sanity check for the refcounts */ #if MPICH_THREAD_REFCOUNT == MPICH_REFCOUNT__NONE typedef int Handle_ref_count; #define MPIR_Object_set_ref(objptr_,val) \ do { \ (objptr_)->ref_count = val; \ HANDLE_LOG_REFCOUNT_CHANGE(objptr_, "set"); \ } while (0) /* must be used with care, since there is no synchronization for this read */ #define MPIR_Object_get_ref(objptr_) \ ((objptr_)->ref_count) #define MPIR_Object_add_ref_always(objptr_) \ do { \ (objptr_)->ref_count++; \ HANDLE_LOG_REFCOUNT_CHANGE(objptr_, "incr"); \ HANDLE_CHECK_REFCOUNT(objptr_,"incr"); \ } while (0) #define MPIR_Object_release_ref_always(objptr_,inuse_ptr) \ do { \ *(inuse_ptr) = --((objptr_)->ref_count); \ HANDLE_LOG_REFCOUNT_CHANGE(objptr_, "decr"); \ HANDLE_CHECK_REFCOUNT(objptr_,"decr"); \ } while (0) #elif MPICH_THREAD_REFCOUNT == MPICH_REFCOUNT__LOCKFREE # 280 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_objects.h" #if 0 /* expanded by -frewrite-includes */ #include "opa_primitives.h" #endif /* expanded by -frewrite-includes */ # 281 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_objects.h" # 282 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_objects.h" typedef OPA_int_t Handle_ref_count; #define MPIR_Object_set_ref(objptr_,val) \ do { \ OPA_store_int(&(objptr_)->ref_count, val); \ HANDLE_LOG_REFCOUNT_CHANGE(objptr_, "set"); \ } while (0) /* must be used with care, since there is no synchronization for this read */ #define MPIR_Object_get_ref(objptr_) \ (OPA_load_int(&(objptr_)->ref_count)) #define MPIR_Object_add_ref_always(objptr_) \ do { \ OPA_incr_int(&((objptr_)->ref_count)); \ HANDLE_LOG_REFCOUNT_CHANGE(objptr_, "incr"); \ HANDLE_CHECK_REFCOUNT(objptr_,"incr"); \ } while (0) #define MPIR_Object_release_ref_always(objptr_,inuse_ptr) \ do { \ int got_zero_ = OPA_decr_and_test_int(&((objptr_)->ref_count)); \ *(inuse_ptr) = got_zero_ ? 0 : 1; \ HANDLE_LOG_REFCOUNT_CHANGE(objptr_, "decr"); \ HANDLE_CHECK_REFCOUNT(objptr_,"decr"); \ } while (0) #else # 308 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_objects.h" #error invalid value for MPICH_THREAD_REFCOUNT #endif # 310 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_objects.h" /* TODO someday we should probably always suppress predefined object refcounting, * but we don't have total confidence in it yet. So until we gain sufficient * confidence, this is a configurable option. */ #if defined(MPICH_THREAD_SUPPRESS_PREDEFINED_REFCOUNTS) /* The assumption here is that objects with handles of type HANDLE_KIND_BUILTIN * will be created/destroyed only at MPI_Init/MPI_Finalize time and don't need * to be reference counted. This can be a big performance win on some * platforms, such as BG/P. * * It is also assumed that any object being reference counted via these macros * will have a valid value in the handle field, even if it is * HANDLE_SET_KIND(0, HANDLE_KIND_INVALID) */ /* TODO profile and examine the assembly that is generated for this if() on Blue * Gene (and elsewhere). We may need to mark it unlikely(). */ #define MPIR_Object_add_ref(objptr_) \ do { \ int handle_kind_ = HANDLE_GET_KIND((objptr_)->handle); \ if (unlikely(handle_kind_ != HANDLE_KIND_BUILTIN)) { \ MPIR_Object_add_ref_always((objptr_)); \ } \ else { \ MPL_DBG_MSG_FMT(MPIR_DBG_HANDLE,TYPICAL,(MPL_DBG_FDEST, \ "skipping add_ref on %p (0x%08x kind=%s) refcount=%d", \ (objptr_), \ (objptr_)->handle, \ MPIR_Handle_get_kind_str(HANDLE_GET_MPI_KIND((objptr_)->handle)), \ MPIR_Object_get_ref(objptr_))) \ } \ } while (0) #define MPIR_Object_release_ref(objptr_,inuse_ptr_) \ do { \ int handle_kind_ = HANDLE_GET_KIND((objptr_)->handle); \ if (unlikely(handle_kind_ != HANDLE_KIND_BUILTIN)) { \ MPIR_Object_release_ref_always((objptr_), (inuse_ptr_)); \ } \ else { \ *(inuse_ptr_) = 1; \ MPL_DBG_MSG_FMT(MPIR_DBG_HANDLE,TYPICAL,(MPL_DBG_FDEST, \ "skipping release_ref on %p (0x%08x kind=%s) refcount=%d", \ (objptr_), \ (objptr_)->handle, \ MPIR_Handle_get_kind_str(HANDLE_GET_MPI_KIND((objptr_)->handle)), \ MPIR_Object_get_ref(objptr_))) \ } \ } while (0) #else /* !defined(MPICH_THREAD_SUPPRESS_PREDEFINED_REFCOUNTS) */ # 359 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_objects.h" /* the base case, where we just always manipulate the reference counts */ #define MPIR_Object_add_ref(objptr_) \ MPIR_Object_add_ref_always((objptr_)) #define MPIR_Object_release_ref(objptr_,inuse_ptr_) \ MPIR_Object_release_ref_always((objptr_),(inuse_ptr_)) #endif # 367 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_objects.h" /* end reference counting macros */ /* ------------------------------------------------------------------------- */ /* This macro defines structure fields that are needed in order to use the * reference counting and object allocation macros/functions in MPICH. This * allows us to avoid casting and violating C's strict aliasing rules in most * cases. * * All *active* (in use) objects have the handle as the first value; objects * with referene counts have the reference count as the second value. See * MPIR_Object_add_ref and MPIR_Object_release_ref. * * NOTE: This macro *must* be invoked as the very first element of the structure! */ #define MPIR_OBJECT_HEADER \ int handle; \ Handle_ref_count ref_count/*semicolon intentionally omitted*/ /* ALL objects have the handle as the first value. */ /* Inactive (unused and stored on the appropriate avail list) objects have MPIR_Handle_common as the head */ typedef struct MPIR_Handle_common { MPIR_OBJECT_HEADER; void *next; /* Free handles use this field to point to the next free object */ } MPIR_Handle_common; /* This type contains all of the data, except for the direct array, used by the object allocators. */ typedef struct MPIR_Object_alloc_t { MPIR_Handle_common *avail; /* Next available object */ int initialized; /* */ void *(*indirect)[]; /* Pointer to indirect object blocks */ int indirect_size; /* Number of allocated indirect blocks */ MPII_Object_kind kind; /* Kind of object this is for */ int size; /* Size of an individual object */ void *direct; /* Pointer to direct block, used for allocation */ int direct_size; /* Size of direct block */ } MPIR_Object_alloc_t; static inline void *MPIR_Handle_obj_alloc(MPIR_Object_alloc_t *); static inline void *MPIR_Handle_obj_alloc_unsafe(MPIR_Object_alloc_t *); static inline void MPIR_Handle_obj_free( MPIR_Object_alloc_t *, void * ); static inline void *MPIR_Handle_get_ptr_indirect( int, MPIR_Object_alloc_t * ); /* Convert Handles to objects for MPI types that have predefined objects */ /* TODO examine generated assembly for this construct, it's probably suboptimal * on Blue Gene. An if/else if/else might help the compiler out. It also lets * us hint that one case is likely(), usually the BUILTIN case. */ #define MPIR_Getb_ptr(kind,a,bmsk,ptr) \ { \ switch (HANDLE_GET_KIND(a)) { \ case HANDLE_KIND_BUILTIN: \ ptr=MPIR_##kind##_builtin+((a)&(bmsk)); \ break; \ case HANDLE_KIND_DIRECT: \ ptr=MPIR_##kind##_direct+HANDLE_INDEX(a); \ break; \ case HANDLE_KIND_INDIRECT: \ ptr=((MPIR_##kind*) \ MPIR_Handle_get_ptr_indirect(a,&MPIR_##kind##_mem)); \ break; \ case HANDLE_KIND_INVALID: \ default: \ ptr=0; \ break; \ } \ } /* Convert handles to objects for MPI types that do _not_ have any predefined objects */ #define MPIR_Get_ptr(kind,a,ptr) \ { \ switch (HANDLE_GET_KIND(a)) { \ case HANDLE_KIND_DIRECT: \ ptr=MPIR_##kind##_direct+HANDLE_INDEX(a); \ break; \ case HANDLE_KIND_INDIRECT: \ ptr=((MPIR_##kind*) \ MPIR_Handle_get_ptr_indirect(a,&MPIR_##kind##_mem)); \ break; \ case HANDLE_KIND_INVALID: \ case HANDLE_KIND_BUILTIN: \ default: \ ptr=0; \ break; \ } \ } /* FIXME: the masks should be defined with the handle definitions instead of inserted here as literals */ #define MPIR_Comm_get_ptr(a,ptr) MPIR_Getb_ptr(Comm,a,0x03ffffff,ptr) #define MPIR_Group_get_ptr(a,ptr) MPIR_Getb_ptr(Group,a,0x03ffffff,ptr) #define MPIR_Errhandler_get_ptr(a,ptr) MPIR_Getb_ptr(Errhandler,a,0x3,ptr) #define MPIR_Op_get_ptr(a,ptr) MPIR_Getb_ptr(Op,a,0x000000ff,ptr) #define MPIR_Info_get_ptr(a,ptr) MPIR_Getb_ptr(Info,a,0x03ffffff,ptr) #define MPIR_Win_get_ptr(a,ptr) MPIR_Get_ptr(Win,a,ptr) #define MPIR_Request_get_ptr(a,ptr) MPIR_Get_ptr(Request,a,ptr) #define MPIR_Grequest_class_get_ptr(a,ptr) MPIR_Get_ptr(Grequest_class,a,ptr) /* Keyvals have a special format. This is roughly MPIR_Get_ptrb, but the handle index is in a smaller bit field. In addition, there is no storage for the builtin keyvals. For the indirect case, we mask off the part of the keyval that is in the bits normally used for the indirect block index. */ #define MPII_Keyval_get_ptr(a,ptr) \ { \ switch (HANDLE_GET_KIND(a)) { \ case HANDLE_KIND_BUILTIN: \ ptr=0; \ break; \ case HANDLE_KIND_DIRECT: \ ptr=MPII_Keyval_direct+((a)&0x3fffff); \ break; \ case HANDLE_KIND_INDIRECT: \ ptr=((MPII_Keyval*) \ MPIR_Handle_get_ptr_indirect((a)&0xfc3fffff,&MPII_Keyval_mem)); \ break; \ case HANDLE_KIND_INVALID: \ default: \ ptr=0; \ break; \ } \ } #endif /* MPIR_OBJECTS_H_INCLUDED */ # 495 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_objects.h" # 175 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_strerror.h" #endif /* expanded by -frewrite-includes */ # 175 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_strerror.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPIR_STRERROR_H_INCLUDED) #define MPIR_STRERROR_H_INCLUDED /* * MPIR_Sterror() * * Thread safe implementation of strerror(), whenever possible. */ const char *MPIR_Strerror(int errnum); #endif /* !defined(MPIR_STRERROR_H_INCLUDED) */ # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_strerror.h" # 176 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_type_defs.h" #endif /* expanded by -frewrite-includes */ # 176 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPIR_TYPE_DEFS_H_INCLUDED) #define MPIR_TYPE_DEFS_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpichconf.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" /* Basic typedefs */ #ifdef HAVE_SYS_BITYPES_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/bitypes.h" 1 3 /* The GNU defines all the necessary types. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 3 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/bitypes.h" 3 # 4 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/bitypes.h" 3 # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" 2 #endif # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" /* inttypes.h is supposed to include stdint.h but this is here as belt-and-suspenders for platforms that aren't fully compliant */ #ifdef HAVE_INTTYPES_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" #endif # 22 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" /* stdint.h gives us fixed-width C99 types like int16_t, among others */ #ifdef HAVE_STDINT_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" # 26 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" #endif # 27 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" /* stdbool.h gives us the C boolean type */ #ifdef HAVE_STDBOOL_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 30 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" # 1 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stdbool.h" 1 3 /*===---- stdbool.h - Standard header for booleans -------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #ifndef __STDBOOL_H #define __STDBOOL_H /* Don't define bool, true, and false in C++, except as a GNU extension. */ #ifndef __cplusplus #define bool _Bool #define true 1 #define false 0 #elif defined(__GNUC__) && !defined(__STRICT_ANSI__) # 35 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stdbool.h" 3 /* Define _Bool, bool, false, true as a GNU extension. */ #define _Bool bool #define bool bool #define false false #define true true #endif # 41 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stdbool.h" 3 #define __bool_true_false_are_defined 1 #endif /* __STDBOOL_H */ # 45 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stdbool.h" 3 # 31 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" 2 #endif # 32 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" /* complex.h gives us the C complex type */ #ifdef HAVE_COMPLEX_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/complex.h" 1 3 /* Copyright (C) 1997-2000, 2006, 2011, 2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99: 7.3 Complex arithmetic */ #ifndef _COMPLEX_H #define _COMPLEX_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 25 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/complex.h" 3 # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/complex.h" 3 /* Get general and ISO C99 specific information. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/complex.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/mathdef.h" 1 3 /* Copyright (C) 1997,1998,1999,2000,2003,2004,2006,2010,2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if !defined _MATH_H && !defined _COMPLEX_H # error "Never use directly; include instead" #endif # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/mathdef.h" 3 /* FIXME! This file describes properties of the compiler, not the machine; it should not be part of libc! FIXME! This file does not deal with the -fshort-double option of gcc! */ #if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF # define _MATH_H_MATHDEF 1 /* PowerPC has both `float' and `double' arithmetic. */ typedef float float_t; typedef double double_t; /* The values returned by `ilogb' for 0 and NaN respectively. */ # define FP_ILOGB0 (-2147483647) # define FP_ILOGBNAN (2147483647) /* The powerpc has a combined multiply/add instruction. */ # define FP_FAST_FMA 1 # define FP_FAST_FMAF 1 #endif /* ISO C99 */ # 46 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/mathdef.h" 3 # 29 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/complex.h" 2 3 __BEGIN_DECLS /* We might need to add support for more compilers here. But since ISO C99 is out hopefully all maintained compilers will soon provide the data types `float complex' and `double complex'. */ #if __GNUC_PREREQ (2, 7) && !__GNUC_PREREQ (2, 97) # define _Complex __complex__ #endif # 38 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/complex.h" 3 #define complex _Complex /* Narrowest imaginary unit. This depends on the floating-point evaluation method. XXX This probably has to go into a gcc related file. */ #define _Complex_I (__extension__ 1.0iF) /* Another more descriptive name is `I'. XXX Once we have the imaginary support switch this to _Imaginary_I. */ #undef I #define I _Complex_I #if defined __USE_ISOC11 && __GNUC_PREREQ (4, 7) /* Macros to expand into expression of specified complex type. */ # define CMPLX(x, y) __builtin_complex ((double) (x), (double) (y)) # define CMPLXF(x, y) __builtin_complex ((float) (x), (float) (y)) # ifndef __NO_LONG_DOUBLE_MATH # define CMPLXL(x, y) __builtin_complex ((long double) (x), (long double) (y)) # endif # 58 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/complex.h" 3 #endif # 59 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/complex.h" 3 /* The file contains the prototypes for all the actual math functions. These macros are used for those prototypes, so we can easily declare each function as both `name' and `__name', and can declare the float versions `namef' and `__namef'. */ #define __MATHCALL(function, args) \ __MATHDECL (_Mdouble_complex_,function, args) #define __MATHDECL(type, function, args) \ __MATHDECL_1(type, function, args); \ __MATHDECL_1(type, __CONCAT(__,function), args) #define __MATHDECL_1(type, function, args) \ extern type __MATH_PRECNAME(function) args __THROW #define _Mdouble_ double #define __MATH_PRECNAME(name) name #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 75 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/complex.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/cmathcalls.h" 1 3 /* Prototype declarations for complex math functions; helper file for . Copyright (C) 1997, 1998, 2001, 2007 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* NOTE: Because of the special way this file is used by , this file must NOT be protected from multiple inclusion as header files usually are. This file provides prototype declarations for the math functions. Most functions are declared using the macro: __MATHCALL (NAME, (ARGS...)); This means there is a function `NAME' returning `double' and a function `NAMEf' returning `float'. Each place `_Mdouble_' appears in the prototype, that is actually `double' in the prototype for `NAME' and `float' in the prototype for `NAMEf'. Reentrant variant functions are called `NAME_r' and `NAMEf_r'. Functions returning other types like `int' are declared using the macro: __MATHDECL (TYPE, NAME, (ARGS...)); This is just like __MATHCALL but for a function returning `TYPE' instead of `_Mdouble_'. In all of these cases, there is still both a `NAME' and a `NAMEf' that takes `float' arguments. */ #ifndef _COMPLEX_H #error "Never use directly; include instead." #endif # 46 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/cmathcalls.h" 3 #define _Mdouble_complex_ _Mdouble_ _Complex /* Trigonometric functions. */ /* Arc cosine of Z. */ __MATHCALL (cacos, (_Mdouble_complex_ __z)); /* Arc sine of Z. */ __MATHCALL (casin, (_Mdouble_complex_ __z)); /* Arc tangent of Z. */ __MATHCALL (catan, (_Mdouble_complex_ __z)); /* Cosine of Z. */ __MATHCALL (ccos, (_Mdouble_complex_ __z)); /* Sine of Z. */ __MATHCALL (csin, (_Mdouble_complex_ __z)); /* Tangent of Z. */ __MATHCALL (ctan, (_Mdouble_complex_ __z)); /* Hyperbolic functions. */ /* Hyperbolic arc cosine of Z. */ __MATHCALL (cacosh, (_Mdouble_complex_ __z)); /* Hyperbolic arc sine of Z. */ __MATHCALL (casinh, (_Mdouble_complex_ __z)); /* Hyperbolic arc tangent of Z. */ __MATHCALL (catanh, (_Mdouble_complex_ __z)); /* Hyperbolic cosine of Z. */ __MATHCALL (ccosh, (_Mdouble_complex_ __z)); /* Hyperbolic sine of Z. */ __MATHCALL (csinh, (_Mdouble_complex_ __z)); /* Hyperbolic tangent of Z. */ __MATHCALL (ctanh, (_Mdouble_complex_ __z)); /* Exponential and logarithmic functions. */ /* Exponential function of Z. */ __MATHCALL (cexp, (_Mdouble_complex_ __z)); /* Natural logarithm of Z. */ __MATHCALL (clog, (_Mdouble_complex_ __z)); #ifdef __USE_GNU /* The base 10 logarithm is not defined by the standard but to implement the standard C++ library it is handy. */ __MATHCALL (clog10, (_Mdouble_complex_ __z)); #endif # 97 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/cmathcalls.h" 3 /* Power functions. */ /* Return X to the Y power. */ __MATHCALL (cpow, (_Mdouble_complex_ __x, _Mdouble_complex_ __y)); /* Return the square root of Z. */ __MATHCALL (csqrt, (_Mdouble_complex_ __z)); /* Absolute value, conjugates, and projection. */ /* Absolute value of Z. */ __MATHDECL (_Mdouble_,cabs, (_Mdouble_complex_ __z)); /* Argument value of Z. */ __MATHDECL (_Mdouble_,carg, (_Mdouble_complex_ __z)); /* Complex conjugate of Z. */ __MATHCALL (conj, (_Mdouble_complex_ __z)); /* Projection of Z onto the Riemann sphere. */ __MATHCALL (cproj, (_Mdouble_complex_ __z)); /* Decomposing complex values. */ /* Imaginary part of Z. */ __MATHDECL (_Mdouble_,cimag, (_Mdouble_complex_ __z)); /* Real part of Z. */ __MATHDECL (_Mdouble_,creal, (_Mdouble_complex_ __z)); /* Now some optimized versions. GCC has handy notations for these functions. Recent GCC handles these as builtin functions so does not need inlines. */ #if defined __GNUC__ && !__GNUC_PREREQ (2, 97) && defined __OPTIMIZE__ \ && defined __extern_inline /* Imaginary part of Z. */ __extern_inline _Mdouble_ __MATH_PRECNAME(cimag) (_Mdouble_complex_ __z) __THROW { return __imag__ __z; } /* Real part of Z. */ __extern_inline _Mdouble_ __MATH_PRECNAME(creal) (_Mdouble_complex_ __z) __THROW { return __real__ __z; } /* Complex conjugate of Z. */ __extern_inline _Mdouble_complex_ __MATH_PRECNAME(conj) (_Mdouble_complex_ __z) __THROW { return __extension__ ~__z; } #endif # 159 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/cmathcalls.h" 3 # 76 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/complex.h" 2 3 #undef _Mdouble_ #undef __MATH_PRECNAME /* Now the float versions. */ #ifndef _Mfloat_ # define _Mfloat_ float #endif # 83 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/complex.h" 3 #define _Mdouble_ _Mfloat_ #define __MATH_PRECNAME(name) name##f #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 85 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/complex.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/cmathcalls.h" 1 3 /* Prototype declarations for complex math functions; helper file for . Copyright (C) 1997, 1998, 2001, 2007 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* NOTE: Because of the special way this file is used by , this file must NOT be protected from multiple inclusion as header files usually are. This file provides prototype declarations for the math functions. Most functions are declared using the macro: __MATHCALL (NAME, (ARGS...)); This means there is a function `NAME' returning `double' and a function `NAMEf' returning `float'. Each place `_Mdouble_' appears in the prototype, that is actually `double' in the prototype for `NAME' and `float' in the prototype for `NAMEf'. Reentrant variant functions are called `NAME_r' and `NAMEf_r'. Functions returning other types like `int' are declared using the macro: __MATHDECL (TYPE, NAME, (ARGS...)); This is just like __MATHCALL but for a function returning `TYPE' instead of `_Mdouble_'. In all of these cases, there is still both a `NAME' and a `NAMEf' that takes `float' arguments. */ #ifndef _COMPLEX_H #error "Never use directly; include instead." #endif # 46 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/cmathcalls.h" 3 #define _Mdouble_complex_ _Mdouble_ _Complex /* Trigonometric functions. */ /* Arc cosine of Z. */ __MATHCALL (cacos, (_Mdouble_complex_ __z)); /* Arc sine of Z. */ __MATHCALL (casin, (_Mdouble_complex_ __z)); /* Arc tangent of Z. */ __MATHCALL (catan, (_Mdouble_complex_ __z)); /* Cosine of Z. */ __MATHCALL (ccos, (_Mdouble_complex_ __z)); /* Sine of Z. */ __MATHCALL (csin, (_Mdouble_complex_ __z)); /* Tangent of Z. */ __MATHCALL (ctan, (_Mdouble_complex_ __z)); /* Hyperbolic functions. */ /* Hyperbolic arc cosine of Z. */ __MATHCALL (cacosh, (_Mdouble_complex_ __z)); /* Hyperbolic arc sine of Z. */ __MATHCALL (casinh, (_Mdouble_complex_ __z)); /* Hyperbolic arc tangent of Z. */ __MATHCALL (catanh, (_Mdouble_complex_ __z)); /* Hyperbolic cosine of Z. */ __MATHCALL (ccosh, (_Mdouble_complex_ __z)); /* Hyperbolic sine of Z. */ __MATHCALL (csinh, (_Mdouble_complex_ __z)); /* Hyperbolic tangent of Z. */ __MATHCALL (ctanh, (_Mdouble_complex_ __z)); /* Exponential and logarithmic functions. */ /* Exponential function of Z. */ __MATHCALL (cexp, (_Mdouble_complex_ __z)); /* Natural logarithm of Z. */ __MATHCALL (clog, (_Mdouble_complex_ __z)); #ifdef __USE_GNU /* The base 10 logarithm is not defined by the standard but to implement the standard C++ library it is handy. */ __MATHCALL (clog10, (_Mdouble_complex_ __z)); #endif # 97 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/cmathcalls.h" 3 /* Power functions. */ /* Return X to the Y power. */ __MATHCALL (cpow, (_Mdouble_complex_ __x, _Mdouble_complex_ __y)); /* Return the square root of Z. */ __MATHCALL (csqrt, (_Mdouble_complex_ __z)); /* Absolute value, conjugates, and projection. */ /* Absolute value of Z. */ __MATHDECL (_Mdouble_,cabs, (_Mdouble_complex_ __z)); /* Argument value of Z. */ __MATHDECL (_Mdouble_,carg, (_Mdouble_complex_ __z)); /* Complex conjugate of Z. */ __MATHCALL (conj, (_Mdouble_complex_ __z)); /* Projection of Z onto the Riemann sphere. */ __MATHCALL (cproj, (_Mdouble_complex_ __z)); /* Decomposing complex values. */ /* Imaginary part of Z. */ __MATHDECL (_Mdouble_,cimag, (_Mdouble_complex_ __z)); /* Real part of Z. */ __MATHDECL (_Mdouble_,creal, (_Mdouble_complex_ __z)); /* Now some optimized versions. GCC has handy notations for these functions. Recent GCC handles these as builtin functions so does not need inlines. */ #if defined __GNUC__ && !__GNUC_PREREQ (2, 97) && defined __OPTIMIZE__ \ && defined __extern_inline /* Imaginary part of Z. */ __extern_inline _Mdouble_ __MATH_PRECNAME(cimag) (_Mdouble_complex_ __z) __THROW { return __imag__ __z; } /* Real part of Z. */ __extern_inline _Mdouble_ __MATH_PRECNAME(creal) (_Mdouble_complex_ __z) __THROW { return __real__ __z; } /* Complex conjugate of Z. */ __extern_inline _Mdouble_complex_ __MATH_PRECNAME(conj) (_Mdouble_complex_ __z) __THROW { return __extension__ ~__z; } #endif # 159 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/cmathcalls.h" 3 # 86 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/complex.h" 2 3 #undef _Mdouble_ #undef __MATH_PRECNAME /* And the long double versions. It is non-critical to define them here unconditionally since `long double' is required in ISO C99. */ #if !(defined __NO_LONG_DOUBLE_MATH && defined _LIBC) \ || defined __LDBL_COMPAT # ifdef __LDBL_COMPAT # undef __MATHDECL_1 # define __MATHDECL_1(type, function, args) \ extern type __REDIRECT_NTH(__MATH_PRECNAME(function), args, function) # endif # 98 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/complex.h" 3 # ifndef _Mlong_double_ # define _Mlong_double_ long double # endif # 102 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/complex.h" 3 # define _Mdouble_ _Mlong_double_ # define __MATH_PRECNAME(name) name##l #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 104 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/complex.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/cmathcalls.h" 1 3 /* Prototype declarations for complex math functions; helper file for . Copyright (C) 1997, 1998, 2001, 2007 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* NOTE: Because of the special way this file is used by , this file must NOT be protected from multiple inclusion as header files usually are. This file provides prototype declarations for the math functions. Most functions are declared using the macro: __MATHCALL (NAME, (ARGS...)); This means there is a function `NAME' returning `double' and a function `NAMEf' returning `float'. Each place `_Mdouble_' appears in the prototype, that is actually `double' in the prototype for `NAME' and `float' in the prototype for `NAMEf'. Reentrant variant functions are called `NAME_r' and `NAMEf_r'. Functions returning other types like `int' are declared using the macro: __MATHDECL (TYPE, NAME, (ARGS...)); This is just like __MATHCALL but for a function returning `TYPE' instead of `_Mdouble_'. In all of these cases, there is still both a `NAME' and a `NAMEf' that takes `float' arguments. */ #ifndef _COMPLEX_H #error "Never use directly; include instead." #endif # 46 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/cmathcalls.h" 3 #define _Mdouble_complex_ _Mdouble_ _Complex /* Trigonometric functions. */ /* Arc cosine of Z. */ __MATHCALL (cacos, (_Mdouble_complex_ __z)); /* Arc sine of Z. */ __MATHCALL (casin, (_Mdouble_complex_ __z)); /* Arc tangent of Z. */ __MATHCALL (catan, (_Mdouble_complex_ __z)); /* Cosine of Z. */ __MATHCALL (ccos, (_Mdouble_complex_ __z)); /* Sine of Z. */ __MATHCALL (csin, (_Mdouble_complex_ __z)); /* Tangent of Z. */ __MATHCALL (ctan, (_Mdouble_complex_ __z)); /* Hyperbolic functions. */ /* Hyperbolic arc cosine of Z. */ __MATHCALL (cacosh, (_Mdouble_complex_ __z)); /* Hyperbolic arc sine of Z. */ __MATHCALL (casinh, (_Mdouble_complex_ __z)); /* Hyperbolic arc tangent of Z. */ __MATHCALL (catanh, (_Mdouble_complex_ __z)); /* Hyperbolic cosine of Z. */ __MATHCALL (ccosh, (_Mdouble_complex_ __z)); /* Hyperbolic sine of Z. */ __MATHCALL (csinh, (_Mdouble_complex_ __z)); /* Hyperbolic tangent of Z. */ __MATHCALL (ctanh, (_Mdouble_complex_ __z)); /* Exponential and logarithmic functions. */ /* Exponential function of Z. */ __MATHCALL (cexp, (_Mdouble_complex_ __z)); /* Natural logarithm of Z. */ __MATHCALL (clog, (_Mdouble_complex_ __z)); #ifdef __USE_GNU /* The base 10 logarithm is not defined by the standard but to implement the standard C++ library it is handy. */ __MATHCALL (clog10, (_Mdouble_complex_ __z)); #endif # 97 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/cmathcalls.h" 3 /* Power functions. */ /* Return X to the Y power. */ __MATHCALL (cpow, (_Mdouble_complex_ __x, _Mdouble_complex_ __y)); /* Return the square root of Z. */ __MATHCALL (csqrt, (_Mdouble_complex_ __z)); /* Absolute value, conjugates, and projection. */ /* Absolute value of Z. */ __MATHDECL (_Mdouble_,cabs, (_Mdouble_complex_ __z)); /* Argument value of Z. */ __MATHDECL (_Mdouble_,carg, (_Mdouble_complex_ __z)); /* Complex conjugate of Z. */ __MATHCALL (conj, (_Mdouble_complex_ __z)); /* Projection of Z onto the Riemann sphere. */ __MATHCALL (cproj, (_Mdouble_complex_ __z)); /* Decomposing complex values. */ /* Imaginary part of Z. */ __MATHDECL (_Mdouble_,cimag, (_Mdouble_complex_ __z)); /* Real part of Z. */ __MATHDECL (_Mdouble_,creal, (_Mdouble_complex_ __z)); /* Now some optimized versions. GCC has handy notations for these functions. Recent GCC handles these as builtin functions so does not need inlines. */ #if defined __GNUC__ && !__GNUC_PREREQ (2, 97) && defined __OPTIMIZE__ \ && defined __extern_inline /* Imaginary part of Z. */ __extern_inline _Mdouble_ __MATH_PRECNAME(cimag) (_Mdouble_complex_ __z) __THROW { return __imag__ __z; } /* Real part of Z. */ __extern_inline _Mdouble_ __MATH_PRECNAME(creal) (_Mdouble_complex_ __z) __THROW { return __real__ __z; } /* Complex conjugate of Z. */ __extern_inline _Mdouble_complex_ __MATH_PRECNAME(conj) (_Mdouble_complex_ __z) __THROW { return __extension__ ~__z; } #endif # 159 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/cmathcalls.h" 3 # 105 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/complex.h" 2 3 #endif # 106 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/complex.h" 3 #undef _Mdouble_ #undef __MATH_PRECNAME #undef __MATHDECL_1 #undef __MATHDECL #undef __MATHCALL __END_DECLS #endif /* complex.h */ # 115 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/complex.h" 3 # 36 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" 2 #endif # 37 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" #ifdef HAVE_WINDOWS_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 39 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" # 40 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 40 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" # 41 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" #else # 42 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" #ifndef BOOL #define BOOL int #endif # 45 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" #endif # 46 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl.h" #endif /* expanded by -frewrite-includes */ # 47 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" # 48 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" /* Use the MPIR_PtrToXXX macros to convert pointers to and from integer types */ /* The Microsoft compiler will not allow casting of different sized types * without * printing a compiler warning. Using these macros allows compiler specific * type casting and avoids the warning output. These macros should only be used * in code that can handle loss of bits. */ /* PtrToAint converts a pointer to an MPI_Aint type, truncating bits if necessary */ #ifdef HAVE_PTRTOAINT #define MPIR_Ptr_to_aint(a) ((MPI_Aint)(INT_PTR) (a)) #else # 62 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" /* An MPI_Aint may be *larger* than a pointer. By using 2 casts, we can keep some compilers from complaining about converting a pointer to an integer of a different size */ #define MPIR_Ptr_to_aint(a) ((MPI_Aint)(uintptr_t)(a)) #endif # 67 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" /* AintToPtr converts an MPI_Aint to a pointer type, extending bits if necessary */ #ifdef HAVE_AINTTOPTR #define MPIR_Aint_to_ptr(a) ((VOID *)(INT_PTR)((MPI_Aint)a)) #else # 72 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" #define MPIR_Aint_to_ptr(a) (void*)(a) #endif # 74 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" /* Adding the 32-bit compute/64-bit I/O related type-casts in here as * they are not a part of the MPI standard yet. */ #define MPIR_AINT_CAST_TO_VOID_PTR (void *)(intptr_t) #define MPIR_VOID_PTR_CAST_TO_MPI_AINT (MPI_Aint)(uintptr_t) #define MPIR_PTR_DISP_CAST_TO_MPI_AINT (MPI_Aint)(intptr_t) #endif /* !defined(MPIR_TYPE_DEFS_H_INCLUDED) */ # 82 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_type_defs.h" # 177 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_assert.h" #endif /* expanded by -frewrite-includes */ # 177 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_assert.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPIR_ASSERT_H_INCLUDED) #define MPIR_ASSERT_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpir_type_defs.h" #endif /* expanded by -frewrite-includes */ # 9 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_assert.h" # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_assert.h" /* modern versions of clang support lots of C11 features */ #if defined(__has_extension) # if __has_extension(c_generic_selections) # define HAVE_C11__GENERIC 1 # endif # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_assert.h" # if __has_extension(c_static_assert) # define HAVE_C11__STATIC_ASSERT 1 # endif # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_assert.h" #endif # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_assert.h" /* GCC 4.6 added support for _Static_assert: * http://gcc.gnu.org/gcc-4.6/changes.html */ #if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && !defined __cplusplus # define HAVE_C11__STATIC_ASSERT 1 #endif # 26 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_assert.h" /* prototypes for assertion implementation helpers */ int MPIR_Assert_fail(const char *cond, const char *file_name, int line_num); int MPIR_Assert_fail_fmt(const char *cond, const char *file_name, int line_num, const char *fmt, ...); /* * MPIR_Assert() * * Similar to assert() except that it performs an MPID_Abort() when the * assertion fails. Also, for Windows, it doesn't popup a * mesage box on a remote machine. */ #if (!defined(NDEBUG) && defined(HAVE_ERROR_CHECKING)) # define MPIR_AssertDeclValue(_a,_b) _a = _b # define MPIR_Assert(a_) \ do { \ if (unlikely(!(a_))) { \ MPIR_Assert_fail(#a_, __FILE__, __LINE__); \ } \ } while (0) #else # 47 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_assert.h" # define MPIR_Assert(a_) /* Empty decls not allowed in C */ # define MPIR_AssertDeclValue(_a,_b) _a ATTRIBUTE((unused)) = _b #endif # 51 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_assert.h" /* * MPIR_Assertp() * * Similar to MPIR_Assert() except that these assertions persist regardless of * NDEBUG or HAVE_ERROR_CHECKING. MPIR_Assertp() may * be used for error checking in prototype code, although it should be * converted real error checking and reporting once the * prototype becomes part of the official and supported code base. */ #define MPIR_Assertp(a_) \ do { \ if (unlikely(!(a_))) { \ MPIR_Assert_fail(#a_, __FILE__, __LINE__); \ } \ } while (0) /* Define the MPIR_Assert_fmt_msg macro. This macro takes two arguments. The * first is the condition to assert. The second is a parenthesized list of * arguments suitable for passing directly to printf that will yield a relevant * error message. The macro will first evaluate the condition. If it evaluates * to false the macro will take four steps: * * 1) It will emit an "Assertion failed..." message in the valgrind output with * a backtrace, if valgrind client requests are available and the process is * running under valgrind. It will also evaluate and print the supplied * message. * 2) It will emit an "Assertion failed..." message via MPL_internal_error_printf. * The supplied error message will also be evaluated and printed. * 3) It will similarly emit the assertion failure and caller supplied messages * to the debug log, if enabled, via MPL_DBG_MSG_FMT. * 4) It will invoke MPID_Abort, just like the other MPIR_Assert* macros. * * If the compiler doesn't support (...)/__VA_ARGS__ in macros then the user * message will not be evaluated or printed. If NDEBUG is defined or * HAVE_ERROR_CHECKING is undefined, this macro will expand to nothing, just * like MPIR_Assert. * * Example usage: * * MPIR_Assert_fmg_msg(foo > bar,("foo is larger than bar: foo=%d bar=%d",foo,bar)); */ #if (!defined(NDEBUG) && defined(HAVE_ERROR_CHECKING)) # if defined(HAVE_MACRO_VA_ARGS) /* newlines are added internally by the impl function, callers do not need to include them */ # define MPIR_Assert_fmt_msg(cond_,fmt_arg_parens_) \ do { \ if (unlikely(!(cond_))) { \ MPIR_Assert_fail_fmt(#cond_, __FILE__, __LINE__, \ fmt_msg_expand_ fmt_arg_parens_); \ } \ } while (0) /* helper to just expand the parens arg inline */ # define fmt_msg_expand_(...) __VA_ARGS__ # else /* defined(HAVE_MACRO_VA_ARGS) */ # 108 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_assert.h" # define MPIR_Assert_fmt_msg(cond_,fmt_arg_parens_) \ do { \ if (unlikely(!(cond_))) { \ MPIR_Assert_fail_fmt(#cond_, __FILE__, __LINE__, \ "%s", "macro __VA_ARGS__ not supported, unable to print user message"); \ } \ } while (0) # endif # 118 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_assert.h" #else /* !defined(NDEBUG) && defined(HAVE_ERROR_CHECKING) */ # 119 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_assert.h" # define MPIR_Assert_fmt_msg(cond_,fmt_arg_parens_) #endif # 121 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_assert.h" #ifdef HAVE_C11__STATIC_ASSERT # define MPIR_Static_assert(cond_,msg_) _Static_assert(cond_,msg_) #endif # 125 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_assert.h" /* fallthrough to a run-time assertion */ #ifndef MPIR_Static_assert # define MPIR_Static_assert(cond_,msg_) MPIR_Assert_fmt_msg((cond_), ("%s", (msg_))) #endif # 129 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_assert.h" #endif /* !defined(MPIR_ASSERT_H_INCLUDED) */ # 131 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_assert.h" # 178 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_pointers.h" #endif /* expanded by -frewrite-includes */ # 178 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_pointers.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPIR_POINTERS_H_INCLUDED #define MPIR_POINTERS_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpi.h" #endif /* expanded by -frewrite-includes */ # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_pointers.h" # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_pointers.h" #if 0 /* expanded by -frewrite-includes */ #include "mpichconf.h" #endif /* expanded by -frewrite-includes */ # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_pointers.h" # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_pointers.h" #if 0 /* expanded by -frewrite-includes */ #include "mpichconfconst.h" #endif /* expanded by -frewrite-includes */ # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_pointers.h" # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_pointers.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_assert.h" #endif /* expanded by -frewrite-includes */ # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_pointers.h" # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_pointers.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl.h" #endif /* expanded by -frewrite-includes */ # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_pointers.h" # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_pointers.h" /* This test is lame. Should eventually include cookie test and in-range addresses */ #define MPIR_Valid_ptr_class(kind,ptr,errclass,err) \ {if (!(ptr)) { err = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, errclass, \ "**nullptrtype", "**nullptrtype %s", #kind ); } } #define MPIR_Info_valid_ptr(ptr,err) MPIR_Valid_ptr_class(Info,ptr,MPI_ERR_INFO,err) /* Check not only for a null pointer but for an invalid communicator, such as one that has been freed. Let's try the ref_count as the test for now */ /* ticket #1441: check (refcount<=0) to cover the case of 0, an "over-free" of * -1 or similar, and the 0xecec... case when --enable-g=mem is used */ #define MPIR_Comm_valid_ptr(ptr,err,ignore_rev) { \ MPIR_Valid_ptr_class(Comm,ptr,MPI_ERR_COMM,err); \ if ((ptr) && MPIR_Object_get_ref(ptr) <= 0) { \ MPIR_ERR_SET(err,MPI_ERR_COMM,"**comm"); \ ptr = 0; \ } else if ((ptr) && (ptr)->revoked && !(ignore_rev)) { \ MPIR_ERR_SET(err,MPIX_ERR_REVOKED,"**comm"); \ } \ } #define MPIR_Win_valid_ptr(ptr,err) MPIR_Valid_ptr_class(Win,ptr,MPI_ERR_WIN,err) #define MPIR_Group_valid_ptr(ptr,err) MPIR_Valid_ptr_class(Group,ptr,MPI_ERR_GROUP,err) #define MPIR_Op_valid_ptr(ptr,err) MPIR_Valid_ptr_class(Op,ptr,MPI_ERR_OP,err) #define MPIR_Errhandler_valid_ptr(ptr,err) MPIR_Valid_ptr_class(Errhandler,ptr,MPI_ERR_ARG,err) #define MPIR_Request_valid_ptr(ptr,err) MPIR_Valid_ptr_class(Request,ptr,MPI_ERR_REQUEST,err) #define MPII_Keyval_valid_ptr(ptr,err) MPIR_Valid_ptr_class(Keyval,ptr,MPI_ERR_KEYVAL,err) /* Assigns (src_) to (dst_), checking that (src_) fits in (dst_) without * truncation. * * When fiddling with this macro, please keep C's overly complicated integer * promotion/truncation/conversion rules in mind. A discussion of these issues * can be found in Chapter 5 of "Secure Coding in C and C++" by Robert Seacord. */ #define MPIR_Assign_trunc(dst_,src_,dst_type_) \ do { \ /* will catch some of the cases if the expr_inttype macros aren't available */ \ MPIR_Assert((src_) == (dst_type_)(src_)); \ dst_ = (dst_type_)(src_); \ } while (0) /* * Ensure an MPI_Aint value fits into a signed int. * Useful for detecting overflow when MPI_Aint is larger than an int. * * \param[in] aint Variable of type MPI_Aint */ #define MPIR_Ensure_Aint_fits_in_int(aint) \ MPIR_Assert((aint) == (MPI_Aint)(int)(aint)); /* * Ensure an MPI_Aint value fits into a pointer. * Useful for detecting overflow when MPI_Aint is larger than a pointer. * * \param[in] aint Variable of type MPI_Aint */ #define MPIR_Ensure_Aint_fits_in_pointer(aint) \ MPIR_Assert((aint) == (MPI_Aint)(uintptr_t) MPIR_AINT_CAST_TO_VOID_PTR(aint)); #endif /* MPIR_POINTERS_H_INCLUDED */ # 80 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_pointers.h" # 179 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_refcount.h" #endif /* expanded by -frewrite-includes */ # 179 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_refcount.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPIR_REFCOUNT_H_INCLUDED) #define MPIR_REFCOUNT_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpi.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_refcount.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_refcount.h" #if 0 /* expanded by -frewrite-includes */ #include "mpichconf.h" #endif /* expanded by -frewrite-includes */ # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_refcount.h" # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_refcount.h" #if MPICH_THREAD_LEVEL == MPI_THREAD_MULTIPLE #if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__GLOBAL #if 0 /* expanded by -frewrite-includes */ #include "mpir_refcount_global.h" #endif /* expanded by -frewrite-includes */ # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_refcount.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_refcount_global.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPIR_REFCOUNT_GLOBAL_H_INCLUDED) #define MPIR_REFCOUNT_GLOBAL_H_INCLUDED /* define a type for the completion counter */ /* memory barriers aren't needed in this impl, because all access to completion * counters is done while holding the GLOBAL critical section */ typedef volatile int MPIR_cc_t; #define MPIR_cc_get(cc_) (cc_) #define MPIR_cc_set(cc_ptr_, val_) (*(cc_ptr_)) = (val_) #define MPIR_cc_is_complete(cc_ptr_) (0 == *(cc_ptr_)) #define MPIR_cc_incr(cc_ptr_, was_incomplete_) \ do { \ *(was_incomplete_) = (*(cc_ptr_))++; \ } while (0) #define MPIR_cc_decr(cc_ptr_, incomplete_) \ do { \ *(incomplete_) = --(*(cc_ptr_)); \ MPIR_Assert(*(incomplete_) >= 0); \ } while (0) /* "publishes" the obj with handle value (handle_) via the handle pointer * (hnd_lval_). That is, it is a version of the following statement that fixes * memory consistency issues: * (hnd_lval_) = (handle_); * * assumes that the following is always true: typeof(*hnd_lval_ptr_)==int */ /* This could potentially be generalized beyond MPI-handle objects, but we * should only take that step after seeing good evidence of its use. A general * macro (that is portable to non-gcc compilers) will need type information to * make the appropriate volatile cast. */ /* Ideally _GLOBAL would use this too, but we don't want to count on OPA * availability in _GLOBAL mode. Instead the GLOBAL critical section should be * used. */ #define MPIR_OBJ_PUBLISH_HANDLE(hnd_lval_, handle_) \ do { \ (hnd_lval_) = (handle_); \ } while (0) #endif /* !defined(MPIR_REFCOUNT_MULTIPLE_H_INCLUDED) */ # 50 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_refcount_global.h" # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_refcount.h" 2 #elif MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__POBJ # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_refcount.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_refcount_pobj.h" #endif /* expanded by -frewrite-includes */ # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_refcount.h" # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_refcount.h" #endif # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_refcount.h" #else # 22 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_refcount.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_refcount_single.h" #endif /* expanded by -frewrite-includes */ # 22 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_refcount.h" # 23 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_refcount.h" #endif # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_refcount.h" #endif /* !defined(MPIR_REFCOUNT_H_INCLUDED) */ # 27 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_refcount.h" # 180 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_mem.h" #endif /* expanded by -frewrite-includes */ # 180 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPIR_MEM_H_INCLUDED #define MPIR_MEM_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpichconf.h" #endif /* expanded by -frewrite-includes */ # 9 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" /* Make sure that we have the definitions for the malloc routines and size_t */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" /* strdup is often declared in string.h, so if we plan to redefine strdup, we need to include string first. That is done below, only in the case where we redefine strdup */ #if defined(__cplusplus) extern "C" { #endif # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl.h" #endif /* expanded by -frewrite-includes */ # 22 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" # 23 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" /* Define attribute as empty if it has no definition */ #ifndef ATTRIBUTE #define ATTRIBUTE(a) #endif # 28 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" #if defined (MPL_USE_DBG_LOGGING) extern MPL_dbg_class MPIR_DBG_STRING; #endif /* MPL_USE_DBG_LOGGING */ # 32 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" /* ------------------------------------------------------------------------- */ /* mpir_mem.h */ /* ------------------------------------------------------------------------- */ /* Memory allocation */ /* style: allow:malloc:2 sig:0 */ /* style: allow:free:2 sig:0 */ /* style: allow:strdup:2 sig:0 */ /* style: allow:calloc:2 sig:0 */ /* style: allow:realloc:1 sig:0 */ /* style: allow:alloca:1 sig:0 */ /* style: define:__strdup:1 sig:0 */ /* style: define:strdup:1 sig:0 */ /* style: allow:fprintf:5 sig:0 */ /* For handle debugging ONLY */ /* style: allow:snprintf:1 sig:0 */ /*D Memory - Memory Management Routines Rules for memory management: MPICH explicity prohibits the appearence of 'malloc', 'free', 'calloc', 'realloc', or 'strdup' in any code implementing a device or MPI call (of course, users may use any of these calls in their code). Instead, you must use 'MPL_malloc' etc.; if these are defined as 'malloc', that is allowed, but an explicit use of 'malloc' instead of 'MPL_malloc' in the source code is not allowed. This restriction is made to simplify the use of portable tools to test for memory leaks, overwrites, and other consistency checks. Most memory should be allocated at the time that 'MPID_Init' is called and released with 'MPID_Finalize' is called. If at all possible, no other routine should fail because memory could not be allocated (for example, because the user has allocated large arrays after 'MPI_Init'). The implementation of the MPI routines will strive to avoid memory allocation as well; however, operations such as 'MPI_Type_index' that create a new data type that reflects data that must be copied from an array of arbitrary size will have to allocate memory (and can fail; note that there is an MPI error class for out-of-memory). Question: Do we want to have an aligned allocation routine? E.g., one that aligns memory on a cache-line. D*/ /* Define the string copy and duplication functions */ /* ------------------------------------------------------------------------- */ #define MPIR_Memcpy(dst, src, len) \ do { \ CHECK_MEMCPY((dst),(src),(len)); \ memcpy((dst), (src), (len)); \ } while (0) #ifdef USE_MEMORY_TRACING /* Define these as invalid C to catch their use in the code */ #define malloc(a) 'Error use MPL_malloc' ::: #define calloc(a,b) 'Error use MPL_calloc' ::: #define free(a) 'Error use MPL_free' ::: #define realloc(a) 'Error use MPL_realloc' ::: #if defined(strdup) || defined(__strdup) #undef strdup #endif # 97 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" /* The ::: should cause the compiler to choke; the string will give the explanation */ #undef strdup /* in case strdup is a macro */ #define strdup(a) 'Error use MPL_strdup' ::: #endif /* USE_MEMORY_TRACING */ # 103 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" /* Memory allocation macros. See document. */ /* Standard macro for generating error codes. We set the error to be * recoverable by default, but this can be changed. */ #ifdef HAVE_ERROR_CHECKING #define MPIR_CHKMEM_SETERR(rc_,nbytes_,name_) \ rc_=MPIR_Err_create_code( MPI_SUCCESS, \ MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ MPI_ERR_OTHER, "**nomem2", "**nomem2 %d %s", nbytes_, name_ ) #else # 115 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" #define MPIR_CHKMEM_SETERR(rc_,nbytes_,name_) rc_=MPI_ERR_OTHER #endif # 117 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" /* CHKPMEM_REGISTER is used for memory allocated within another routine */ /* Memory used and freed within the current scopy (alloca if feasible) */ /* Configure with --enable-alloca to set USE_ALLOCA */ #if defined(HAVE_ALLOCA) && defined(USE_ALLOCA) #ifdef HAVE_ALLOCA_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 124 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" # 125 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" #endif # 126 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" /* Define decl with a dummy definition to allow us to put a semi-colon after the macro without causing the declaration block to end (restriction imposed by C) */ #define MPIR_CHKLMEM_DECL(n_) int dummy_ ATTRIBUTE((unused)) #define MPIR_CHKLMEM_FREEALL() #define MPIR_CHKLMEM_MALLOC_ORSTMT(pointer_,type_,nbytes_,rc_,name_,stmt_) \ {pointer_ = (type_)alloca(nbytes_); \ if (!(pointer_) && (nbytes_ > 0)) { \ MPIR_CHKMEM_SETERR(rc_,nbytes_,name_); \ stmt_;\ }} #else # 138 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" #define MPIR_CHKLMEM_DECL(n_) \ void *(mpiu_chklmem_stk_[n_]); \ int mpiu_chklmem_stk_sp_=0;\ MPIR_AssertDeclValue(const int mpiu_chklmem_stk_sz_,n_) #define MPIR_CHKLMEM_MALLOC_ORSTMT(pointer_,type_,nbytes_,rc_,name_,stmt_) \ {pointer_ = (type_)MPL_malloc(nbytes_); \ if (pointer_) { \ MPIR_Assert(mpiu_chklmem_stk_sp_ 0) { \ MPIR_CHKMEM_SETERR(rc_,nbytes_,name_); \ stmt_;\ }} #define MPIR_CHKLMEM_FREEALL() \ do { while (mpiu_chklmem_stk_sp_ > 0) {\ MPL_free( mpiu_chklmem_stk_[--mpiu_chklmem_stk_sp_] ); } } while(0) #endif /* HAVE_ALLOCA */ # 156 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" #define MPIR_CHKLMEM_MALLOC(pointer_,type_,nbytes_,rc_,name_) \ MPIR_CHKLMEM_MALLOC_ORJUMP(pointer_,type_,nbytes_,rc_,name_) #define MPIR_CHKLMEM_MALLOC_ORJUMP(pointer_,type_,nbytes_,rc_,name_) \ MPIR_CHKLMEM_MALLOC_ORSTMT(pointer_,type_,nbytes_,rc_,name_,goto fn_fail) /* Persistent memory that we may want to recover if something goes wrong */ #define MPIR_CHKPMEM_DECL(n_) \ void *(mpiu_chkpmem_stk_[n_]) = { NULL }; \ int mpiu_chkpmem_stk_sp_=0;\ MPIR_AssertDeclValue(const int mpiu_chkpmem_stk_sz_,n_) #define MPIR_CHKPMEM_MALLOC_ORSTMT(pointer_,type_,nbytes_,rc_,name_,stmt_) \ {pointer_ = (type_)MPL_malloc(nbytes_); \ if (pointer_) { \ MPIR_Assert(mpiu_chkpmem_stk_sp_ 0) { \ MPIR_CHKMEM_SETERR(rc_,nbytes_,name_); \ stmt_;\ }} #define MPIR_CHKPMEM_REGISTER(pointer_) \ {MPIR_Assert(mpiu_chkpmem_stk_sp_ 0) {\ MPL_free( mpiu_chkpmem_stk_[--mpiu_chkpmem_stk_sp_] ); } } #define MPIR_CHKPMEM_COMMIT() \ mpiu_chkpmem_stk_sp_ = 0 #define MPIR_CHKPMEM_MALLOC(pointer_,type_,nbytes_,rc_,name_) \ MPIR_CHKPMEM_MALLOC_ORJUMP(pointer_,type_,nbytes_,rc_,name_) #define MPIR_CHKPMEM_MALLOC_ORJUMP(pointer_,type_,nbytes_,rc_,name_) \ MPIR_CHKPMEM_MALLOC_ORSTMT(pointer_,type_,nbytes_,rc_,name_,goto fn_fail) /* now the CALLOC version for zeroed memory */ #define MPIR_CHKPMEM_CALLOC(pointer_,type_,nbytes_,rc_,name_) \ MPIR_CHKPMEM_CALLOC_ORJUMP(pointer_,type_,nbytes_,rc_,name_) #define MPIR_CHKPMEM_CALLOC_ORJUMP(pointer_,type_,nbytes_,rc_,name_) \ MPIR_CHKPMEM_CALLOC_ORSTMT(pointer_,type_,nbytes_,rc_,name_,goto fn_fail) #define MPIR_CHKPMEM_CALLOC_ORSTMT(pointer_,type_,nbytes_,rc_,name_,stmt_) \ do { \ pointer_ = (type_)MPL_calloc(1, (nbytes_)); \ if (pointer_) { \ MPIR_Assert(mpiu_chkpmem_stk_sp_ 0) { \ MPIR_CHKMEM_SETERR(rc_,nbytes_,name_); \ stmt_; \ } \ } while (0) /* A special version for routines that only allocate one item */ #define MPIR_CHKPMEM_MALLOC1(pointer_,type_,nbytes_,rc_,name_,stmt_) \ {pointer_ = (type_)MPL_malloc(nbytes_); \ if (!(pointer_) && (nbytes_ > 0)) { \ MPIR_CHKMEM_SETERR(rc_,nbytes_,name_); \ stmt_;\ }} /* Provides a easy way to use realloc safely and avoid the temptation to use * realloc unsafely (direct ptr assignment). Zero-size reallocs returning NULL * are handled and are not considered an error. */ #define MPIR_REALLOC_ORJUMP(ptr_,size_,rc_) do { \ void *realloc_tmp_ = MPL_realloc((ptr_), (size_)); \ if (size_) \ MPIR_ERR_CHKANDJUMP2(!realloc_tmp_,rc_,MPI_ERR_OTHER,"**nomem2","**nomem2 %d %s",(size_),MPL_QUOTE(ptr_)); \ (ptr_) = realloc_tmp_; \ } while (0) #if defined(HAVE_STRNCASECMP) # define MPIR_Strncasecmp strncasecmp #elif defined(HAVE_STRNICMP) # 227 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" # define MPIR_Strncasecmp strnicmp #else # 229 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" /* FIXME: Provide a fallback function ? */ # error "No function defined for case-insensitive strncmp" #endif # 232 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" /* Evaluates to a boolean expression, true if the given byte ranges overlap, * false otherwise. That is, true iff [a_,a_+a_len_) overlaps with [b_,b_+b_len_) */ #define MPIR_MEM_RANGES_OVERLAP(a_,a_len_,b_,b_len_) \ ( ((char *)(a_) >= (char *)(b_) && ((char *)(a_) < ((char *)(b_) + (b_len_)))) || \ ((char *)(b_) >= (char *)(a_) && ((char *)(b_) < ((char *)(a_) + (a_len_)))) ) #if (!defined(NDEBUG) && defined(HAVE_ERROR_CHECKING)) /* May be used to perform sanity and range checking on memcpy and mempcy-like function calls. This macro will bail out much like an MPIR_Assert if any of the checks fail. */ #define CHECK_MEMCPY(dst_,src_,len_) \ do { \ if (len_) { \ MPIR_Assert((dst_) != NULL); \ MPIR_Assert((src_) != NULL); \ MPL_VG_CHECK_MEM_IS_ADDRESSABLE((dst_),(len_)); \ MPL_VG_CHECK_MEM_IS_ADDRESSABLE((src_),(len_)); \ if (MPIR_MEM_RANGES_OVERLAP((dst_),(len_),(src_),(len_))) { \ MPIR_Assert_fmt_msg(FALSE,("memcpy argument memory ranges overlap, dst_=%p src_=%p len_=%ld\n", \ (dst_), (src_), (long)(len_))); \ } \ } \ } while (0) #else # 257 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" #define CHECK_MEMCPY(dst_,src_,len_) do {} while(0) #endif # 259 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" /* valgrind macros are now provided by MPL (via mpl.h included in mpiimpl.h) */ /* ------------------------------------------------------------------------- */ /* end of mpir_mem.h */ /* ------------------------------------------------------------------------- */ #if defined(__cplusplus) } #endif # 269 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" #endif /* MPIR_MEM_H_INCLUDED */ # 271 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_mem.h" # 181 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_info.h" #endif /* expanded by -frewrite-includes */ # 181 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_info.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPIR_INFO_H_INCLUDED #define MPIR_INFO_H_INCLUDED /* ------------------------------------------------------------------------- */ /* Info */ /*TInfoOverview.tex 'MPI_Info' provides a way to create a list of '(key,value)' pairs where the 'key' and 'value' are both strings. Because many routines, both in the MPI implementation and in related APIs such as the PMI process management interface, require 'MPI_Info' arguments, we define a simple structure for each 'MPI_Info' element. Elements are allocated by the generic object allocator; the head element is always empty (no 'key' or 'value' is defined on the head element). For simplicity, we have not abstracted the info data structures; routines that want to work with the linked list may do so directly. Because the 'MPI_Info' type is a handle and not a pointer, an MPIR routine is provided to handle the deallocation of 'MPIR_Info' elements. See the implementation of 'MPI_Info_create' for how an Info type is allocated. Thread Safety: The info interface itself is not thread-robust. In particular, the routines 'MPI_INFO_GET_NKEYS' and 'MPI_INFO_GET_NTHKEY' assume that no other thread modifies the info key. (If the info routines had the concept of a next value, they would not be thread safe. As it stands, a user must be careful if several threads have access to the same info object.) Further, 'MPI_INFO_DUP', while not explicitly advising implementers to be careful of one thread modifying the 'MPI_Info' structure while 'MPI_INFO_DUP' is copying it, requires that the operation take place in a thread-safe manner. There isn'' much that we can do about these cases. There are other cases that must be handled. In particular, multiple threads are allowed to update the same info value. Thus, all of the update routines must be thread safe; the simple implementation used in the MPICH implementation uses locks. Note that the 'MPI_Info_delete' call does not need a lock; the defintion of thread-safety means that any order of the calls functions correctly; since it invalid either to delete the same 'MPI_Info' twice or to modify an 'MPI_Info' that has been deleted, only one thread at a time can call 'MPI_Info_free' on any particular 'MPI_Info' value. T*/ /*S MPIR_Info - Structure of an MPIR info Notes: There is no reference count because 'MPI_Info' values, unlike other MPI objects, may be changed after they are passed to a routine without changing the routine''s behavior. In other words, any routine that uses an 'MPI_Info' object must make a copy or otherwise act on any info value that it needs. A linked list is used because the typical 'MPI_Info' list will be short and a simple linked list is easy to implement and to maintain. Similarly, a single structure rather than separate header and element structures are defined for simplicity. No separate thread lock is provided because info routines are not performance critical; they may use the single critical section lock in the 'MPIR_Process' structure when they need a thread lock. This particular form of linked list (in particular, with this particular choice of the first two members) is used because it allows us to use the same routines to manage this list as are used to manage the list of free objects (in the file 'src/util/mem/handlemem.c'). In particular, if lock-free routines for updating a linked list are provided, they can be used for managing the 'MPIR_Info' structure as well. The MPI standard requires that keys can be no less that 32 characters and no more than 255 characters. There is no mandated limit on the size of values. Module: Info-DS S*/ struct MPIR_Info { MPIR_OBJECT_HEADER; /* adds handle and ref_count fields */ struct MPIR_Info *next; char *key; char *value; }; extern MPIR_Object_alloc_t MPIR_Info_mem; /* Preallocated info objects */ #define MPIR_INFO_N_BUILTIN 2 extern MPIR_Info MPIR_Info_builtin[MPIR_INFO_N_BUILTIN]; extern MPIR_Info MPIR_Info_direct[]; int MPIR_Info_get_impl(MPIR_Info *info_ptr, const char *key, int valuelen, char *value, int *flag); void MPIR_Info_get_nkeys_impl(MPIR_Info *info_ptr, int *nkeys); int MPIR_Info_get_nthkey_impl(MPIR_Info *info, int n, char *key); void MPIR_Info_get_valuelen_impl(MPIR_Info *info_ptr, const char *key, int *valuelen, int *flag); int MPIR_Info_set_impl(MPIR_Info *info_ptr, const char *key, const char *value); int MPIR_Info_dup_impl(MPIR_Info *info_ptr, MPIR_Info **new_info_ptr); void MPIR_Info_free( MPIR_Info *info_ptr ); int MPIR_Info_alloc(MPIR_Info **info_p_p); #endif /* MPIR_INFO_H_INCLUDED */ # 106 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_info.h" # 182 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_errhandler.h" #endif /* expanded by -frewrite-includes */ # 182 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_errhandler.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPIR_ERRHANDLER_H_INCLUDED #define MPIR_ERRHANDLER_H_INCLUDED /*E errhandler_fn - MPIR Structure to hold an error handler function Notes: The MPI-1 Standard declared only the C version of this, implicitly assuming that 'int' and 'MPI_Fint' were the same. Since Fortran does not have a C-style variable number of arguments interface, the Fortran interface simply accepts two arguments. Some calling conventions for Fortran (particularly under Windows) require this. Module: ErrHand-DS Questions: What do we want to do about C++? Do we want a hook for a routine that can be called to throw an exception in C++, particularly if we give C++ access to this structure? Does the C++ handler need to be different (not part of the union)? E*/ typedef union errhandler_fn { void (*C_Comm_Handler_function) ( MPI_Comm *, int *, ... ); void (*F77_Handler_function) ( MPI_Fint *, MPI_Fint * ); void (*C_Win_Handler_function) ( MPI_Win *, int *, ... ); void (*C_File_Handler_function) ( MPI_File *, int *, ... ); } errhandler_fn; /*S MPIR_Errhandler - Description of the error handler structure Notes: Device-specific information may indicate whether the error handler is active; this can help prevent infinite recursion in error handlers caused by user-error without requiring the user to be as careful. We might want to make this part of the interface so that the 'MPI_xxx_call_errhandler' routines would check. It is useful to have a way to indicate that the errhandler is no longer valid, to help catch the case where the user has freed the errhandler but is still using a copy of the 'MPI_Errhandler' value. We may want to define the 'id' value for deleted errhandlers. Module: ErrHand-DS S*/ typedef struct MPIR_Errhandler { MPIR_OBJECT_HEADER; /* adds handle and ref_count fields */ MPIR_Lang_t language; MPII_Object_kind kind; errhandler_fn errfn; /* Other, device-specific information */ #ifdef MPID_DEV_ERRHANDLER_DECL MPID_DEV_ERRHANDLER_DECL #endif # 67 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_errhandler.h" } MPIR_Errhandler; extern MPIR_Object_alloc_t MPIR_Errhandler_mem; /* Preallocated errhandler objects */ extern MPIR_Errhandler MPIR_Errhandler_builtin[]; extern MPIR_Errhandler MPIR_Errhandler_direct[]; /* We never reference count the builtin error handler objects, regardless of how * we decide to reference count the other predefined objects. If we get to the * point where we never reference count *any* of the builtin objects then we * should probably remove these checks and let them fall through to the checks * for BUILTIN down in the MPIR_Object_* routines. */ #define MPIR_Errhandler_add_ref( _errhand ) \ do { \ if (HANDLE_GET_KIND((_errhand)->handle) != HANDLE_KIND_BUILTIN) { \ MPIR_Object_add_ref( _errhand ); \ } \ } while (0) #define MPIR_Errhandler_release_ref( _errhand, _inuse ) \ do { \ if (HANDLE_GET_KIND((_errhand)->handle) != HANDLE_KIND_BUILTIN) { \ MPIR_Object_release_ref( (_errhand), (_inuse) ); \ } \ else { \ *(_inuse) = 1; \ } \ } while (0) void MPIR_Errhandler_free(MPIR_Errhandler *errhan_ptr); #endif /* MPIR_ERRHANDLER_H_INCLUDED */ # 97 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_errhandler.h" # 183 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_attr_generic.h" #endif /* expanded by -frewrite-includes */ # 183 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_attr_generic.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPIR_ATTR_GENERIC_H_INCLUDED #define MPIR_ATTR_GENERIC_H_INCLUDED /* ------------------------------------------------------------------------- */ /* Keyvals and attributes */ /*TKyOverview.tex Keyvals are MPI objects that, unlike most MPI objects, are defined to be integers rather than a handle (e.g., 'MPI_Comm'). However, they really `are` MPI opaque objects and are handled by the MPICH implementation in the same way as all other MPI opaque objects. The only difference is that there is no 'typedef int MPI_Keyval;' in 'mpi.h'. In particular, keyvals are encoded (for direct and indirect references) in the same way that other MPI opaque objects are Each keyval has a copy and a delete function associated with it. Unfortunately, these have a slightly different calling sequence for each language, particularly when the size of a pointer is different from the size of a Fortran integer. The unions 'copy_function' and 'delete_function' capture the differences in a single union type. The above comment is out of date but has never been updated as it should have to match the introduction of a different interface. Beware! Notes: In the original design, retrieving a attribute from a different language that set it was thought to be an error. The MPI Forum decided that this should be allowed, and after much discussion, the behavior was defined. Thus, we need to record what sort of attribute was provided, and be able to properly return the correct value in each case. See MPI 2.2, Section 16.3.7 (Attributes) for specific requirements. One consequence of this is that the value that is returned may have a different length that how it was set. On little-endian platforms (e.g., x86), this doesn't cause much of a problem, because the address is that of the least significant byte, and the lower bytes have the data that is needed in the case that the desired attribute type is shorter than the stored attribute. However, on a big-endian platform (e.g., IBM POWER), since the most significant bytes are stored first, depending on the length of the result type, the address of the result may not be the beginning of the memory area. For example, assume that an MPI_Fint is 4 bytes and a void * (and a Fortran INTEGER of kind MPI_ADDRESS_KIND) is 8 bytes, and let the attribute store the value in an 8 byte integer in a field named "value". On a little-endian platform, the address of the value is always the beginning of the field "value". On a big-endian platform, the address of the value is the beginning of the field if the return type is a pointer (e.g., from C) or Fortran (KIND=MPI_ADDRESS_KIND), and the address of the beginning of the field + 4 if the return type is a Fortran 77 integer (and, as specified above, an MPI_Fint is 4 bytes shorter than a void *). For the big-endian case, it is possible to manage these shifts (using WORDS_LITTLEENDIAN to detect the big-endian case). Alternatively, at a small cost in space, copies in variables of the correct length can be maintained. At this writing, the code in src/mpi/attr makes use of WORDS_LITTLEENDIAN to provide the appropriate code for the most common cases. T*/ /*TAttrOverview.tex * * The MPI standard allows `attributes`, essentially an '(integer,pointer)' * pair, to be attached to communicators, windows, and datatypes. * The integer is a `keyval`, which is allocated by a call (at the MPI level) * to 'MPI_Comm/Type/Win_create_keyval'. The pointer is the value of * the attribute. * Attributes are primarily intended for use by the user, for example, to save * information on a communicator, but can also be used to pass data to the * MPI implementation. For example, an attribute may be used to pass * Quality of Service information to an implementation to be used with * communication on a particular communicator. * To provide the most general access by the ADI to all attributes, the * ADI defines a collection of routines that are used by the implementation * of the MPI attribute routines (such as 'MPI_Comm_get_attr'). * In addition, the MPI routines involving attributes will invoke the * corresponding 'hook' functions (e.g., 'MPID_Comm_attr_hook') * should the device define them. * * Attributes on windows and datatypes are defined by MPI but not of * interest (as yet) to the device. * * In addition, there are seven predefined attributes that the device must * supply to the implementation. This is accomplished through * data values that are part of the 'MPIR_Process' data block. * The predefined keyvals on 'MPI_COMM_WORLD' are\: *.vb * Keyval Related Module * MPI_APPNUM Dynamic * MPI_HOST Core * MPI_IO Core * MPI_LASTUSEDCODE Error * MPI_TAG_UB Communication * MPI_UNIVERSE_SIZE Dynamic * MPI_WTIME_IS_GLOBAL Timer *.ve * The values stored in the 'MPIR_Process' block are the actual values. For * example, the value of 'MPI_TAG_UB' is the integer value of the largest tag. * The * value of 'MPI_WTIME_IS_GLOBAL' is a '1' for true and '0' for false. Likely * values for 'MPI_IO' and 'MPI_HOST' are 'MPI_ANY_SOURCE' and 'MPI_PROC_NULL' * respectively. * T*/ /* bit 0 distinguishes between pointers (0) and integers (1) */ typedef enum { MPIR_ATTR_PTR=0, MPIR_ATTR_AINT=1, MPIR_ATTR_INT=3 } MPIR_Attr_type; #define MPII_ATTR_KIND(_a) (_a & 0x1) int MPII_Comm_set_attr( MPI_Comm, int, void *, MPIR_Attr_type ); int MPII_Type_set_attr( MPI_Datatype, int, void *, MPIR_Attr_type ); int MPII_Win_set_attr( MPI_Win, int, void *, MPIR_Attr_type ); int MPII_Comm_get_attr( MPI_Comm, int, void *, int *, MPIR_Attr_type ); int MPII_Type_get_attr( MPI_Datatype, int, void *, int *, MPIR_Attr_type ); int MPII_Win_get_attr( MPI_Win, int, void *, int *, MPIR_Attr_type ); int MPII_Comm_get_attr_fort( MPI_Comm, int, void *, int *, MPIR_Attr_type ); #if defined(__cplusplus) extern "C" { #endif # 135 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_attr_generic.h" /*E Language bindings for MPI A few operations in MPI need to know how to marshal the callback into the calling lanuage calling convention. The marshaling code is provided by a thunk layer which implements the correct behavior. Examples of these callback functions are the keyval attribute copy and delete functions. Module: Attribute-DS E*/ /* * Support bindings for Attribute copy/del callbacks * Consolidate Comm/Type/Win attribute functions together as the handle type is the same * use MPI_Comm for the prototypes */ typedef int (MPII_Attr_copy_proxy)( MPI_Comm_copy_attr_function* user_function, int handle, int keyval, void* extra_state, MPIR_Attr_type attrib_type, void* attrib, void** attrib_copy, int* flag ); typedef int (MPII_Attr_delete_proxy)( MPI_Comm_delete_attr_function* user_function, int handle, int keyval, MPIR_Attr_type attrib_type, void* attrib, void* extra_state ); void MPII_Keyval_set_proxy( int keyval, MPII_Attr_copy_proxy copy_proxy, MPII_Attr_delete_proxy delete_proxy ); #if defined(__cplusplus) } #endif # 187 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_attr_generic.h" #endif /* MPIR_ATTR_GENERIC_H_INCLUDED */ # 189 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_attr_generic.h" # 184 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_contextid.h" #endif /* expanded by -frewrite-includes */ # 184 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_contextid.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPIR_CONTEXTID_H_INCLUDED #define MPIR_CONTEXTID_H_INCLUDED #define MPIR_CONTEXT_ID_T_DATATYPE MPI_UINT16_T typedef uint16_t MPIR_Context_id_t; #define MPIR_INVALID_CONTEXT_ID ((MPIR_Context_id_t)0xffff) /* The following preprocessor macros provide bitfield access information for * context ID values. They follow a uniform naming pattern: * * MPIR_CONTEXT_foo_WIDTH - the width in bits of the field * MPIR_CONTEXT_foo_MASK - A valid bit mask for bit-wise AND and OR operations * with exactly all of the bits in the field set. * MPIR_CONTEXT_foo_SHIFT - The number of bits that the field should be shifted * rightwards to place it in the least significant bits * of the ID. There may still be higher order bits * from other fields, so the _MASK should be used first * if you want to reliably retrieve the exact value of * the field. */ /* yields an rvalue that is the value of the field_name_ in the least significant bits */ #define MPIR_CONTEXT_READ_FIELD(field_name_,id_) \ (((id_) & MPIR_CONTEXT_##field_name_##_MASK) >> MPIR_CONTEXT_##field_name_##_SHIFT) /* yields an rvalue that is the old_id_ with field_name_ set to field_val_ */ #define MPIR_CONTEXT_SET_FIELD(field_name_,old_id_,field_val_) \ ((old_id_ & ~MPIR_CONTEXT_##field_name_##_MASK) | ((field_val_) << MPIR_CONTEXT_##field_name_##_SHIFT)) /* Context suffixes for separating pt2pt and collective communication */ #define MPIR_CONTEXT_SUFFIX_WIDTH (1) #define MPIR_CONTEXT_SUFFIX_SHIFT (0) #define MPIR_CONTEXT_SUFFIX_MASK ((1 << MPIR_CONTEXT_SUFFIX_WIDTH) - 1) #define MPIR_CONTEXT_INTRA_PT2PT (0) #define MPIR_CONTEXT_INTRA_COLL (1) #define MPIR_CONTEXT_INTER_PT2PT (0) #define MPIR_CONTEXT_INTER_COLL (1) /* Used to derive context IDs for sub-communicators from a parent communicator's context ID value. This field comes after the one bit suffix. values are shifted left by 1. */ #define MPIR_CONTEXT_SUBCOMM_WIDTH (2) #define MPIR_CONTEXT_SUBCOMM_SHIFT (MPIR_CONTEXT_SUFFIX_WIDTH + MPIR_CONTEXT_SUFFIX_SHIFT) #define MPIR_CONTEXT_SUBCOMM_MASK (((1 << MPIR_CONTEXT_SUBCOMM_WIDTH) - 1) << MPIR_CONTEXT_SUBCOMM_SHIFT) /* these values may be added/subtracted directly to/from an existing context ID * in order to determine the context ID of the child/parent */ #define MPIR_CONTEXT_PARENT_OFFSET (0 << MPIR_CONTEXT_SUBCOMM_SHIFT) #define MPIR_CONTEXT_INTRANODE_OFFSET (1 << MPIR_CONTEXT_SUBCOMM_SHIFT) #define MPIR_CONTEXT_INTERNODE_OFFSET (2 << MPIR_CONTEXT_SUBCOMM_SHIFT) /* this field (IS_LOCALCOM) is used to derive a context ID for local * communicators of intercommunicators without communication */ #define MPIR_CONTEXT_IS_LOCALCOMM_WIDTH (1) #define MPIR_CONTEXT_IS_LOCALCOMM_SHIFT (MPIR_CONTEXT_SUBCOMM_SHIFT + MPIR_CONTEXT_SUBCOMM_WIDTH) #define MPIR_CONTEXT_IS_LOCALCOMM_MASK (((1 << MPIR_CONTEXT_IS_LOCALCOMM_WIDTH) - 1) << MPIR_CONTEXT_IS_LOCALCOMM_SHIFT) /* MPIR_MAX_CONTEXT_MASK is the number of ints that make up the bit vector that * describes the context ID prefix space. * * The following must hold: * (num_bits_in_vector) <= (maximum_context_id_prefix) * which is the following in concrete terms: * MPIR_MAX_CONTEXT_MASK*MPIR_CONTEXT_INT_BITS <= 2**(MPIR_CONTEXT_ID_BITS - (MPIR_CONTEXT_PREFIX_SHIFT + MPIR_CONTEXT_DYNAMIC_PROC_WIDTH)) * * We currently always assume MPIR_CONTEXT_INT_BITS is 32, regardless of the * value of sizeof(int)*CHAR_BITS. We also make the assumption that CHAR_BITS==8. * * For a 16-bit context id field and CHAR_BITS==8, this implies MPIR_MAX_CONTEXT_MASK <= 256 */ /* number of bits to shift right by in order to obtain the context ID prefix */ #define MPIR_CONTEXT_PREFIX_SHIFT (MPIR_CONTEXT_IS_LOCALCOMM_SHIFT + MPIR_CONTEXT_IS_LOCALCOMM_WIDTH) #define MPIR_CONTEXT_PREFIX_WIDTH (MPIR_CONTEXT_ID_BITS - (MPIR_CONTEXT_PREFIX_SHIFT + MPIR_CONTEXT_DYNAMIC_PROC_WIDTH)) #define MPIR_CONTEXT_PREFIX_MASK (((1 << MPIR_CONTEXT_PREFIX_WIDTH) - 1) << MPIR_CONTEXT_PREFIX_SHIFT) #define MPIR_CONTEXT_DYNAMIC_PROC_WIDTH (1) /* the upper half is reserved for dynamic procs */ #define MPIR_CONTEXT_DYNAMIC_PROC_SHIFT (MPIR_CONTEXT_ID_BITS - MPIR_CONTEXT_DYNAMIC_PROC_WIDTH) /* the upper half is reserved for dynamic procs */ #define MPIR_CONTEXT_DYNAMIC_PROC_MASK (((1 << MPIR_CONTEXT_DYNAMIC_PROC_WIDTH) - 1) << MPIR_CONTEXT_DYNAMIC_PROC_SHIFT) /* should probably be (sizeof(int)*CHAR_BITS) once we make the code CHAR_BITS-clean */ #define MPIR_CONTEXT_INT_BITS (32) #define MPIR_CONTEXT_ID_BITS (sizeof(MPIR_Context_id_t)*8) /* 8 --> CHAR_BITS eventually */ #define MPIR_MAX_CONTEXT_MASK \ ((1 << (MPIR_CONTEXT_ID_BITS - (MPIR_CONTEXT_PREFIX_SHIFT + MPIR_CONTEXT_DYNAMIC_PROC_WIDTH))) / MPIR_CONTEXT_INT_BITS) /* Utility routines. Where possible, these are kept in the source directory with the other comm routines (src/mpi/comm, in mpicomm.h). However, to create a new communicator after a spawn or connect-accept operation, the device may need to create a new contextid */ int MPIR_Get_contextid_sparse(MPIR_Comm *comm_ptr, MPIR_Context_id_t *context_id, int ignore_id); int MPIR_Get_contextid_sparse_group(MPIR_Comm *comm_ptr, MPIR_Group *group_ptr, int tag, MPIR_Context_id_t *context_id, int ignore_id); int MPIR_Get_contextid_nonblock(MPIR_Comm *comm_ptr, MPIR_Comm *newcommp, MPIR_Request **req); int MPIR_Get_intercomm_contextid_nonblock(MPIR_Comm *comm_ptr, MPIR_Comm *newcommp, MPIR_Request **req); void MPIR_Free_contextid( MPIR_Context_id_t ); #endif /* MPIR_CONTEXTID_H_INCLUDED */ # 106 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_contextid.h" # 185 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_status.h" #endif /* expanded by -frewrite-includes */ # 185 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_status.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPIR_STATUS_H_INCLUDED #define MPIR_STATUS_H_INCLUDED /* We use bits from the "count_lo" and "count_hi_and_cancelled" fields * to represent the 'count' and 'cancelled' objects. The LSB of the * "count_hi_and_cancelled" field represents the 'cancelled' object. * The 'count' object is split between the "count_lo" and * "count_hi_and_cancelled" fields, with the lower order bits going * into the "count_lo" field, and the higher order bits goin into the * "count_hi_and_cancelled" field. This gives us 2N-1 bits for the * 'count' object, where N is the size of int. However, the value * returned to the user is bounded by the definition on MPI_Count. */ /* NOTE: The below code assumes that the count value is never * negative. For negative values, right-shifting can have weird * implementation specific consequences. */ #define MPIR_STATUS_SET_COUNT(status_, count_) \ { \ (status_).count_lo = ((int) count_); \ (status_).count_hi_and_cancelled &= 1; \ (status_).count_hi_and_cancelled |= (int) ((MPIR_Ucount) count_ >> (8 * SIZEOF_INT) << 1); \ } #define MPIR_STATUS_GET_COUNT(status_) \ ((MPI_Count) ((((MPIR_Ucount) (((unsigned int) (status_).count_hi_and_cancelled) >> 1)) << (8 * SIZEOF_INT)) + (unsigned int) (status_).count_lo)) #define MPIR_STATUS_SET_CANCEL_BIT(status_, cancelled_) \ { \ (status_).count_hi_and_cancelled &= ~1; \ (status_).count_hi_and_cancelled |= cancelled_; \ } #define MPIR_STATUS_GET_CANCEL_BIT(status_) ((status_).count_hi_and_cancelled & 1) /* Do not set MPI_ERROR (only set if ERR_IN_STATUS is returned */ #define MPIR_Status_set_empty(status_) \ { \ if ((status_) != MPI_STATUS_IGNORE) \ { \ (status_)->MPI_SOURCE = MPI_ANY_SOURCE; \ (status_)->MPI_TAG = MPI_ANY_TAG; \ MPIR_STATUS_SET_COUNT(*(status_), 0); \ MPIR_STATUS_SET_CANCEL_BIT(*(status_), FALSE); \ } \ } /* See MPI 1.1, section 3.11, Null Processes */ /* Do not set MPI_ERROR (only set if ERR_IN_STATUS is returned */ #define MPIR_Status_set_procnull(status_) \ { \ if ((status_) != MPI_STATUS_IGNORE) \ { \ (status_)->MPI_SOURCE = MPI_PROC_NULL; \ (status_)->MPI_TAG = MPI_ANY_TAG; \ MPIR_STATUS_SET_COUNT(*(status_), 0); \ MPIR_STATUS_SET_CANCEL_BIT(*(status_), FALSE); \ } \ } #endif /* MPIR_STATUS_H_INCLUDED */ # 66 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_status.h" # 186 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_debugger.h" #endif /* expanded by -frewrite-includes */ # 186 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_debugger.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPIR_DEBUGGER_H_INCLUDED #define MPIR_DEBUGGER_H_INCLUDED /* These macros allow us to implement a sendq when debugger support is selected. As there is extra overhead for this, we only do this when specifically requested */ #ifdef HAVE_DEBUGGER_SUPPORT void MPIR_Debugger_set_aborting( const char * ); /* internal functions */ void MPII_Wait_for_debugger( void ); void MPII_Sendq_remember(MPIR_Request *, int, int, int ); void MPII_Sendq_forget(MPIR_Request *); void MPII_CommL_remember( MPIR_Comm * ); void MPII_CommL_forget( MPIR_Comm * ); #define MPII_SENDQ_REMEMBER(_a,_b,_c,_d) MPII_Sendq_remember(_a,_b,_c,_d) #define MPII_SENDQ_FORGET(_a) MPII_Sendq_forget(_a) #define MPII_COMML_REMEMBER(_a) MPII_CommL_remember( _a ) #define MPII_COMML_FORGET(_a) MPII_CommL_forget( _a ) #define MPII_REQUEST_CLEAR_DBG(_r) ((_r)->u.send.dbg_next = NULL) #else # 31 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_debugger.h" #define MPII_SENDQ_REMEMBER(a,b,c,d) #define MPII_SENDQ_FORGET(a) #define MPII_COMML_REMEMBER(_a) #define MPII_COMML_FORGET(_a) #define MPII_REQUEST_CLEAR_DBG(_r) #endif # 37 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_debugger.h" #endif /* MPIR_DEBUGGER_H_INCLUDED */ # 39 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_debugger.h" # 187 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_op.h" #endif /* expanded by -frewrite-includes */ # 187 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_op.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPIR_OP_H_INCLUDED #define MPIR_OP_H_INCLUDED /*E MPIR_Op_kind - Enumerates types of MPI_Op types Notes: These are needed for implementing 'MPI_Accumulate', since only predefined operations are allowed for that operation. A gap in the enum values was made allow additional predefined operations to be inserted. This might include future additions to MPI or experimental extensions (such as a Read-Modify-Write operation). Module: Collective-DS E*/ typedef enum MPIR_Op_kind { MPIR_OP_KIND__NULL=0, MPIR_OP_KIND__MAX=1, MPIR_OP_KIND__MIN=2, MPIR_OP_KIND__SUM=3, MPIR_OP_KIND__PROD=4, MPIR_OP_KIND__LAND=5, MPIR_OP_KIND__BAND=6, MPIR_OP_KIND__LOR=7, MPIR_OP_KIND__BOR=8, MPIR_OP_KIND__LXOR=9, MPIR_OP_KIND__BXOR=10, MPIR_OP_KIND__MAXLOC=11, MPIR_OP_KIND__MINLOC=12, MPIR_OP_KIND__REPLACE=13, MPIR_OP_KIND__NO_OP=14, MPIR_OP_KIND__USER_NONCOMMUTE=32, MPIR_OP_KIND__USER=33 } MPIR_Op_kind; /*S MPIR_User_function - Definition of a user function for MPI_Op types. Notes: This includes a 'const' to make clear which is the 'in' argument and which the 'inout' argument, and to indicate that the 'count' and 'datatype' arguments are unchanged (they are addresses in an attempt to allow interoperation with Fortran). It includes 'restrict' to emphasize that no overlapping operations are allowed. We need to include a Fortran version, since those arguments will have type 'MPI_Fint *' instead. We also need to add a test to the test suite for this case; in fact, we need tests for each of the handle types to ensure that the transfered handle works correctly. This is part of the collective module because user-defined operations are valid only for the collective computation routines and not for RMA accumulate. Yes, the 'restrict' is in the correct location. C compilers that support 'restrict' should be able to generate code that is as good as a Fortran compiler would for these functions. We should note on the manual pages for user-defined operations that 'restrict' should be used when available, and that a cast may be required when passing such a function to 'MPI_Op_create'. Question: Should each of these function types have an associated typedef? Should there be a C++ function here? Module: Collective-DS S*/ typedef union MPIR_User_function { void (*c_function) ( const void *, void *, const int *, const MPI_Datatype * ); void (*f77_function) ( const void *, void *, const MPI_Fint *, const MPI_Fint * ); } MPIR_User_function; /* FIXME: Should there be "restrict" in the definitions above, e.g., (*c_function)( const void restrict * , void restrict *, ... )? */ /*S MPIR_Op - MPI_Op structure Notes: All of the predefined functions are commutative. Only user functions may be noncummutative, so there are two separate op types for commutative and non-commutative user-defined operations. Operations do not require reference counts because there are no nonblocking operations that accept user-defined operations. Thus, there is no way that a valid program can free an 'MPI_Op' while it is in use. Module: Collective-DS S*/ typedef struct MPIR_Op { MPIR_OBJECT_HEADER; /* adds handle and ref_count fields */ MPIR_Op_kind kind; MPIR_Lang_t language; MPIR_User_function function; } MPIR_Op; #define MPIR_OP_N_BUILTIN 15 extern MPIR_Op MPIR_Op_builtin[MPIR_OP_N_BUILTIN]; extern MPIR_Op MPIR_Op_direct[]; extern MPIR_Object_alloc_t MPIR_Op_mem; #define MPIR_Op_add_ref(_op) \ do { MPIR_Object_add_ref(_op); } while (0) #define MPIR_Op_release_ref( _op, _inuse ) \ do { MPIR_Object_release_ref( _op, _inuse ); } while (0) /* release and free-if-not-in-use helper */ #define MPIR_Op_release(op_p_) \ do { \ int in_use_; \ MPIR_Op_release_ref((op_p_), &in_use_); \ if (!in_use_) { \ MPIR_Handle_obj_free(&MPIR_Op_mem, (op_p_)); \ } \ } while (0) void MPIR_MAXF ( void *, void *, int *, MPI_Datatype * ) ; void MPIR_MINF ( void *, void *, int *, MPI_Datatype * ) ; void MPIR_SUM ( void *, void *, int *, MPI_Datatype * ) ; void MPIR_PROD ( void *, void *, int *, MPI_Datatype * ) ; void MPIR_LAND ( void *, void *, int *, MPI_Datatype * ) ; void MPIR_BAND ( void *, void *, int *, MPI_Datatype * ) ; void MPIR_LOR ( void *, void *, int *, MPI_Datatype * ) ; void MPIR_BOR ( void *, void *, int *, MPI_Datatype * ) ; void MPIR_LXOR ( void *, void *, int *, MPI_Datatype * ) ; void MPIR_BXOR ( void *, void *, int *, MPI_Datatype * ) ; void MPIR_MAXLOC ( void *, void *, int *, MPI_Datatype * ) ; void MPIR_MINLOC ( void *, void *, int *, MPI_Datatype * ) ; void MPIR_REPLACE ( void *, void *, int *, MPI_Datatype * ) ; void MPIR_NO_OP ( void *, void *, int *, MPI_Datatype * ) ; int MPIR_MAXF_check_dtype ( MPI_Datatype ) ; int MPIR_MINF_check_dtype ( MPI_Datatype ) ; int MPIR_SUM_check_dtype ( MPI_Datatype ) ; int MPIR_PROD_check_dtype ( MPI_Datatype ) ; int MPIR_LAND_check_dtype ( MPI_Datatype ) ; int MPIR_BAND_check_dtype ( MPI_Datatype ) ; int MPIR_LOR_check_dtype ( MPI_Datatype ) ; int MPIR_BOR_check_dtype ( MPI_Datatype ) ; int MPIR_LXOR_check_dtype ( MPI_Datatype ) ; int MPIR_BXOR_check_dtype ( MPI_Datatype ) ; int MPIR_MAXLOC_check_dtype ( MPI_Datatype ) ; int MPIR_MINLOC_check_dtype ( MPI_Datatype ) ; int MPIR_REPLACE_check_dtype ( MPI_Datatype ) ; int MPIR_NO_OP_check_dtype ( MPI_Datatype ) ; #define MPIR_PREDEF_OP_COUNT 14 extern MPI_User_function *MPIR_Op_table[]; typedef int (MPIR_Op_check_dtype_fn) ( MPI_Datatype ); extern MPIR_Op_check_dtype_fn *MPIR_Op_check_dtype_table[]; #define MPIR_OP_HDL_TO_FN(op) MPIR_Op_table[((op)&0xf) - 1] #define MPIR_OP_HDL_TO_DTYPE_FN(op) MPIR_Op_check_dtype_table[((op)&0xf) - 1] #endif /* MPIR_OP_H_INCLUDED */ # 170 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_op.h" # 188 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_topo.h" #endif /* expanded by -frewrite-includes */ # 188 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_topo.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPIR_TOPO_H_INCLUDED #define MPIR_TOPO_H_INCLUDED /* * The following struture allows the device detailed control over the * functions that are used to implement the topology routines. If either * the pointer to this structure is null or any individual entry is null, * the default function is used (this follows exactly the same rules as the * collective operations, provided in the MPIR_Collops structure). */ typedef struct MPII_Topo_ops { int (*cartCreate)( const MPIR_Comm *, int, const int[], const int [], int, MPI_Comm * ); int (*cartMap) ( const MPIR_Comm *, int, const int[], const int [], int * ); int (*graphCreate)( const MPIR_Comm *, int, const int[], const int [], int, MPI_Comm * ); int (*graphMap) ( const MPIR_Comm *, int, const int[], const int[], int * ); } MPII_Topo_ops; typedef struct MPII_Graph_topology { int nnodes; int nedges; int *index; int *edges; } MPII_Graph_topology; typedef struct MPII_Cart_topology { int nnodes; /* Product of dims[*], gives the size of the topology */ int ndims; int *dims; int *periodic; int *position; } MPII_Cart_topology; typedef struct MPII_Dist_graph_topology { int indegree; int *in; int *in_weights; int outdegree; int *out; int *out_weights; int is_weighted; } MPII_Dist_graph_topology; struct MPIR_Topology { MPIR_Topo_type kind; union topo { MPII_Graph_topology graph; MPII_Cart_topology cart; MPII_Dist_graph_topology dist_graph; } topo; }; int MPIR_Dims_create( int, int, int * ); MPIR_Topology *MPIR_Topology_get( MPIR_Comm * ); int MPIR_Topology_put( MPIR_Comm *, MPIR_Topology * ); /* Returns the canonicalized count of neighbors for the given topology as though * MPI_Dist_graph_neighbors_count were called with a distributed graph topology, * even if the given topology is actually Cartesian or Graph. Useful for * implementing neighborhood collective operations. */ int MPIR_Topo_canon_nhb_count(MPIR_Comm *comm_ptr, int *indegree, int *outdegree, int *weighted); /* Returns the canonicalized list of neighbors for a given topology, separated * into inbound and outbound edges. Equivalent to MPI_Dist_graph_neighbors but * works for any topology type by canonicalizing according to the rules in * Section 7.6 of the MPI-3.0 standard. */ int MPIR_Topo_canon_nhb(MPIR_Comm *comm_ptr, int indegree, int sources[], int inweights[], int outdegree, int dests[], int outweights[]); #define MAX_CART_DIM 16 /* topology impl functions */ int MPIR_Cart_create( MPIR_Comm *, int, const int [], const int [], int, MPI_Comm * ); int MPIR_Cart_map( const MPIR_Comm *, int, const int[], const int[], int* ); int MPIR_Cart_shift_impl(MPIR_Comm *comm_ptr, int direction, int displ, int *source, int *dest); void MPIR_Cart_rank_impl(struct MPIR_Topology *cart_ptr, const int *coords, int *rank); int MPIR_Cart_create_impl(MPIR_Comm *comm_ptr, int ndims, const int dims[], const int periods[], int reorder, MPI_Comm *comm_cart); int MPIR_Cart_map_impl(const MPIR_Comm *comm_ptr, int ndims, const int dims[], const int periodic[], int *newrank); int MPIR_Graph_create( MPIR_Comm *, int, const int[], const int[], int, MPI_Comm *); int MPIR_Graph_map( const MPIR_Comm *, int, const int[], const int[], int* ); int MPIR_Graph_neighbors_count_impl(MPIR_Comm *comm_ptr, int rank, int *nneighbors); int MPIR_Graph_neighbors_impl(MPIR_Comm *comm_ptr, int rank, int maxneighbors, int *neighbors); int MPIR_Graph_map_impl(const MPIR_Comm *comm_ptr, int nnodes, const int indx[], const int edges[], int *newrank); int MPIR_Dist_graph_neighbors_count_impl(MPIR_Comm *comm_ptr, int *indegree, int *outdegree, int *weighted); int MPIR_Dist_graph_neighbors_impl(MPIR_Comm *comm_ptr, int maxindegree, int sources[], int sourceweights[], int maxoutdegree, int destinations[], int destweights[]); #endif /* MPIR_TOPO_H_INCLUDED */ # 113 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_topo.h" # 189 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_tags.h" #endif /* expanded by -frewrite-includes */ # 189 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_tags.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPIR_TAGS_H_INCLUDED #define MPIR_TAGS_H_INCLUDED /* Tags for point to point operations which implement collective and other internal operations */ #define MPIR_BARRIER_TAG 1 #define MPIR_BCAST_TAG 2 #define MPIR_GATHER_TAG 3 #define MPIR_GATHERV_TAG 4 #define MPIR_SCATTER_TAG 5 #define MPIR_SCATTERV_TAG 6 #define MPIR_ALLGATHER_TAG 7 #define MPIR_ALLGATHERV_TAG 8 #define MPIR_ALLTOALL_TAG 9 #define MPIR_ALLTOALLV_TAG 10 #define MPIR_REDUCE_TAG 11 #define MPIR_USER_REDUCE_TAG 12 #define MPIR_USER_REDUCEA_TAG 13 #define MPIR_ALLREDUCE_TAG 14 #define MPIR_USER_ALLREDUCE_TAG 15 #define MPIR_USER_ALLREDUCEA_TAG 16 #define MPIR_REDUCE_SCATTER_TAG 17 #define MPIR_USER_REDUCE_SCATTER_TAG 18 #define MPIR_USER_REDUCE_SCATTERA_TAG 19 #define MPIR_SCAN_TAG 20 #define MPIR_USER_SCAN_TAG 21 #define MPIR_USER_SCANA_TAG 22 #define MPIR_LOCALCOPY_TAG 23 #define MPIR_EXSCAN_TAG 24 #define MPIR_ALLTOALLW_TAG 25 #define MPIR_TOPO_A_TAG 26 #define MPIR_TOPO_B_TAG 27 #define MPIR_REDUCE_SCATTER_BLOCK_TAG 28 #define MPIR_SHRINK_TAG 29 #define MPIR_AGREE_TAG 30 #define MPIR_FIRST_NBC_TAG 31 /* These macros must be used carefully. These macros will not work with * negative tags. By definition, users are not to use negative tags and the * only negative tag in MPICH is MPI_ANY_TAG which is checked seperately, but * if there is a time where negative tags become more common, this setup won't * work anymore. */ /* This bitmask can be used to manually mask the tag space wherever it might * be necessary to do so (for instance in the receive queue */ #ifdef HAVE_TAG_ERROR_BITS #define MPIR_TAG_ERROR_BIT (1 << 30) #else # 56 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_tags.h" #define MPIR_TAG_ERROR_BIT #endif # 58 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_tags.h" /* This bitmask is used to differentiate between a process failure * (MPIX_ERR_PROC_FAILED) and any other kind of failure (MPI_ERR_OTHER). */ #ifdef HAVE_TAG_ERROR_BITS #define MPIR_TAG_PROC_FAILURE_BIT (1 << 29) #else # 64 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_tags.h" #define MPIR_TAG_PROC_FAILURE_BIT #endif # 66 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_tags.h" /* This macro checks the value of the error bit in the MPI tag and returns 1 * if the tag is set and 0 if it is not. */ #ifdef HAVE_TAG_ERROR_BITS #define MPIR_TAG_CHECK_ERROR_BIT(tag) ((MPIR_TAG_ERROR_BIT & (tag)) == MPIR_TAG_ERROR_BIT ? 1 : 0) #else # 72 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_tags.h" #define MPIR_TAG_CHECK_ERROR_BIT(tag) 0 #endif # 74 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_tags.h" /* This macro checks the value of the process failure bit in the MPI tag and * returns 1 if the tag is set and 0 if it is not. */ #ifdef HAVE_TAG_ERROR_BITS #define MPIR_TAG_CHECK_PROC_FAILURE_BIT(tag) ((MPIR_TAG_PROC_FAILURE_BIT & (tag)) == MPIR_TAG_PROC_FAILURE_BIT ? 1 : 0) #else # 80 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_tags.h" #define MPIR_TAG_CHECK_PROC_FAILURE_BIT(tag) 0 #endif # 82 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_tags.h" /* This macro sets the value of the error bit in the MPI tag to 1 */ #ifdef HAVE_TAG_ERROR_BITS #define MPIR_TAG_SET_ERROR_BIT(tag) ((tag) |= MPIR_TAG_ERROR_BIT) #else # 87 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_tags.h" #define MPIR_TAG_SET_ERROR_BIT(tag) (tag) #endif # 89 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_tags.h" /* This macro sets the value of the process failure bit in the MPI tag to 1 */ #ifdef HAVE_TAG_ERROR_BITS #define MPIR_TAG_SET_PROC_FAILURE_BIT(tag) ((tag) |= (MPIR_TAG_ERROR_BIT | MPIR_TAG_PROC_FAILURE_BIT)) #else # 94 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_tags.h" #define MPIR_TAG_SET_PROC_FAILURE_BIT(tag) (tag) #endif # 96 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_tags.h" /* This macro clears the value of the error bits in the MPI tag */ #ifdef HAVE_TAG_ERROR_BITS #define MPIR_TAG_CLEAR_ERROR_BITS(tag) ((tag) &= ~(MPIR_TAG_ERROR_BIT ^ MPIR_TAG_PROC_FAILURE_BIT)) #else # 101 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_tags.h" #define MPIR_TAG_CLEAR_ERROR_BITS(tag) (tag) #endif # 103 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_tags.h" /* This macro masks the value of the error bits in the MPI tag */ #ifdef HAVE_TAG_ERROR_BITS #define MPIR_TAG_MASK_ERROR_BITS(tag) ((tag) & ~(MPIR_TAG_ERROR_BIT ^ MPIR_TAG_PROC_FAILURE_BIT)) #else # 108 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_tags.h" #define MPIR_TAG_MASK_ERROR_BITS(tag) (tag) #endif # 110 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_tags.h" #endif /* MPIR_TAGS_H_INCLUDED */ # 112 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_tags.h" # 190 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_pt2pt.h" #endif /* expanded by -frewrite-includes */ # 190 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_pt2pt.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPIR_PT2PT_H_INCLUDED #define MPIR_PT2PT_H_INCLUDED int MPIR_Ibsend_impl(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm_ptr, MPI_Request *request); int MPIR_Test_impl(MPI_Request *request, int *flag, MPI_Status *status); int MPIR_Testall_impl(int count, MPI_Request array_of_requests[], int *flag, MPI_Status array_of_statuses[]); int MPIR_Wait_impl(MPI_Request *request, MPI_Status *status); int MPIR_Waitall_impl(int count, MPI_Request array_of_requests[], MPI_Status array_of_statuses[]); #endif /* MPIR_PT2PT_H_INCLUDED */ # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_pt2pt.h" # 191 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_ext.h" #endif /* expanded by -frewrite-includes */ # 191 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "./src/include/mpir_ext.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2006 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ /* This file contains the prototypes for routines that are used with "external" modules such as ROMIO. These allow the different packages to hide their internal datatypes from one another */ #ifndef MPIEXT_H_INCLUDED #define MPIEXT_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 14 "./src/include/mpir_ext.h" # 15 "./src/include/mpir_ext.h" /* This routine, given an MPI_Errhandler (from a file), returns a pointer to the user-supplied error function. The last argument is set to an integer indicating that the function is MPI_ERRORS_RETURN (value == 1), MPI_ERRORS_ARE_FATAL (value == 0), a valid user-function (value == 2), or a valid user-function that is a C++ routine (value == 3) This routine is implemented in mpich/src/mpi/errhan/file_set_errhandler.c */ void MPIR_Get_file_error_routine( MPI_Errhandler, void (**)(MPI_File *, int *, ...), int * ); /* Invoke the C++ error handler (this invokes a special C++ routine that in turn calls the provided function. That special routine also resets the errorcode to MPI_SUCCESS to prevent the MPICH C++ error handling code from throwing an exception when the user routine returns. */ int MPIR_File_call_cxx_errhandler( MPI_File *, int *, void (*)(MPI_File *, int *, ... ) ); /* These routines provide access to the MPI_Errhandler field within the ROMIO MPI_File structure */ int MPIR_ROMIO_Get_file_errhand( MPI_File, MPI_Errhandler * ); int MPIR_ROMIO_Set_file_errhand( MPI_File, MPI_Errhandler ); /* FIXME: This routine is also defined in adio.h */ int MPIO_Err_return_file( MPI_File, int ); int MPIR_Err_create_code_valist(int, int, const char [], int, int, const char [], const char [], va_list ); int MPIR_Err_is_fatal(int); void MPIR_Get_file_error_routine( MPI_Errhandler, void (**)(MPI_File *, int *, ...), int * ); int MPIR_File_call_cxx_errhandler( MPI_File *, int *, void (*)(MPI_File *, int *, ... ) ); typedef int (* MPIR_Err_get_class_string_func_t)(int error, char *str, int length); void MPIR_Err_get_string( int, char *, int, MPIR_Err_get_class_string_func_t ); struct MPIR_Comm; int MPID_Abort(struct MPIR_Comm *comm, int mpi_errno, int exit_code, const char *error_msg); int MPIR_Ext_assert_fail(const char *cond, const char *file_name, int line_num); #if (!defined(NDEBUG) && (1)) #define MPIR_Ext_assert(a_) \ do { \ if (!(a_)) { \ MPIR_Ext_assert_fail(#a_, __FILE__, __LINE__); \ } \ } while (0) #else # 71 "./src/include/mpir_ext.h" #define MPIR_Ext_assert(a_) do {} while(0) #endif # 73 "./src/include/mpir_ext.h" extern int MPIR_Ext_dbg_romio_terse_enabled; extern int MPIR_Ext_dbg_romio_typical_enabled; extern int MPIR_Ext_dbg_romio_verbose_enabled; /* a copy of MPIU_Ensure_Aint_fits_in_pointer for external use, slightly * modified to use ROMIO's version of the pointer-casting macro */ #define MPIR_Ext_ensure_Aint_fits_in_pointer(aint) \ MPIR_Ext_assert((aint) == (MPI_Aint)(uintptr_t) ADIOI_AINT_CAST_TO_VOID_PTR(aint)); /* to be called early by ROMIO's initialization process in order to setup init-time * glue code that cannot be initialized statically */ int MPIR_Ext_init(void); void MPIR_Ext_cs_enter(void); void MPIR_Ext_cs_exit(void); void MPIR_Ext_cs_yield(void); /* to facilitate error checking */ int MPIR_Ext_datatype_iscommitted(MPI_Datatype datatype); /* make comm split based on access to a common file system easier */ int MPIR_Get_node_id(MPI_Comm comm, int rank, int *id); #endif # 98 "./src/include/mpir_ext.h" # 192 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #ifdef HAVE_CXX_BINDING #if 0 /* expanded by -frewrite-includes */ #include "mpii_cxxinterface.h" #endif /* expanded by -frewrite-includes */ # 194 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpii_cxxinterface.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPII_CXX_INTERFACE_H_INCLUDED #define MPII_CXX_INTERFACE_H_INCLUDED extern void MPII_Keyval_set_cxx( int, void (*)(void), void (*)(void) ); extern void MPII_Op_set_cxx( MPI_Op, void (*)(void) ); extern void MPII_Errhandler_set_cxx( MPI_Errhandler, void (*)(void) ); #endif /* MPII_CXX_INTERFACE_H_INCLUDED */ # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpii_cxxinterface.h" # 195 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #endif # 196 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #ifdef HAVE_FORTRAN_BINDING #if 0 /* expanded by -frewrite-includes */ #include "mpii_f77interface.h" #endif /* expanded by -frewrite-includes */ # 198 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpii_f77interface.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPII_F77INTERFACE_H_INCLUDED #define MPII_F77INTERFACE_H_INCLUDED /* These functions are provided by the MPICH code for the Fortran interface, and provide the interfaces needed to keep track of which MPI internal objects need to have Fortran or Fortran 90 characteristics */ void MPII_Keyval_set_fortran( int ); void MPII_Keyval_set_fortran90( int ); void MPII_Grequest_set_lang_f77( MPI_Request greq ); #if defined(HAVE_FORTRAN_BINDING) && !defined(HAVE_FINT_IS_INT) void MPII_Op_set_fc( MPI_Op ); typedef void (MPII_F77_User_function) ( void *, void *, MPI_Fint *, MPI_Fint * ); void MPII_Errhandler_set_fc( MPI_Errhandler ); #endif # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpii_f77interface.h" #define MPII_ATTR_C_TO_FORTRAN(ATTR) ((ATTR)+1) #endif /* MPII_F77INTERFACE_H_INCLUDED */ # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpii_f77interface.h" # 199 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #endif # 200 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" /*****************************************************************************/ /********************** PART 4: DEVICE PRE DECLARATION ***********************/ /*****************************************************************************/ #if 0 /* expanded by -frewrite-includes */ #include "mpidpre.h" #endif /* expanded by -frewrite-includes */ # 206 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ /* FIXME: This header should contain only the definitions exported to the mpiimpl.h level */ #if !defined(MPIDPRE_H_INCLUDED) #define MPIDPRE_H_INCLUDED /* Tell the compiler that we're going to declare struct MPIR_Request later */ struct MPIR_Request; #if defined(HAVE_SYS_TYPES_H) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" #endif # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" #if 0 /* expanded by -frewrite-includes */ #include "mpid_datatype_fallback.h" #endif /* expanded by -frewrite-includes */ # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpid_datatype_fallback.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2016 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPIR_DATATYPE_FALLBACK_H_INCLUDED #define MPIR_DATATYPE_FALLBACK_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpidu_datatype.h" #endif /* expanded by -frewrite-includes */ # 9 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpid_datatype_fallback.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpidu_datatype.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPIDU_DATATYPE_H #define MPIDU_DATATYPE_H #if 0 /* expanded by -frewrite-includes */ #include "mpidu_dataloop.h" #endif /* expanded by -frewrite-includes */ # 9 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpidu_datatype.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpidu_dataloop.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPIDU_DATALOOP_H #define MPIDU_DATALOOP_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpidu_dataloop.h" # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpidu_dataloop.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpidu_dataloop.h" # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpidu_dataloop.h" /* Note: this is where you define the prefix that will be prepended on * all externally visible generic dataloop and segment functions. */ #define PREPEND_PREFIX(fn) MPIDU_ ## fn /* These following dataloop-specific types will be used throughout the DLOOP * instance: */ #define DLOOP_Offset MPI_Aint #define DLOOP_Count MPI_Aint #define DLOOP_Handle MPI_Datatype #define DLOOP_Type MPI_Datatype #define DLOOP_Buffer void * #define DLOOP_VECTOR MPL_IOV #define DLOOP_VECTOR_LEN MPL_IOV_LEN #define DLOOP_VECTOR_BUF MPL_IOV_BUF #define DLOOP_Size MPI_Aint /* The following accessor functions must also be defined: * * DLOOP_Handle_extent() * DLOOP_Handle_size() * DLOOP_Handle_loopptr() * DLOOP_Handle_loopdepth() * DLOOP_Handle_hasloop() * */ /* USE THE NOTATION THAT BILL USED IN MPIIMPL.H AND MAKE THESE MACROS */ /* NOTE: put get size into mpiimpl.h; the others go here until such time * as we see that we need them elsewhere. */ #define DLOOP_Handle_get_loopdepth_macro(handle_,depth_,flag_) \ MPIDU_Datatype_get_loopdepth_macro(handle_,depth_,flag_) #define DLOOP_Handle_get_loopsize_macro(handle_,size_,flag_) \ MPIDU_Datatype_get_loopsize_macro(handle_,size_,flag_) #define DLOOP_Handle_set_loopptr_macro(handle_,lptr_,flag_) \ MPIDU_Datatype_set_loopptr_macro(handle_,lptr_,flag_) #define DLOOP_Handle_set_loopdepth_macro(handle_,depth_,flag_) \ MPIDU_Datatype_set_loopdepth_macro(handle_,depth_,flag_) #define DLOOP_Handle_set_loopsize_macro(handle_,size_,flag_) \ MPIDU_Datatype_set_loopsize_macro(handle_,size_,flag_) #define DLOOP_Handle_get_loopptr_macro(handle_,lptr_,flag_) \ MPIDU_Datatype_get_loopptr_macro(handle_,lptr_,flag_) #define DLOOP_Handle_get_size_macro(handle_,size_) \ MPIDU_Datatype_get_size_macro(handle_,size_) #define DLOOP_Handle_get_basic_type_macro(handle_,basic_type_) \ MPIDU_Datatype_get_basic_type(handle_, basic_type_) #define DLOOP_Handle_get_extent_macro(handle_,extent_) \ MPIDU_Datatype_get_extent_macro(handle_,extent_) #define DLOOP_Handle_hasloop_macro(handle_) \ ((HANDLE_GET_KIND(handle_) == HANDLE_KIND_BUILTIN) ? 0 : 1) #define DLOOP_Ensure_Offset_fits_in_pointer(value_) \ MPIR_Ensure_Aint_fits_in_pointer(value_) /* allocate and free functions must also be defined. */ #define DLOOP_Malloc MPL_malloc #define DLOOP_Free MPL_free /* assert function */ #define DLOOP_Assert MPIR_Assert /* memory copy function */ #define DLOOP_Memcpy MPIR_Memcpy /* casting macros */ #define DLOOP_OFFSET_CAST_TO_VOID_PTR MPIR_AINT_CAST_TO_VOID_PTR #define DLOOP_VOID_PTR_CAST_TO_OFFSET MPIR_VOID_PTR_CAST_TO_MPI_AINT #define DLOOP_PTR_DISP_CAST_TO_OFFSET MPIR_PTR_DISP_CAST_TO_MPI_AINT /* printing macros */ #define DLOOP_OFFSET_FMT_DEC_SPEC MPI_AINT_FMT_DEC_SPEC #define DLOOP_OFFSET_FMT_HEX_SPEC MPI_AINT_FMT_HEX_SPEC /* Include dataloop_parts.h at the end to get the rest of the prototypes * and defines, in terms of the prefixes and types above. */ #if 0 /* expanded by -frewrite-includes */ #include "dataloop/dataloop_parts.h" #endif /* expanded by -frewrite-includes */ # 102 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpidu_dataloop.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/dataloop/dataloop_parts.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef DATALOOP_PARTS_H #define DATALOOP_PARTS_H /* Check that all the appropriate defines are present */ #ifndef PREPEND_PREFIX #error "PREPEND_PREFIX must be defined before dataloop_parts.h is included." #endif # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/dataloop/dataloop_parts.h" #ifndef DLOOP_Offset #error "DLOOP_Offset must be defined before dataloop_parts.h is included." #endif # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/dataloop/dataloop_parts.h" #ifndef DLOOP_Count #error "DLOOP_Count must be defined before dataloop_parts.h is included." #endif # 23 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/dataloop/dataloop_parts.h" #ifndef DLOOP_Handle #error "DLOOP_Handle must be defined before dataloop_parts.h is included." #endif # 27 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/dataloop/dataloop_parts.h" #ifndef DLOOP_Buffer #error "DLOOP_Buffer must be defined before dataloop_parts.h is included." #endif # 31 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/dataloop/dataloop_parts.h" #ifndef DLOOP_Type #error "DLOOP_Type must be defined before dataloop_parts.h is included." #endif # 35 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/dataloop/dataloop_parts.h" #ifndef DLOOP_Size #error "DLOOP_Size must be defined before dataloop_parts.h is included." #endif # 39 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/dataloop/dataloop_parts.h" /* Redefine all of the internal structures in terms of the prefix */ #define DLOOP_Dataloop PREPEND_PREFIX(Dataloop) #define DLOOP_Dataloop_contig PREPEND_PREFIX(Dataloop_contig) #define DLOOP_Dataloop_vector PREPEND_PREFIX(Dataloop_vector) #define DLOOP_Dataloop_blockindexed PREPEND_PREFIX(Dataloop_blockindexed) #define DLOOP_Dataloop_indexed PREPEND_PREFIX(Dataloop_indexed) #define DLOOP_Dataloop_struct PREPEND_PREFIX(Dataloop_struct) #define DLOOP_Dataloop_common PREPEND_PREFIX(Dataloop_common) #define DLOOP_Segment PREPEND_PREFIX(Segment) #define DLOOP_Dataloop_stackelm PREPEND_PREFIX(Dataloop_stackelm) /* These flags are used at creation time to specify what types of * optimizations may be applied. They are also passed in at Segment_init * time to specify which dataloop to use. * * Note: The flag to MPIDU_Segment_init() was originally simply "hetero" * and was a boolean value (0 meaning homogeneous). Some MPICH code * may still rely on HOMOGENEOUS being "0" and HETEROGENEOUS being "1". */ #define DLOOP_DATALOOP_HOMOGENEOUS 0 #define DLOOP_DATALOOP_HETEROGENEOUS 1 #define DLOOP_DATALOOP_ALL_BYTES 2 /* NOTE: ASSUMING LAST TYPE IS SIGNED */ #define SEGMENT_IGNORE_LAST ((DLOOP_Offset) -1) /* * Each of the MPI datatypes can be mapped into one of 5 very simple * loops. This loop has the following parameters: * - count * - blocksize[] * - offset[] * - stride * - datatype[] * * where each [] indicates that a field may be *either* an array or a scalar. * For each such type, we define a struct that describes these parameters */ /*S DLOOP_Dataloop_contig - Description of a contiguous dataloop Fields: + count - Number of elements - dataloop - Dataloop of the elements Module: Datatype S*/ typedef struct DLOOP_Dataloop_contig { DLOOP_Count count; struct DLOOP_Dataloop *dataloop; } DLOOP_Dataloop_contig; /*S DLOOP_Dataloop_vector - Description of a vector or strided dataloop Fields: + count - Number of elements . blocksize - Number of dataloops in each element . stride - Stride (in bytes) between each block - dataloop - Dataloop of each element Module: Datatype S*/ typedef struct DLOOP_Dataloop_vector { DLOOP_Count count; struct DLOOP_Dataloop *dataloop; DLOOP_Count blocksize; DLOOP_Offset stride; } DLOOP_Dataloop_vector; /*S DLOOP_Dataloop_blockindexed - Description of a block-indexed dataloop Fields: + count - Number of blocks . blocksize - Number of elements in each block . offset_array - Array of offsets (in bytes) to each block - dataloop - Dataloop of each element Module: Datatype S*/ typedef struct DLOOP_Dataloop_blockindexed { DLOOP_Count count; struct DLOOP_Dataloop *dataloop; DLOOP_Count blocksize; DLOOP_Offset *offset_array; } DLOOP_Dataloop_blockindexed; /*S DLOOP_Dataloop_indexed - Description of an indexed dataloop Fields: + count - Number of blocks . blocksize_array - Array giving the number of elements in each block . offset_array - Array of offsets (in bytes) to each block . total_blocks - count of total blocks in the array (cached value) - dataloop - Dataloop of each element Module: Datatype S*/ typedef struct DLOOP_Dataloop_indexed { DLOOP_Count count; struct DLOOP_Dataloop *dataloop; DLOOP_Count *blocksize_array; DLOOP_Offset *offset_array; DLOOP_Count total_blocks; } DLOOP_Dataloop_indexed; /*S DLOOP_Dataloop_struct - Description of a structure dataloop Fields: + count - Number of blocks . blocksize_array - Array giving the number of elements in each block . offset_array - Array of offsets (in bytes) to each block - dataloop_array - Array of dataloops describing the elements of each block Module: Datatype S*/ typedef struct DLOOP_Dataloop_struct { DLOOP_Count count; struct DLOOP_Dataloop **dataloop_array; DLOOP_Count *blocksize_array; DLOOP_Offset *offset_array; DLOOP_Offset *el_extent_array; /* need more than one */ } DLOOP_Dataloop_struct; /* In many cases, we need the count and the next dataloop item. This common structure gives a quick access to both. Note that all other structures must use the same ordering of elements. Question: should we put the pointer first in case sizeof(pointer)>sizeof(int) ? */ typedef struct DLOOP_Dataloop_common { DLOOP_Count count; struct DLOOP_Dataloop *dataloop; } DLOOP_Dataloop_common; /*S DLOOP_Dataloop - Description of the structure used to hold a dataloop description Fields: + kind - Describes the type of the dataloop. This is divided into three separate bit fields\: .vb Dataloop type (e.g., DLOOP_CONTIG etc.). 3 bits IsFinal (a "leaf" dataloop; see text) 1 bit Element Size (units for fields.) 2 bits Element size has 4 values 0 - Elements are in units of bytes 1 - Elements are in units of 2 bytes 2 - Elements are in units of 4 bytes 3 - Elements are in units of 8 bytes .ve The dataloop type is one of 'DLOOP_CONTIG', 'DLOOP_VECTOR', 'DLOOP_BLOCKINDEXED', 'DLOOP_INDEXED', or 'DLOOP_STRUCT'. . loop_parms - A union containing the 5 dataloop structures, e.g., 'DLOOP_Dataloop_contig', 'DLOOP_Dataloop_vector', etc. A sixth element in this union, 'count', allows quick access to the shared 'count' field in the five dataloop structure. . extent - The extent of the dataloop Module: Datatype S*/ typedef struct DLOOP_Dataloop { int kind; /* Contains both the loop type (contig, vector, blockindexed, indexed, or struct) and a bit that indicates whether the dataloop is a leaf type. */ union { DLOOP_Count count; DLOOP_Dataloop_contig c_t; DLOOP_Dataloop_vector v_t; DLOOP_Dataloop_blockindexed bi_t; DLOOP_Dataloop_indexed i_t; DLOOP_Dataloop_struct s_t; DLOOP_Dataloop_common cm_t; } loop_params; DLOOP_Offset el_size; DLOOP_Offset el_extent; DLOOP_Type el_type; } DLOOP_Dataloop; #define DLOOP_FINAL_MASK 0x00000008 #define DLOOP_KIND_MASK 0x00000007 #define DLOOP_KIND_CONTIG 0x1 #define DLOOP_KIND_VECTOR 0x2 #define DLOOP_KIND_BLOCKINDEXED 0x3 #define DLOOP_KIND_INDEXED 0x4 #define DLOOP_KIND_STRUCT 0x5 /* The max datatype depth is the maximum depth of the stack used to evaluate datatypes. It represents the length of the chain of datatype dependencies. Defining this and testing when a datatype is created removes a test in the datatype evaluation loop. */ #define DLOOP_MAX_DATATYPE_DEPTH 16 /*S DLOOP_Dataloop_stackelm - Structure for an element of the stack used to process dataloops Fields: + curcount - Current loop count value (between 0 and loop.loop_params.count-1) . orig_count - original count value (cached so we don't have to look it up) . curoffset - Offset into memory relative to the pointer to the buffer passed in by the user. Used to maintain our position as we move up and down the stack. NEED MORE NOTES ON THIS!!! . orig_offset - original offset, set before the stackelm is processed, so that we know where the offset was. this is used in processing indexed types and possibly others. it is set for all types, but not referenced in some cases. . curblock - Current block value...NEED MORE NOTES ON THIS!!! . orig_block - original block value (caches so we don't have to look it up); INVALID FOR INDEX AND STRUCT TYPES. - loop_p - pointer to Loop-based description of the dataloop S*/ typedef struct DLOOP_Dataloop_stackelm { int may_require_reloading; /* indicates that items below might * need reloading (e.g. this is a struct) */ DLOOP_Count curcount; DLOOP_Offset curoffset; DLOOP_Count curblock; DLOOP_Count orig_count; DLOOP_Offset orig_offset; DLOOP_Count orig_block; struct DLOOP_Dataloop *loop_p; } DLOOP_Dataloop_stackelm; /*S DLOOP_Segment - Description of the Segment datatype Notes: This has no corresponding MPI datatype. Module: Segment Questions: Should this have an id for allocation and similarity purposes? S*/ typedef struct DLOOP_Segment { void *ptr; /* pointer to datatype buffer */ DLOOP_Handle handle; DLOOP_Offset stream_off; /* next offset into data stream resulting from datatype * processing. in other words, how many bytes have * we created/used by parsing so far? that amount + 1. */ DLOOP_Dataloop_stackelm stackelm[DLOOP_MAX_DATATYPE_DEPTH]; int cur_sp; /* Current stack pointer when using dataloop */ int valid_sp; /* maximum valid stack pointer. This is used to maintain information on the stack after it has been placed there by following the datatype field in a DLOOP_Dataloop_st for any type except struct */ struct DLOOP_Dataloop builtin_loop; /* used for both predefined types (which * won't have a loop already) and for * situations where a count is passed in * and we need to create a contig loop * to handle it */ /* other, device-specific information */ } DLOOP_Segment; /* Dataloop functions (dataloop.c) */ void PREPEND_PREFIX(Dataloop_copy)(void *dest, void *src, DLOOP_Size size); void PREPEND_PREFIX(Dataloop_update)(DLOOP_Dataloop *dataloop, DLOOP_Offset ptrdiff); DLOOP_Offset PREPEND_PREFIX(Dataloop_stream_size)(DLOOP_Dataloop *dl_p, DLOOP_Offset (*sizefn)(DLOOP_Type el_type)); void PREPEND_PREFIX(Dataloop_print)(DLOOP_Dataloop *dataloop, int depth); void PREPEND_PREFIX(Dataloop_alloc)(int kind, DLOOP_Count count, DLOOP_Dataloop **new_loop_p, DLOOP_Size *new_loop_sz_p); void PREPEND_PREFIX(Dataloop_alloc_and_copy)(int kind, DLOOP_Count count, DLOOP_Dataloop *old_loop, DLOOP_Size old_loop_sz, DLOOP_Dataloop **new_loop_p, DLOOP_Size *new_loop_sz_p); void PREPEND_PREFIX(Dataloop_struct_alloc)(DLOOP_Count count, DLOOP_Size old_loop_sz, int basic_ct, DLOOP_Dataloop **old_loop_p, DLOOP_Dataloop **new_loop_p, DLOOP_Size *new_loop_sz_p); void PREPEND_PREFIX(Dataloop_dup)(DLOOP_Dataloop *old_loop, DLOOP_Size old_loop_sz, DLOOP_Dataloop **new_loop_p); void PREPEND_PREFIX(Dataloop_free)(DLOOP_Dataloop **dataloop); /* Segment functions (segment.c) */ DLOOP_Segment * PREPEND_PREFIX(Segment_alloc)(void); void PREPEND_PREFIX(Segment_free)(DLOOP_Segment *segp); int PREPEND_PREFIX(Segment_init)(const DLOOP_Buffer buf, DLOOP_Count count, DLOOP_Handle handle, DLOOP_Segment *segp, int hetero); void PREPEND_PREFIX(Segment_manipulate)(DLOOP_Segment *segp, DLOOP_Offset first, DLOOP_Offset *lastp, int (*piecefn) (DLOOP_Offset *blocks_p, DLOOP_Type el_type, DLOOP_Offset rel_off, DLOOP_Buffer bufp, void *v_paramp), int (*vectorfn) (DLOOP_Offset *blocks_p, DLOOP_Count count, DLOOP_Count blklen, DLOOP_Offset stride, DLOOP_Type el_type, DLOOP_Offset rel_off, DLOOP_Buffer bufp, void *v_paramp), int (*blkidxfn) (DLOOP_Offset *blocks_p, DLOOP_Count count, DLOOP_Count blklen, DLOOP_Offset *offsetarray, DLOOP_Type el_type, DLOOP_Offset rel_off, DLOOP_Buffer bufp, void *v_paramp), int (*indexfn) (DLOOP_Offset *blocks_p, DLOOP_Count count, DLOOP_Count *blockarray, DLOOP_Offset *offsetarray, DLOOP_Type el_type, DLOOP_Offset rel_off, DLOOP_Buffer bufp, void *v_paramp), DLOOP_Offset (*sizefn) (DLOOP_Type el_type), void *pieceparams); /* Common segment operations (segment_ops.c) */ void PREPEND_PREFIX(Segment_count_contig_blocks)(DLOOP_Segment *segp, DLOOP_Offset first, DLOOP_Offset *lastp, DLOOP_Count *countp); void PREPEND_PREFIX(Segment_mpi_flatten)(DLOOP_Segment *segp, DLOOP_Offset first, DLOOP_Offset *lastp, DLOOP_Size *blklens, MPI_Aint *disps, DLOOP_Size *lengthp); #define DLOOP_M2M_TO_USERBUF 0 #define DLOOP_M2M_FROM_USERBUF 1 struct PREPEND_PREFIX(m2m_params) { int direction; /* M2M_TO_USERBUF or M2M_FROM_USERBUF */ char *streambuf; char *userbuf; }; void PREPEND_PREFIX(Segment_pack)(struct DLOOP_Segment *segp, DLOOP_Offset first, DLOOP_Offset *lastp, void *streambuf); void PREPEND_PREFIX(Segment_unpack)(struct DLOOP_Segment *segp, DLOOP_Offset first, DLOOP_Offset *lastp, void *streambuf); /* Segment piece functions that are used in specific cases elsewhere */ int PREPEND_PREFIX(Segment_contig_m2m)(DLOOP_Offset *blocks_p, DLOOP_Type el_type, DLOOP_Offset rel_off, void *bufp, /* unused */ void *v_paramp); int PREPEND_PREFIX(Segment_vector_m2m)(DLOOP_Offset *blocks_p, DLOOP_Count count, /* unused */ DLOOP_Count blksz, DLOOP_Offset stride, DLOOP_Type el_type, DLOOP_Offset rel_off, void *bufp, /* unused */ void *v_paramp); int PREPEND_PREFIX(Segment_blkidx_m2m)(DLOOP_Offset *blocks_p, DLOOP_Count count, DLOOP_Count blocklen, DLOOP_Offset *offsetarray, DLOOP_Type el_type, DLOOP_Offset rel_off, void *bufp, /*unused */ void *v_paramp); int PREPEND_PREFIX(Segment_index_m2m)(DLOOP_Offset *blocks_p, DLOOP_Count count, DLOOP_Count *blockarray, DLOOP_Offset *offsetarray, DLOOP_Type el_type, DLOOP_Offset rel_off, void *bufp, /*unused */ void *v_paramp); #endif # 462 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/dataloop/dataloop_parts.h" # 103 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpidu_dataloop.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "dataloop/dataloop_create.h" #endif /* expanded by -frewrite-includes */ # 103 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpidu_dataloop.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/dataloop/dataloop_create.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef DATALOOP_CREATE_H #define DATALOOP_CREATE_H /* Dataloop construction functions */ void PREPEND_PREFIX(Dataloop_create)(MPI_Datatype type, DLOOP_Dataloop **dlp_p, DLOOP_Size *dlsz_p, int *dldepth_p, int flag); int PREPEND_PREFIX(Dataloop_create_contiguous)(DLOOP_Count count, MPI_Datatype oldtype, DLOOP_Dataloop **dlp_p, DLOOP_Size *dlsz_p, int *dldepth_p, int flag); int PREPEND_PREFIX(Dataloop_create_vector)(DLOOP_Count count, DLOOP_Size blocklength, MPI_Aint stride, int strideinbytes, MPI_Datatype oldtype, DLOOP_Dataloop **dlp_p, DLOOP_Size *dlsz_p, int *dldepth_p, int flag); int PREPEND_PREFIX(Dataloop_create_blockindexed)(DLOOP_Count count, DLOOP_Size blklen, const void *disp_array, int dispinbytes, MPI_Datatype oldtype, DLOOP_Dataloop **dlp_p, DLOOP_Size *dlsz_p, int *dldepth_p, int flag); /* we bump up the size of the blocklength array because create_struct might use * create_indexed in an optimization, and in course of doing so, generate a * request of a large blocklength. */ int PREPEND_PREFIX(Dataloop_create_indexed)(DLOOP_Count count, const DLOOP_Size *blocklength_array, const void *displacement_array, int dispinbytes, MPI_Datatype oldtype, DLOOP_Dataloop **dlp_p, DLOOP_Size *dlsz_p, int *dldepth_p, int flag); int PREPEND_PREFIX(Dataloop_create_struct)(DLOOP_Count count, const int *blklen_array, const MPI_Aint *disp_array, const MPI_Datatype *oldtype_array, DLOOP_Dataloop **dlp_p, DLOOP_Size *dlsz_p, int *dldepth_p, int flag); int PREPEND_PREFIX(Dataloop_create_pairtype)(MPI_Datatype type, DLOOP_Dataloop **dlp_p, DLOOP_Size *dlsz_p, int *dldepth_p, int flag); /* Helper functions for dataloop construction */ int PREPEND_PREFIX(Type_convert_subarray)(int ndims, int *array_of_sizes, int *array_of_subsizes, int *array_of_starts, int order, MPI_Datatype oldtype, MPI_Datatype *newtype); int PREPEND_PREFIX(Type_convert_darray)(int size, int rank, int ndims, int *array_of_gsizes, int *array_of_distribs, int *array_of_dargs, int *array_of_psizes, int order, MPI_Datatype oldtype, MPI_Datatype *newtype); DLOOP_Count PREPEND_PREFIX(Type_indexed_count_contig)(DLOOP_Count count, const DLOOP_Count *blocklength_array, const void *displacement_array, int dispinbytes, DLOOP_Offset old_extent); DLOOP_Count PREPEND_PREFIX(Type_blockindexed_count_contig)(DLOOP_Count count, DLOOP_Count blklen, const void *disp_array, int dispinbytes, DLOOP_Offset old_extent); #endif # 99 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/dataloop/dataloop_create.h" # 104 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpidu_dataloop.h" 2 /* These values are defined by DLOOP code. * * Note: DLOOP_DATALOOP_ALL_BYTES is used only when the device * defines MPID_NEEDS_DLOOP_ALL_BYTES. */ #define MPIDU_DATALOOP_HETEROGENEOUS DLOOP_DATALOOP_HETEROGENEOUS #define MPIDU_DATALOOP_HOMOGENEOUS DLOOP_DATALOOP_HOMOGENEOUS #define MPIDU_DATALOOP_ALL_BYTES DLOOP_DATALOOP_ALL_BYTES #endif # 115 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpidu_dataloop.h" # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpidu_datatype.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_objects.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpidu_datatype.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpidu_datatype.h" /* NOTE: * - struct MPIDU_Dataloop and MPIDU_Segment are defined in * src/mpid/common/datatype/mpidu_dataloop.h (and gen_dataloop.h). * - MPIR_Object_alloc_t is defined in src/include/mpihandle.h */ #define MPIDU_Datatype_get_ptr(a,ptr) MPIR_Getb_ptr(Datatype,a,0x000000ff,ptr) /* MPIDU_Datatype_get_basic_id() is useful for creating and indexing into arrays that store data on a per-basic type basis */ #define MPIDU_Datatype_get_basic_id(a) ((a)&0x000000ff) #define MPIDU_Datatype_get_basic_size(a) (((a)&0x0000ff00)>>8) #define MPIDU_Datatype_add_ref(datatype_ptr) MPIR_Object_add_ref((datatype_ptr)) #define MPIDU_Datatype_get_basic_type(a,basic_type_) do { \ void *ptr; \ switch (HANDLE_GET_KIND(a)) { \ case HANDLE_KIND_DIRECT: \ ptr = MPIDU_Datatype_direct+HANDLE_INDEX(a); \ basic_type_ = ((MPIDU_Datatype *) ptr)->basic_type; \ break; \ case HANDLE_KIND_INDIRECT: \ ptr = ((MPIDU_Datatype *) \ MPIR_Handle_get_ptr_indirect(a,&MPIDU_Datatype_mem)); \ basic_type_ = ((MPIDU_Datatype *) ptr)->basic_type; \ break; \ case HANDLE_KIND_BUILTIN: \ basic_type_ = a; \ break; \ case HANDLE_KIND_INVALID: \ default: \ basic_type_ = 0; \ break; \ \ } \ /* This macro returns the builtin type, if 'basic_type' is not \ * a builtin type, it must be a pair type composed of different \ * builtin types, so we return MPI_DATATYPE_NULL here. \ */ \ if (HANDLE_GET_KIND(basic_type_) != HANDLE_KIND_BUILTIN) \ basic_type_ = MPI_DATATYPE_NULL; \ } while(0) /* MPIDU_Datatype_release decrements the reference count on the MPIR_Datatype * and, if the refct is then zero, frees the MPIDU_Datatype and associated * structures. */ #define MPIDU_Datatype_release(datatype_ptr) do { \ int inuse_; \ \ MPIR_Object_release_ref((datatype_ptr),&inuse_); \ if (!inuse_) { \ int lmpi_errno = MPI_SUCCESS; \ if (MPIR_Process.attr_free && datatype_ptr->attributes) { \ lmpi_errno = MPIR_Process.attr_free( datatype_ptr->handle, \ &datatype_ptr->attributes ); \ } \ /* LEAVE THIS COMMENTED OUT UNTIL WE HAVE SOME USE FOR THE FREE_FN \ if (datatype_ptr->free_fn) { \ mpi_errno = (datatype_ptr->free_fn)( datatype_ptr ); \ if (mpi_errno) { \ MPIR_FUNC_TERSE_EXIT(MPID_STATE_MPI_TYPE_FREE); \ return MPIR_Err_return_comm( 0, FCNAME, mpi_errno ); \ } \ } */ \ if (lmpi_errno == MPI_SUCCESS) { \ MPIDU_Datatype_free(datatype_ptr); \ } \ } \ } while(0) /* Note: Probably there is some clever way to build all of these from a macro. */ #define MPIDU_Datatype_get_size_macro(a,size_) do { \ void *ptr; \ switch (HANDLE_GET_KIND(a)) { \ case HANDLE_KIND_DIRECT: \ ptr = MPIDU_Datatype_direct+HANDLE_INDEX(a); \ size_ = ((MPIDU_Datatype *) ptr)->size; \ break; \ case HANDLE_KIND_INDIRECT: \ ptr = ((MPIDU_Datatype *) \ MPIR_Handle_get_ptr_indirect(a,&MPIDU_Datatype_mem)); \ size_ = ((MPIDU_Datatype *) ptr)->size; \ break; \ case HANDLE_KIND_BUILTIN: \ size_ = MPIDU_Datatype_get_basic_size(a); \ break; \ case HANDLE_KIND_INVALID: \ default: \ size_ = 0; \ break; \ \ } \ } while(0) /* * The following macro allows us to reference either the regular or * hetero value for the 3 fields (NULL,_size,_depth) in the * MPIDU_Datatype structure. This is used in the many * macros that access fields of the datatype. We need this macro * to simplify the definition of the other macros in the case where * MPID_HAS_HETERO is *not* defined. */ #if defined(MPID_HAS_HETERO) || 1 #define MPIDU_GET_FIELD(hetero_,value_,fieldname_) do { \ if (hetero_ != MPIDU_DATALOOP_HETEROGENEOUS) \ value_ = ((MPIDU_Datatype *)ptr)->dataloop##fieldname_; \ else value_ = ((MPIDU_Datatype *) ptr)->hetero_dloop##fieldname_; \ } while(0) #else # 123 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpidu_datatype.h" #define MPIDU_GET_FIELD(hetero_,value_,fieldname_) \ value_ = ((MPIDU_Datatype *)ptr)->dataloop##fieldname_ #endif # 126 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpidu_datatype.h" #if defined(MPID_HAS_HETERO) || 1 #define MPIDU_SET_FIELD(hetero_,value_,fieldname_) do { \ if (hetero_ != MPIDU_DATALOOP_HETEROGENEOUS) \ ((MPIDU_Datatype *)ptr)->dataloop##fieldname_ = value_; \ else ((MPIDU_Datatype *) ptr)->hetero_dloop##fieldname_ = value_; \ } while(0) #else # 134 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpidu_datatype.h" #define MPIDU_SET_FIELD(hetero_,value_,fieldname_) \ ((MPIDU_Datatype *)ptr)->dataloop##fieldname_ = value_ #endif # 137 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpidu_datatype.h" #define MPIDU_Datatype_get_loopdepth_macro(a,depth_,hetero_) do { \ void *ptr; \ switch (HANDLE_GET_KIND(a)) { \ case HANDLE_KIND_DIRECT: \ ptr = MPIDU_Datatype_direct+HANDLE_INDEX(a); \ MPIDU_GET_FIELD(hetero_,depth_,_depth); \ break; \ case HANDLE_KIND_INDIRECT: \ ptr = ((MPIDU_Datatype *) \ MPIR_Handle_get_ptr_indirect(a,&MPIDU_Datatype_mem)); \ MPIDU_GET_FIELD(hetero_,depth_,_depth); \ break; \ case HANDLE_KIND_INVALID: \ case HANDLE_KIND_BUILTIN: \ default: \ depth_ = 0; \ break; \ } \ } while(0) #define MPIDU_Datatype_get_loopsize_macro(a,depth_,hetero_) do { \ void *ptr; \ switch (HANDLE_GET_KIND(a)) { \ case HANDLE_KIND_DIRECT: \ ptr = MPIDU_Datatype_direct+HANDLE_INDEX(a); \ MPIDU_GET_FIELD(hetero_,depth_,_size); \ break; \ case HANDLE_KIND_INDIRECT: \ ptr = ((MPIDU_Datatype *) \ MPIR_Handle_get_ptr_indirect(a,&MPIDU_Datatype_mem)); \ MPIDU_GET_FIELD(hetero_,depth_,_size); \ break; \ case HANDLE_KIND_INVALID: \ case HANDLE_KIND_BUILTIN: \ default: \ depth_ = 0; \ break; \ } \ } while(0) #define MPIDU_Datatype_get_loopptr_macro(a,lptr_,hetero_) do { \ void *ptr; \ switch (HANDLE_GET_KIND(a)) { \ case HANDLE_KIND_DIRECT: \ ptr = MPIDU_Datatype_direct+HANDLE_INDEX(a); \ MPIDU_GET_FIELD(hetero_,lptr_,); \ break; \ case HANDLE_KIND_INDIRECT: \ ptr = ((MPIDU_Datatype *) \ MPIR_Handle_get_ptr_indirect(a,&MPIDU_Datatype_mem)); \ MPIDU_GET_FIELD(hetero_,lptr_,); \ break; \ case HANDLE_KIND_INVALID: \ case HANDLE_KIND_BUILTIN: \ default: \ lptr_ = 0; \ break; \ } \ } while(0) #define MPIDU_Datatype_set_loopdepth_macro(a,depth_,hetero_) do { \ void *ptr; \ switch (HANDLE_GET_KIND(a)) { \ case HANDLE_KIND_DIRECT: \ ptr = MPIDU_Datatype_direct+HANDLE_INDEX(a); \ MPIDU_SET_FIELD(hetero_,depth_,_depth); \ break; \ case HANDLE_KIND_INDIRECT: \ ptr = ((MPIDU_Datatype *) \ MPIR_Handle_get_ptr_indirect(a,&MPIDU_Datatype_mem)); \ MPIDU_SET_FIELD(hetero_,depth_,_depth); \ break; \ case HANDLE_KIND_INVALID: \ case HANDLE_KIND_BUILTIN: \ default: \ depth_ = 0; \ break; \ } \ } while(0) #define MPIDU_Datatype_set_loopsize_macro(a,depth_,hetero_) do { \ void *ptr; \ switch (HANDLE_GET_KIND(a)) { \ case HANDLE_KIND_DIRECT: \ ptr = MPIDU_Datatype_direct+HANDLE_INDEX(a); \ MPIDU_SET_FIELD(hetero_,depth_,_size); \ break; \ case HANDLE_KIND_INDIRECT: \ ptr = ((MPIDU_Datatype *) \ MPIR_Handle_get_ptr_indirect(a,&MPIDU_Datatype_mem)); \ MPIDU_SET_FIELD(hetero_,depth_,_size); \ break; \ case HANDLE_KIND_INVALID: \ case HANDLE_KIND_BUILTIN: \ default: \ depth_ = 0; \ break; \ } \ } while(0) #define MPIDU_Datatype_set_loopptr_macro(a,lptr_,hetero_) do { \ void *ptr; \ switch (HANDLE_GET_KIND(a)) { \ case HANDLE_KIND_DIRECT: \ ptr = MPIDU_Datatype_direct+HANDLE_INDEX(a); \ MPIDU_SET_FIELD(hetero_,lptr_,); \ break; \ case HANDLE_KIND_INDIRECT: \ ptr = ((MPIDU_Datatype *) \ MPIR_Handle_get_ptr_indirect(a,&MPIDU_Datatype_mem)); \ MPIDU_SET_FIELD(hetero_,lptr_,); \ break; \ case HANDLE_KIND_INVALID: \ case HANDLE_KIND_BUILTIN: \ default: \ lptr_ = 0; \ break; \ } \ } while(0) #define MPIDU_Datatype_get_extent_macro(a,extent_) do { \ void *ptr; \ switch (HANDLE_GET_KIND(a)) { \ case HANDLE_KIND_DIRECT: \ ptr = MPIDU_Datatype_direct+HANDLE_INDEX(a); \ extent_ = ((MPIDU_Datatype *) ptr)->extent; \ break; \ case HANDLE_KIND_INDIRECT: \ ptr = ((MPIDU_Datatype *) \ MPIR_Handle_get_ptr_indirect(a,&MPIDU_Datatype_mem)); \ extent_ = ((MPIDU_Datatype *) ptr)->extent; \ break; \ case HANDLE_KIND_INVALID: \ case HANDLE_KIND_BUILTIN: \ default: \ extent_ = MPIDU_Datatype_get_basic_size(a); /* same as size */ \ break; \ } \ } while(0) #define MPIDU_Datatype_valid_ptr(ptr,err) MPIR_Valid_ptr_class(Datatype,ptr,MPI_ERR_TYPE,err) /* to be used only after MPIDU_Datatype_valid_ptr(); the check on * err == MPI_SUCCESS ensures that we won't try to dereference the * pointer if something has already been detected as wrong. */ #define MPIDU_Datatype_committed_ptr(ptr,err) do { \ if ((err == MPI_SUCCESS) && !((ptr)->is_committed)) \ err = MPIR_Err_create_code(MPI_SUCCESS, \ MPIR_ERR_RECOVERABLE, \ FCNAME, \ __LINE__, \ MPI_ERR_TYPE, \ "**dtypecommit", \ 0); \ } while(0) /*S MPIDU_Datatype_contents - Holds envelope and contents data for a given datatype Notes: Space is allocated beyond the structure itself in order to hold the arrays of types, ints, and aints, in that order. S*/ typedef struct MPIDU_Datatype_contents { int combiner; int nr_ints; int nr_aints; int nr_types; /* space allocated beyond structure used to store the types[], * ints[], and aints[], in that order. */ } MPIDU_Datatype_contents; /* Datatype Structure */ /*S MPIDU_Datatype - Description of the MPID Datatype structure Notes: The 'ref_count' is needed for nonblocking operations such as .vb MPI_Type_struct( ... , &newtype ); MPI_Irecv( buf, 1000, newtype, ..., &request ); MPI_Type_free( &newtype ); ... MPI_Wait( &request, &status ); .ve Module: Datatype-DS Notes: Alternatives: The following alternatives for the layout of this structure were considered. Most were not chosen because any benefit in performance or memory efficiency was outweighed by the added complexity of the implementation. A number of fields contain only boolean inforation ('is_contig', 'has_sticky_ub', 'has_sticky_lb', 'is_permanent', 'is_committed'). These could be combined and stored in a single bit vector. 'MPI_Type_dup' could be implemented with a shallow copy, where most of the data fields, would not be copied into the new object created by 'MPI_Type_dup'; instead, the new object could point to the data fields in the old object. However, this requires more code to make sure that fields are found in the correct objects and that deleting the old object doesn't invalidate the dup'ed datatype. Originally we attempted to keep contents/envelope data in a non-optimized dataloop. The subarray and darray types were particularly problematic, and eventually we decided it would be simpler to just keep contents/ envelope data in arrays separately. Earlier versions of the ADI used a single API to change the 'ref_count', with each MPI object type having a separate routine. Since reference count changes are always up or down one, and since all MPI objects are defined to have the 'ref_count' field in the same place, the current ADI3 API uses two routines, 'MPIR_Object_add_ref' and 'MPIR_Object_release_ref', to increment and decrement the reference count. S*/ typedef struct MPIDU_Datatype { /* handle and ref_count are filled in by MPIR_Handle_obj_alloc() */ MPIR_OBJECT_HEADER; /* adds handle and ref_count fields */ /* basic parameters for datatype, accessible via MPI calls */ MPI_Aint size; /* MPI_Count could be 128 bits, so use MPI_Aint */ MPI_Aint extent, ub, lb, true_ub, true_lb; /* chars affecting subsequent datatype processing and creation */ MPI_Aint alignsize; int has_sticky_ub, has_sticky_lb; int is_permanent; /* non-zero if datatype is a predefined type */ int is_committed; /* element information; used for accumulate and get elements * basic_type: describes basic type (predefined type). If the * type is composed of the same basic type, it is * set to that type, otherwise it is set to MPI_DATATYPE_NULL. * n_builtin_elements: refers to the number of builtin type elements. * builtin_element_size: refers to the size of builtin type. If the * type is composed of the same builtin type, * it is set to size of that type, otherwise it * is set to -1. */ int basic_type; MPI_Aint n_builtin_elements; MPI_Aint builtin_element_size; /* information on contiguity of type, for processing shortcuts. * * is_contig is non-zero only if N instances of the type would be * contiguous. */ int is_contig; /* Upper bound on the number of contig blocks for one instance. * It is not trivial to calculate the *real* number of contig * blocks in the case where old datatype is non-contiguous */ MPI_Aint max_contig_blocks; /* pointer to contents and envelope data for the datatype */ MPIDU_Datatype_contents *contents; /* dataloop members, including a pointer to the loop, the size in bytes, * and a depth used to verify that we can process it (limited stack depth */ struct MPIDU_Dataloop *dataloop; /* might be optimized for homogenous */ MPI_Aint dataloop_size; int dataloop_depth; #if defined(MPID_HAS_HETERO) || 1 struct MPIDU_Dataloop *hetero_dloop; /* heterogeneous dataloop */ MPI_Aint hetero_dloop_size; int hetero_dloop_depth; #endif /* MPID_HAS_HETERO */ # 415 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpidu_datatype.h" /* MPI-2 attributes and name */ struct MPIR_Attribute *attributes; char name[MPI_MAX_OBJECT_NAME]; /* not yet used; will be used to track what processes have cached * copies of this type. */ int32_t cache_id; /* MPID_Lpidmask mask; */ /* int (*free_fn)( struct MPIDU_Datatype * ); */ /* Function to free this datatype */ /* Other, device-specific information */ #ifdef MPID_DEV_DATATYPE_DECL MPID_DEV_DATATYPE_DECL #endif # 431 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpidu_datatype.h" } MPIDU_Datatype; extern MPIR_Object_alloc_t MPIDU_Datatype_mem; /* Preallocated datatype objects */ /* This value should be set to greatest value used as the type index suffix in * the predefined handles. That is, look at the last two hex digits of all * predefined datatype handles, take the greatest one, and convert it to decimal * here. */ /* FIXME calculating this value this way is foolish, we should make this more * automatic and less error prone */ /* FIXME: Given that this is relatively static, an adequate alternative is to provide a check that this value is valid. */ #define MPIDU_DATATYPE_N_BUILTIN 69 extern MPIDU_Datatype MPIDU_Datatype_builtin[MPIDU_DATATYPE_N_BUILTIN + 1]; extern MPIDU_Datatype MPIDU_Datatype_direct[]; #define MPIDU_DTYPE_BEGINNING 0 #define MPIDU_DTYPE_END -1 /* LB/UB calculation helper macros */ /* MPIDU_DATATYPE_CONTIG_LB_UB() * * Determines the new LB and UB for a block of old types given the * old type's LB, UB, and extent, and a count of these types in the * block. * * Note: if the displacement is non-zero, the MPIDU_DATATYPE_BLOCK_LB_UB() * should be used instead (see below). */ #define MPIDU_DATATYPE_CONTIG_LB_UB(cnt_, \ old_lb_, \ old_ub_, \ old_extent_, \ lb_, \ ub_) \ do { \ if (cnt_ == 0) { \ lb_ = old_lb_; \ ub_ = old_ub_; \ } \ else if (old_ub_ >= old_lb_) { \ lb_ = old_lb_; \ ub_ = old_ub_ + (old_extent_) * (cnt_ - 1); \ } \ else /* negative extent */ { \ lb_ = old_lb_ + (old_extent_) * (cnt_ - 1); \ ub_ = old_ub_; \ } \ } while(0) /* MPIDU_DATATYPE_VECTOR_LB_UB() * * Determines the new LB and UB for a vector of blocks of old types * given the old type's LB, UB, and extent, and a count, stride, and * blocklen describing the vectorization. */ #define MPIDU_DATATYPE_VECTOR_LB_UB(cnt_, \ stride_, \ blklen_, \ old_lb_, \ old_ub_, \ old_extent_, \ lb_, \ ub_) \ do { \ if (cnt_ == 0 || blklen_ == 0) { \ lb_ = old_lb_; \ ub_ = old_ub_; \ } \ else if (stride_ >= 0 && (old_extent_) >= 0) { \ lb_ = old_lb_; \ ub_ = old_ub_ + (old_extent_) * ((blklen_) - 1) + \ (stride_) * ((cnt_) - 1); \ } \ else if (stride_ < 0 && (old_extent_) >= 0) { \ lb_ = old_lb_ + (stride_) * ((cnt_) - 1); \ ub_ = old_ub_ + (old_extent_) * ((blklen_) - 1); \ } \ else if (stride_ >= 0 && (old_extent_) < 0) { \ lb_ = old_lb_ + (old_extent_) * ((blklen_) - 1); \ ub_ = old_ub_ + (stride_) * ((cnt_) - 1); \ } \ else { \ lb_ = old_lb_ + (old_extent_) * ((blklen_) - 1) + \ (stride_) * ((cnt_) - 1); \ ub_ = old_ub_; \ } \ } while(0) /* MPIDU_DATATYPE_BLOCK_LB_UB() * * Determines the new LB and UB for a block of old types given the LB, * UB, and extent of the old type as well as a new displacement and count * of types. * * Note: we need the extent here in addition to the lb and ub because the * extent might have some padding in it that we need to take into account. */ #define MPIDU_DATATYPE_BLOCK_LB_UB(cnt_, \ disp_, \ old_lb_, \ old_ub_, \ old_extent_, \ lb_, \ ub_) \ do { \ if (cnt_ == 0) { \ lb_ = old_lb_ + (disp_); \ ub_ = old_ub_ + (disp_); \ } \ else if (old_ub_ >= old_lb_) { \ lb_ = old_lb_ + (disp_); \ ub_ = old_ub_ + (disp_) + (old_extent_) * ((cnt_) - 1); \ } \ else /* negative extent */ { \ lb_ = old_lb_ + (disp_) + (old_extent_) * ((cnt_) - 1); \ ub_ = old_ub_ + (disp_); \ } \ } while(0) /* helper macro: takes an MPI_Datatype handle value and returns TRUE in * (*is_config_) if the type is contiguous */ #define MPIDU_Datatype_is_contig(dtype_, is_contig_) \ do { \ if (HANDLE_GET_KIND(dtype_) == HANDLE_KIND_BUILTIN) { \ *(is_contig_) = TRUE; \ } \ else { \ MPIDU_Datatype *dtp_ = NULL; \ MPIDU_Datatype_get_ptr((dtype_), dtp_); \ *(is_contig_) = dtp_->is_contig; \ } \ } while (0) /* helper macro: takes an MPI_Datatype handle value and returns true_lb in * (*true_lb_) */ #define MPIDU_Datatype_get_true_lb(dtype_, true_lb_) \ do { \ if (HANDLE_GET_KIND(dtype_) == HANDLE_KIND_BUILTIN) { \ *(true_lb_) = 0; \ } \ else { \ MPIDU_Datatype *dtp_ = NULL; \ MPIDU_Datatype_get_ptr((dtype_), dtp_); \ *(true_lb_) = dtp_->true_lb; \ } \ } while (0) /* Datatype functions */ int MPIDU_Type_commit(MPI_Datatype *type); int MPIDU_Type_dup(MPI_Datatype oldtype, MPI_Datatype *newtype); int MPIDU_Type_struct(int count, const int *blocklength_array, const MPI_Aint *displacement_array, const MPI_Datatype *oldtype_array, MPI_Datatype *newtype); int MPIDU_Type_indexed(int count, const int *blocklength_array, const void *displacement_array, int dispinbytes, MPI_Datatype oldtype, MPI_Datatype *newtype); int MPIDU_Type_blockindexed(int count, int blocklength, const void *displacement_array, int dispinbytes, MPI_Datatype oldtype, MPI_Datatype *newtype); int MPIDU_Type_vector(int count, int blocklength, MPI_Aint stride, int strideinbytes, MPI_Datatype oldtype, MPI_Datatype *newtype); int MPIDU_Type_contiguous(int count, MPI_Datatype oldtype, MPI_Datatype *newtype); int MPIDU_Type_zerolen(MPI_Datatype *newtype); int MPIDU_Type_create_resized(MPI_Datatype oldtype, MPI_Aint lb, MPI_Aint extent, MPI_Datatype *newtype); int MPIDU_Type_get_envelope(MPI_Datatype datatype, int *num_integers, int *num_addresses, int *num_datatypes, int *combiner); int MPIDU_Type_get_contents(MPI_Datatype datatype, int max_integers, int max_addresses, int max_datatypes, int array_of_integers[], MPI_Aint array_of_addresses[], MPI_Datatype array_of_datatypes[]); int MPIDU_Type_create_pairtype(MPI_Datatype datatype, MPIDU_Datatype *new_dtp); /* internal debugging functions */ void MPIDI_Datatype_printf(MPI_Datatype type, int depth, MPI_Aint displacement, int blocklength, int header); /* Dataloop functions */ void MPIDU_Dataloop_copy(void *dest, void *src, MPI_Aint size); void MPIDU_Dataloop_print(struct MPIDU_Dataloop *dataloop, int depth); void MPIDU_Dataloop_alloc(int kind, MPI_Aint count, DLOOP_Dataloop **new_loop_p, MPI_Aint *new_loop_sz_p); void MPIDU_Dataloop_alloc_and_copy(int kind, MPI_Aint count, struct DLOOP_Dataloop *old_loop, MPI_Aint old_loop_sz, struct DLOOP_Dataloop **new_loop_p, MPI_Aint *new_loop_sz_p); void MPIDU_Dataloop_struct_alloc(MPI_Aint count, MPI_Aint old_loop_sz, int basic_ct, DLOOP_Dataloop **old_loop_p, DLOOP_Dataloop **new_loop_p, MPI_Aint *new_loop_sz_p); void MPIDU_Dataloop_dup(DLOOP_Dataloop *old_loop, MPI_Aint old_loop_sz, DLOOP_Dataloop **new_loop_p); void MPIDU_Dataloop_free(struct MPIDU_Dataloop **dataloop); /* Segment functions specific to MPICH */ void MPIDU_Segment_pack_vector(struct DLOOP_Segment *segp, DLOOP_Offset first, DLOOP_Offset *lastp, DLOOP_VECTOR *vector, int *lengthp); void MPIDU_Segment_unpack_vector(struct DLOOP_Segment *segp, DLOOP_Offset first, DLOOP_Offset *lastp, DLOOP_VECTOR *vector, int *lengthp); void MPIDU_Segment_flatten(struct DLOOP_Segment *segp, DLOOP_Offset first, DLOOP_Offset *lastp, DLOOP_Offset *offp, DLOOP_Size *sizep, DLOOP_Offset *lengthp); /* misc */ int MPIDU_Datatype_set_contents(struct MPIDU_Datatype *ptr, int combiner, int nr_ints, int nr_aints, int nr_types, int *ints, const MPI_Aint *aints, const MPI_Datatype *types); void MPIDU_Datatype_free_contents(struct MPIDU_Datatype *ptr); void MPIDI_Datatype_get_contents_aints(MPIDU_Datatype_contents *cp, MPI_Aint *user_aints); void MPIDI_Datatype_get_contents_types(MPIDU_Datatype_contents *cp, MPI_Datatype *user_types); void MPIDI_Datatype_get_contents_ints(MPIDU_Datatype_contents *cp, int *user_ints); void MPIDU_Datatype_free(struct MPIDU_Datatype *ptr); void MPIDU_Dataloop_update(struct DLOOP_Dataloop *dataloop, MPI_Aint ptrdiff); int MPIR_Type_flatten(MPI_Datatype type, MPI_Aint *off_array, DLOOP_Size *size_array, MPI_Aint *array_len_p); void MPIDU_Segment_pack_external32(struct DLOOP_Segment *segp, DLOOP_Offset first, DLOOP_Offset *lastp, void *pack_buffer); void MPIDU_Segment_unpack_external32(struct DLOOP_Segment *segp, DLOOP_Offset first, DLOOP_Offset *lastp, DLOOP_Buffer unpack_buffer); MPI_Aint MPIDU_Datatype_size_external32(MPI_Datatype type); MPI_Aint MPIDI_Datatype_get_basic_size_external32(MPI_Datatype el_type); /* debugging helper functions */ char *MPIDU_Datatype_builtin_to_string(MPI_Datatype type); char *MPIDU_Datatype_combiner_to_string(int combiner); void MPIDU_Datatype_debug(MPI_Datatype type, int array_ct); /* contents accessor functions */ void MPIDU_Type_access_contents(MPI_Datatype type, int **ints_p, MPI_Aint **aints_p, MPI_Datatype **types_p); void MPIDU_Type_release_contents(MPI_Datatype type, int **ints_p, MPI_Aint **aints_p, MPI_Datatype **types_p); /* end of file */ #endif # 757 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpidu_datatype.h" # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpid_datatype_fallback.h" 2 /* Variables */ #define MPIR_Datatype_direct MPIDU_Datatype_direct #define MPIR_Datatype_builtin MPIDU_Datatype_builtin #define MPIR_Datatype_mem MPIDU_Datatype_mem /* Macros */ #define MPIR_DATATYPE_N_BUILTIN MPIDU_DATATYPE_N_BUILTIN #define MPID_DTYPE_BEGINNING MPIDU_DTYPE_BEGINNING #define MPID_DTYPE_END MPIDU_DTYPE_END typedef MPIDU_Datatype MPIR_Datatype; typedef MPIDU_Datatype_contents MPIR_Datatype_contents; #define MPID_Datatype_add_ref MPIDU_Datatype_add_ref #define MPID_Datatype_committed_ptr MPIDU_Datatype_committed_ptr #define MPID_Datatype_get_basic_size MPIDU_Datatype_get_basic_size #define MPID_Datatype_get_basic_type MPIDU_Datatype_get_basic_type #define MPID_Datatype_get_ptr MPIDU_Datatype_get_ptr #define MPID_Datatype_get_size_macro MPIDU_Datatype_get_size_macro #define MPID_Datatype_get_extent_macro MPIDU_Datatype_get_extent_macro #define MPID_Datatype_is_contig MPIDU_Datatype_is_contig #define MPID_Datatype_release MPIDU_Datatype_release #define MPIR_Datatype_valid_ptr MPIDU_Datatype_valid_ptr #define MPID_Datatype_get_loopdepth_macro MPIDU_Datatype_get_loopdepth_macro #define MPID_Datatype_get_loopptr_macro MPIDU_Datatype_get_loopptr_macro #define MPID_Datatype_get_loopsize_macro MPIDU_Datatype_get_loopsize_macro #define MPID_Datatype_set_loopdepth_macro MPIDU_Datatype_set_loopdepth_macro #define MPID_Datatype_set_loopptr_macro MPIDU_Datatype_set_loopptr_macro #define MPID_Datatype_set_loopsize_macro MPIDU_Datatype_set_loopsize_macro #define MPID_Datatype_free MPIDU_Datatype_free #define MPID_Datatype_free_contents MPIDU_Datatype_free_contents #define MPID_Datatype_set_contents MPIDU_Datatype_set_contents #define MPID_Datatype_size_external32 MPIDU_Datatype_size_external32 /* MPID_Segment */ typedef struct DLOOP_Segment MPID_Segment; /* MPIDU_Segment */ #define MPID_Segment_init MPIDU_Segment_init #define MPID_Segment_alloc MPIDU_Segment_alloc #define MPID_Segment_free MPIDU_Segment_free #define MPID_Segment_pack MPIDU_Segment_pack #define MPID_Segment_unpack MPIDU_Segment_unpack #define MPID_Segment_pack_external32 MPIDU_Segment_pack_external32 #define MPID_Segment_unpack_external32 MPIDU_Segment_unpack_external32 /* MPID_Type */ #define MPID_Type_access_contents MPIDU_Type_access_contents #define MPID_Type_blockindexed MPIDU_Type_blockindexed #define MPID_Type_commit MPIDU_Type_commit #define MPID_Type_contiguous MPIDU_Type_contiguous #define MPID_Type_create_pairtype MPIDU_Type_create_pairtype #define MPID_Type_create_resized MPIDU_Type_create_resized #define MPID_Type_dup MPIDU_Type_dup #define MPID_Type_get_contents MPIDU_Type_get_contents #define MPID_Type_get_envelope MPIDU_Type_get_envelope #define MPID_Type_indexed MPIDU_Type_indexed #define MPID_Type_release_contents MPIDU_Type_release_contents #define MPID_Type_struct MPIDU_Type_struct #define MPID_Type_vector MPIDU_Type_vector #define MPID_Type_zerolen MPIDU_Type_zerolen #endif /* MPiD_DATATYPE_FALLBACK_H_INCLUDED */ # 76 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/datatype/mpid_datatype_fallback.h" # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" 2 /* FIXME: Include here? */ #if 0 /* expanded by -frewrite-includes */ #include "opa_primitives.h" #endif /* expanded by -frewrite-includes */ # 23 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" # 24 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" #if 0 /* expanded by -frewrite-includes */ #include "mpid_thread.h" #endif /* expanded by -frewrite-includes */ # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpid_thread.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPID_THREAD_H_INCLUDED) #define MPID_THREAD_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpidu_thread_fallback.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpid_thread.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/thread/mpidu_thread_fallback.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPIDU_THREAD_H_INCLUDED) #define MPIDU_THREAD_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "opa_primitives.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/thread/mpidu_thread_fallback.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/thread/mpidu_thread_fallback.h" /* some important critical section names: * GLOBAL - entered/exited at beginning/end of (nearly) every MPI_ function * INIT - entered before MPID_Init and exited near the end of MPI_Init(_thread) * See the analysis of the MPI routines for thread usage properties. Those * routines considered "Access Only" do not require GLOBAL. That analysis * was very general; in MPICH, some routines may have internal shared * state that isn't required by the MPI specification. Perhaps the * best example of this is the MPI_ERROR_STRING routine, where the * instance-specific error messages make use of shared state, and hence * must be accessed in a thread-safe fashion (e.g., require an GLOBAL * critical section). With such routines removed, the set of routines * that (probably) do not require GLOBAL include: * * MPI_CART_COORDS, MPI_CART_GET, MPI_CART_MAP, MPI_CART_RANK, MPI_CART_SHIFT, * MPI_CART_SUB, MPI_CARTDIM_GET, MPI_COMM_GET_NAME, * MPI_COMM_RANK, MPI_COMM_REMOTE_SIZE, * MPI_COMM_SET_NAME, MPI_COMM_SIZE, MPI_COMM_TEST_INTER, MPI_ERROR_CLASS, * MPI_FILE_GET_AMODE, MPI_FILE_GET_ATOMICITY, MPI_FILE_GET_BYTE_OFFSET, * MPI_FILE_GET_POSITION, MPI_FILE_GET_POSITION_SHARED, MPI_FILE_GET_SIZE * MPI_FILE_GET_TYPE_EXTENT, MPI_FILE_SET_SIZE, g * MPI_FINALIZED, MPI_GET_COUNT, MPI_GET_ELEMENTS, MPI_GRAPH_GET, * MPI_GRAPH_MAP, MPI_GRAPH_NEIGHBORS, MPI_GRAPH_NEIGHBORS_COUNT, * MPI_GRAPHDIMS_GET, MPI_GROUP_COMPARE, MPI_GROUP_RANK, * MPI_GROUP_SIZE, MPI_GROUP_TRANSLATE_RANKS, MPI_INITIALIZED, * MPI_PACK, MPI_PACK_EXTERNAL, MPI_PACK_SIZE, MPI_TEST_CANCELLED, * MPI_TOPO_TEST, MPI_TYPE_EXTENT, MPI_TYPE_GET_ENVELOPE, * MPI_TYPE_GET_EXTENT, MPI_TYPE_GET_NAME, MPI_TYPE_GET_TRUE_EXTENT, * MPI_TYPE_LB, MPI_TYPE_SET_NAME, MPI_TYPE_SIZE, MPI_TYPE_UB, MPI_UNPACK, * MPI_UNPACK_EXTERNAL, MPI_WIN_GET_NAME, MPI_WIN_SET_NAME * * Some of the routines that could be read-only, but internally may * require access or updates to shared data include * MPI_COMM_COMPARE (creation of group sets) * MPI_COMM_SET_ERRHANDLER (reference count on errhandler) * MPI_COMM_CALL_ERRHANDLER (actually ok, but risk high, usage low) * MPI_FILE_CALL_ERRHANDLER (ditto) * MPI_WIN_CALL_ERRHANDLER (ditto) * MPI_ERROR_STRING (access to instance-specific string, which could * be overwritten by another thread) * MPI_FILE_SET_VIEW (setting view a big deal) * MPI_TYPE_COMMIT (could update description of type internally, * including creating a new representation. Should * be ok, but, like call_errhandler, low usage) * * Note that other issues may force a routine to include the GLOBAL * critical section, such as debugging information that requires shared * state. Such situations should be avoided where possible. */ typedef struct { MPL_thread_mutex_t mutex; OPA_int_t num_queued_threads; } MPIDU_Thread_mutex_t; typedef MPL_thread_cond_t MPIDU_Thread_cond_t; typedef MPL_thread_id_t MPIDU_Thread_id_t; typedef MPL_thread_tls_t MPIDU_Thread_tls_t; typedef MPL_thread_func_t MPIDU_Thread_func_t; /*M MPIDU_THREAD_CS_ENTER - Enter a named critical section Input Parameters: + _name - name of the critical section - _context - A context (typically an object) of the critical section M*/ #define MPIDU_THREAD_CS_ENTER(name, mutex) MPIDUI_THREAD_CS_ENTER_##name(mutex) #if defined(MPICH_IS_THREADED) #if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__GLOBAL #define MPIDUI_THREAD_CS_ENTER_GLOBAL(mutex) \ do { \ if (MPIR_ThreadInfo.isThreaded) { \ int rec_err_ = 0; \ MPIR_Per_thread_t *per_thread = NULL; \ \ MPL_DBG_MSG(MPIR_DBG_THREAD, TYPICAL, "recursive locking GLOBAL mutex"); \ MPID_THREADPRIV_KEY_GET_ADDR(MPIR_ThreadInfo.isThreaded, MPIR_Per_thread_key, \ MPIR_Per_thread, per_thread, &rec_err_); \ MPIR_Assert(rec_err_ == 0); \ \ if (per_thread->lock_depth == 0) { \ int err_ = 0; \ MPIDU_Thread_mutex_lock(&mutex, &err_); \ MPIR_Assert(err_ == 0); \ } \ per_thread->lock_depth++; \ } \ } while (0) #define MPIDUI_THREAD_CS_ENTER_POBJ(mutex) do {} while (0) #else /* MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_POBJ */ # 106 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/thread/mpidu_thread_fallback.h" #define MPIDUI_THREAD_CS_ENTER_POBJ(mutex) \ do { \ if (MPIR_ThreadInfo.isThreaded) { \ int err_ = 0; \ MPL_DBG_MSG(MPIR_DBG_THREAD, TYPICAL, "non-recursive locking POBJ mutex"); \ MPL_DBG_MSG_P(MPIR_DBG_THREAD,VERBOSE,"enter MPIDU_Thread_mutex_lock %p", &mutex); \ MPIDU_Thread_mutex_lock(&mutex, &err_); \ MPL_DBG_MSG_P(MPIR_DBG_THREAD,VERBOSE,"exit MPIDU_Thread_mutex_lock %p", &mutex); \ MPIR_Assert(err_ == 0); \ } \ } while (0) #define MPIDUI_THREAD_CS_ENTER_GLOBAL(mutex) do {} while (0) #endif /* MPICH_THREAD_GRANULARITY */ # 121 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/thread/mpidu_thread_fallback.h" #else /* !defined(MPICH_IS_THREADED) */ # 123 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/thread/mpidu_thread_fallback.h" #define MPIDUI_THREAD_CS_ENTER_GLOBAL(mutex) do {} while (0) #define MPIDUI_THREAD_CS_ENTER_POBJ(mutex) do {} while (0) #endif /* MPICH_IS_THREADED */ # 128 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/thread/mpidu_thread_fallback.h" /*M MPIDU_THREAD_CS_EXIT - Exit a named critical section Input Parameters: + _name - cname of the critical section - _context - A context (typically an object) of the critical section M*/ #define MPIDU_THREAD_CS_EXIT(name, mutex) MPIDUI_THREAD_CS_EXIT_##name(mutex) #if defined(MPICH_IS_THREADED) #if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__GLOBAL #define MPIDUI_THREAD_CS_EXIT_GLOBAL(mutex) \ do { \ if (MPIR_ThreadInfo.isThreaded) { \ int rec_err_ = 0; \ MPIR_Per_thread_t *per_thread = NULL; \ \ MPL_DBG_MSG(MPIR_DBG_THREAD, TYPICAL, "recursive unlocking GLOBAL mutex"); \ MPIR_Assert(rec_err_ == 0); \ MPID_THREADPRIV_KEY_GET_ADDR(MPIR_ThreadInfo.isThreaded, MPIR_Per_thread_key, \ MPIR_Per_thread, per_thread, &rec_err_); \ MPIR_Assert(rec_err_ == 0); \ \ if (per_thread->lock_depth == 1) { \ int err_ = 0; \ MPL_DBG_MSG_P(MPIR_DBG_THREAD,VERBOSE,"MPIDU_Thread_mutex_unlock %p", &mutex); \ MPIDU_Thread_mutex_unlock(&mutex, &err_); \ MPIR_Assert(err_ == 0); \ } \ per_thread->lock_depth--; \ } \ } while (0) #define MPIDUI_THREAD_CS_EXIT_POBJ(mutex) do {} while (0) #else /* MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_POBJ */ # 168 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/thread/mpidu_thread_fallback.h" #define MPIDUI_THREAD_CS_EXIT_POBJ(mutex) \ do { \ if (MPIR_ThreadInfo.isThreaded) { \ int err_ = 0; \ MPL_DBG_MSG(MPIR_DBG_THREAD, TYPICAL, "non-recursive unlocking POBJ mutex"); \ MPL_DBG_MSG_P(MPIR_DBG_THREAD,VERBOSE,"MPIDU_Thread_mutex_unlock %p", &mutex); \ MPIDU_Thread_mutex_unlock(&mutex, &err_); \ MPIR_Assert(err_ == 0); \ } \ } while (0) #define MPIDUI_THREAD_CS_EXIT_GLOBAL(mutex) do {} while (0) #endif /* MPICH_THREAD_GRANULARITY */ # 182 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/thread/mpidu_thread_fallback.h" #else /* !defined(MPICH_IS_THREADED) */ # 184 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/thread/mpidu_thread_fallback.h" #define MPIDUI_THREAD_CS_EXIT_GLOBAL(mutex) do {} while (0) #define MPIDUI_THREAD_CS_EXIT_POBJ(mutex) do {} while (0) #endif /* MPICH_IS_THREADED */ # 189 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/thread/mpidu_thread_fallback.h" /*M MPIDU_THREAD_CS_YIELD - Temporarily release a critical section and yield to other threads Input Parameters: + _name - cname of the critical section - _context - A context (typically an object) of the critical section M*/ #define MPIDU_THREAD_CS_YIELD(name, mutex) MPIDUI_THREAD_CS_YIELD_##name(mutex) #if defined(MPICH_IS_THREADED) #if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__GLOBAL #define MPIDUI_THREAD_CS_YIELD_GLOBAL(mutex) \ do { \ if (MPIR_ThreadInfo.isThreaded) { \ int err_ = 0; \ MPL_DBG_MSG(MPIR_DBG_THREAD, TYPICAL, "non-recursive yielding GLOBAL mutex"); \ MPL_DBG_MSG(MPIR_DBG_THREAD,VERBOSE,"enter MPIDU_Thread_yield"); \ MPIDU_Thread_yield(&mutex, &err_); \ MPL_DBG_MSG(MPIR_DBG_THREAD,VERBOSE,"exit MPIDU_Thread_yield"); \ MPIR_Assert(err_ == 0); \ } \ } while (0) #define MPIDUI_THREAD_CS_YIELD_POBJ(mutex) do {} while (0) #else /* MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY_POBJ */ # 219 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/thread/mpidu_thread_fallback.h" #define MPIDUI_THREAD_CS_YIELD_POBJ(mutex) \ do { \ if (MPIR_ThreadInfo.isThreaded) { \ int err_ = 0; \ MPL_DBG_MSG(MPIR_DBG_THREAD, TYPICAL, "non-recursive yielding POBJ mutex"); \ MPIDU_Thread_yield(&mutex, &err_); \ MPIR_Assert(err_ == 0); \ } \ } while (0) #define MPIDUI_THREAD_CS_YIELD_GLOBAL(mutex) do {} while (0) #endif /* MPICH_THREAD_GRANULARITY */ # 232 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/thread/mpidu_thread_fallback.h" #else /* !defined(MPICH_IS_THREADED) */ # 234 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/thread/mpidu_thread_fallback.h" #define MPIDUI_THREAD_CS_YIELD_GLOBAL(mutex) do {} while (0) #define MPIDUI_THREAD_CS_YIELD_POBJ(mutex) do {} while (0) #endif /* MPICH_IS_THREADED */ # 239 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/thread/mpidu_thread_fallback.h" /*@ MPIDU_Thread_create - create a new thread Input Parameters: + func - function to run in new thread - data - data to be passed to thread function Output Parameters: + id - identifier for the new thread - err - location to store the error code; pointer may be NULL; error is zero for success, non-zero if a failure occurred Notes: The thread is created in a detach state, meaning that is may not be waited upon. If another thread needs to wait for this thread to complete, the threads must provide their own synchronization mechanism. @*/ #define MPIDU_Thread_create(func_, data_, id_, err_ptr_) \ do { \ MPL_thread_create(func_, data_, id_, err_ptr_); \ MPIR_Assert(*err_ptr_ == 0); \ } while (0) /*@ MPIDU_Thread_exit - exit from the current thread @*/ #define MPIDU_Thread_exit MPL_thread_exit /*@ MPIDU_Thread_self - get the identifier of the current thread Output Parameter: . id - identifier of current thread @*/ #define MPIDU_Thread_self MPL_thread_self /*@ MPIDU_Thread_same - compare two threads identifiers to see if refer to the same thread Input Parameters: + id1 - first identifier - id2 - second identifier Output Parameter: . same - TRUE if the two threads identifiers refer to the same thread; FALSE otherwise @*/ #define MPIDU_Thread_same MPL_thread_same /*@ MPIDU_Thread_yield - voluntarily relinquish the CPU, giving other threads an opportunity to run @*/ #define MPIDU_Thread_yield(mutex_ptr_, err_ptr_) \ do { \ if (OPA_load_int(&(mutex_ptr_)->num_queued_threads) == 0) \ break; \ MPIDU_Thread_mutex_unlock(mutex_ptr_, err_ptr_); \ MPIR_Assert(*err_ptr_ == 0); \ MPL_thread_yield(); \ MPIDU_Thread_mutex_lock(mutex_ptr_, err_ptr_); \ MPIR_Assert(*err_ptr_ == 0); \ } while (0) /* * Mutexes */ /*@ MPIDU_Thread_mutex_create - create a new mutex Output Parameters: + mutex - mutex - err - error code (non-zero indicates an error has occurred) @*/ #define MPIDU_Thread_mutex_create(mutex_ptr_, err_ptr_) \ do { \ OPA_store_int(&(mutex_ptr_)->num_queued_threads, 0); \ MPL_thread_mutex_create(&(mutex_ptr_)->mutex, err_ptr_); \ MPIR_Assert(*err_ptr_ == 0); \ MPL_DBG_MSG_P(MPIR_DBG_THREAD,TYPICAL,"Created MPL_thread_mutex %p", (mutex_ptr_)); \ } while (0) /*@ MPIDU_Thread_mutex_destroy - destroy an existing mutex Input Parameter: . mutex - mutex Output Parameter: . err - location to store the error code; pointer may be NULL; error is zero for success, non-zero if a failure occurred @*/ #define MPIDU_Thread_mutex_destroy(mutex_ptr_, err_ptr_) \ do { \ MPL_DBG_MSG_P(MPIR_DBG_THREAD,TYPICAL,"About to destroy MPL_thread_mutex %p", (mutex_ptr_)); \ MPL_thread_mutex_destroy(&(mutex_ptr_)->mutex, err_ptr_); \ MPIR_Assert(*err_ptr_ == 0); \ } while (0) /*@ MPIDU_Thread_lock - acquire a mutex Input Parameter: . mutex - mutex @*/ #define MPIDU_Thread_mutex_lock(mutex_ptr_, err_ptr_) \ do { \ OPA_incr_int(&(mutex_ptr_)->num_queued_threads); \ MPL_DBG_MSG_P(MPIR_DBG_THREAD,VERBOSE,"enter MPL_thread_mutex_lock %p", &(mutex_ptr_)->mutex); \ MPL_thread_mutex_lock(&(mutex_ptr_)->mutex, err_ptr_); \ MPIR_Assert(*err_ptr_ == 0); \ MPL_DBG_MSG_P(MPIR_DBG_THREAD,VERBOSE,"exit MPL_thread_mutex_lock %p", &(mutex_ptr_)->mutex); \ OPA_decr_int(&(mutex_ptr_)->num_queued_threads); \ } while (0) /*@ MPIDU_Thread_unlock - release a mutex Input Parameter: . mutex - mutex @*/ #define MPIDU_Thread_mutex_unlock(mutex_ptr_, err_ptr_) \ do { \ MPL_thread_mutex_unlock(&(mutex_ptr_)->mutex, err_ptr_); \ MPIR_Assert(*err_ptr_ == 0); \ } while (0) /* * Condition Variables */ /*@ MPIDU_Thread_cond_create - create a new condition variable Output Parameters: + cond - condition variable - err - location to store the error code; pointer may be NULL; error is zero for success, non-zero if a failure occurred @*/ #define MPIDU_Thread_cond_create(cond_ptr_, err_ptr_) \ do { \ MPL_thread_cond_create(cond_ptr_, err_ptr_); \ MPIR_Assert(*err_ptr_ == 0); \ MPL_DBG_MSG_P(MPIR_DBG_THREAD,TYPICAL,"Created MPL_thread_cond %p", (cond_ptr_)); \ } while (0) /*@ MPIDU_Thread_cond_destroy - destroy an existinga condition variable Input Parameter: . cond - condition variable Output Parameter: . err - location to store the error code; pointer may be NULL; error is zero for success, non-zero if a failure occurred @*/ #define MPIDU_Thread_cond_destroy(cond_ptr_, err_ptr_) \ do { \ MPL_DBG_MSG_P(MPIR_DBG_THREAD,TYPICAL,"About to destroy MPL_thread_cond %p", (cond_ptr_)); \ MPL_thread_cond_destroy(cond_ptr_, err_ptr_); \ MPIR_Assert(*err_ptr_ == 0); \ } while (0) /*@ MPIDU_Thread_cond_wait - wait (block) on a condition variable Input Parameters: + cond - condition variable - mutex - mutex Notes: This function may return even though another thread has not requested that a thread be released. Therefore, the calling program must wrap the function in a while loop that verifies program state has changed in a way that warrants letting the thread proceed. @*/ #define MPIDU_Thread_cond_wait(cond_ptr_, mutex_ptr_, err_ptr_) \ do { \ OPA_incr_int(&(mutex_ptr_)->num_queued_threads); \ MPL_DBG_MSG_FMT(MPIR_DBG_THREAD,TYPICAL,(MPL_DBG_FDEST,"Enter cond_wait on cond=%p mutex=%p",(cond_ptr_),&(mutex_ptr_)->mutex)); \ MPL_thread_cond_wait(cond_ptr_, &(mutex_ptr_)->mutex, err_ptr_); \ MPIR_Assert_fmt_msg(*((int *) err_ptr_) == 0, \ ("cond_wait failed, err=%d (%s)", *((int *) err_ptr_), strerror(*((int *) err_ptr_)))); \ MPL_DBG_MSG_FMT(MPIR_DBG_THREAD,TYPICAL,(MPL_DBG_FDEST,"Exit cond_wait on cond=%p mutex=%p",(cond_ptr_),&(mutex_ptr_)->mutex)); \ OPA_decr_int(&(mutex_ptr_)->num_queued_threads); \ } while (0) /*@ MPIDU_Thread_cond_broadcast - release all threads currently waiting on a condition variable Input Parameter: . cond - condition variable @*/ #define MPIDU_Thread_cond_broadcast(cond_ptr_, err_ptr_) \ do { \ MPL_DBG_MSG_P(MPIR_DBG_THREAD,TYPICAL,"About to cond_broadcast on MPL_thread_cond %p", (cond_ptr_)); \ MPL_thread_cond_broadcast(cond_ptr_, err_ptr_); \ MPIR_Assert_fmt_msg(*((int *) err_ptr_) == 0, \ ("cond_broadcast failed, err=%d (%s)", *((int *) err_ptr_), strerror(*((int *) err_ptr_)))); \ } while (0) /*@ MPIDU_Thread_cond_signal - release one thread currently waitng on a condition variable Input Parameter: . cond - condition variable @*/ #define MPIDU_Thread_cond_signal(cond_ptr_, err_ptr_) \ do { \ MPL_DBG_MSG_P(MPIR_DBG_THREAD,TYPICAL,"About to cond_signal on MPL_thread_cond %p", (cond_ptr_)); \ MPL_thread_cond_signal(cond_ptr_, err_ptr_); \ MPIR_Assert_fmt_msg(*((int *) err_ptr_) == 0, \ ("cond_signal failed, err=%d (%s)", *((int *) err_ptr_), strerror(*((int *) err_ptr_)))); \ } while (0) /* * Thread Local Storage */ /*@ MPIDU_Thread_tls_create - create a thread local storage space Input Parameter: . exit_func - function to be called when the thread exists; may be NULL if a callback is not desired Output Parameters: + tls - new thread local storage space - err - location to store the error code; pointer may be NULL; error is zero for success, non-zero if a failure occurred @*/ #define MPIDU_Thread_tls_create(exit_func_ptr_, tls_ptr_, err_ptr_) \ do { \ MPL_thread_tls_create(exit_func_ptr_, tls_ptr_, err_ptr_); \ MPIR_Assert(*(int *) err_ptr_ == 0); \ } while (0) /*@ MPIDU_Thread_tls_destroy - destroy a thread local storage space Input Parameter: . tls - thread local storage space to be destroyed Output Parameter: . err - location to store the error code; pointer may be NULL; error is zero for success, non-zero if a failure occurred Notes: The destroy function associated with the thread local storage will not called after the space has been destroyed. @*/ #define MPIDU_Thread_tls_destroy(tls_ptr_, err_ptr_) \ do { \ MPL_thread_tls_destroy(tls_ptr_, err_ptr_); \ MPIR_Assert(*(int *) err_ptr_ == 0); \ } while (0) /*@ MPIDU_Thread_tls_set - associate a value with the current thread in the thread local storage space Input Parameters: + tls - thread local storage space - value - value to associate with current thread @*/ #define MPIDU_Thread_tls_set(tls_ptr_, value_, err_ptr_) \ do { \ MPL_thread_tls_set(tls_ptr_, value_, err_ptr_); \ MPIR_Assert_fmt_msg(*((int *) err_ptr_) == 0, \ ("tls_set failed, err=%d (%s)", *((int *) err_ptr_), strerror(*((int *) err_ptr_)))); \ } while (0) /*@ MPIDU_Thread_tls_get - obtain the value associated with the current thread from the thread local storage space Input Parameter: . tls - thread local storage space Output Parameter: . value - value associated with current thread @*/ #define MPIDU_Thread_tls_get(tls_ptr_, value_ptr_, err_ptr_) \ do { \ MPL_thread_tls_get(tls_ptr_, value_ptr_, err_ptr_); \ MPIR_Assert_fmt_msg(*((int *) err_ptr_) == 0, \ ("tls_get failed, err=%d (%s)", *((int *) err_ptr_), strerror(*((int *) err_ptr_)))); \ } while (0) #if defined(MPICH_IS_THREADED) #define MPIDU_THREADPRIV_KEY_CREATE \ do { \ int err_ = 0; \ MPL_THREADPRIV_KEY_CREATE(MPIR_Per_thread_key, MPIR_Per_thread, &err_); \ MPIR_Assert(err_ == 0); \ } while (0) #define MPIDU_THREADPRIV_KEY_GET_ADDR MPL_THREADPRIV_KEY_GET_ADDR #define MPIDU_THREADPRIV_KEY_DESTROY \ do { \ int err_ = 0; \ MPL_THREADPRIV_KEY_DESTROY(MPIR_Per_thread_key, &err_); \ MPIR_Assert(err_ == 0); \ } while (0) #else /* !defined(MPICH_IS_THREADED) */ # 544 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/thread/mpidu_thread_fallback.h" #define MPIDU_THREADPRIV_KEY_CREATE(key, var, err_ptr_) #define MPIDU_THREADPRIV_KEY_GET_ADDR(is_threaded, key, var, addr, err_ptr_) \ MPL_THREADPRIV_KEY_GET_ADDR(0, key, var, addr, err_ptr_) #define MPIDU_THREADPRIV_KEY_DESTROY(key, err_ptr_) #endif /* MPICH_IS_THREADED */ # 550 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/thread/mpidu_thread_fallback.h" #endif /* !defined(MPIDU_THREAD_H_INCLUDED) */ # 551 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/thread/mpidu_thread_fallback.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpid_thread.h" 2 /* We simply use the fallback timer functionality and do not define * our own */ typedef MPIDU_Thread_mutex_t MPID_Thread_mutex_t; typedef MPIDU_Thread_cond_t MPID_Thread_cond_t; typedef MPIDU_Thread_id_t MPID_Thread_id_t; typedef MPIDU_Thread_tls_t MPID_Thread_tls_t; typedef MPIDU_Thread_func_t MPID_Thread_func_t; #define MPID_THREAD_CS_ENTER MPIDU_THREAD_CS_ENTER #define MPID_THREAD_CS_EXIT MPIDU_THREAD_CS_EXIT #define MPID_THREAD_CS_YIELD MPIDU_THREAD_CS_YIELD #define MPID_Thread_create MPIDU_Thread_create #define MPID_Thread_exit MPIDU_Thread_exit #define MPID_Thread_self MPIDU_Thread_self #define MPID_Thread_same MPIDU_Thread_same #define MPID_Thread_same MPIDU_Thread_same #define MPID_Thread_mutex_create MPIDU_Thread_mutex_create #define MPID_Thread_mutex_destroy MPIDU_Thread_mutex_destroy #define MPID_Thread_mutex_lock MPIDU_Thread_mutex_lock #define MPID_Thread_mutex_unlock MPIDU_Thread_mutex_unlock #define MPID_Thread_cond_create MPIDU_Thread_cond_create #define MPID_Thread_cond_destroy MPIDU_Thread_cond_destroy #define MPID_Thread_cond_wait MPIDU_Thread_cond_wait #define MPID_Thread_cond_broadcast MPIDU_Thread_cond_broadcast #define MPID_Thread_cond_signal MPIDU_Thread_cond_signal #define MPID_Thread_tls_create MPIDU_Thread_tls_create #define MPID_Thread_tls_destroy MPIDU_Thread_tls_destroy #define MPID_Thread_tls_set MPIDU_Thread_tls_set #define MPID_Thread_tls_get MPIDU_Thread_tls_get #define MPID_THREADPRIV_KEY_CREATE MPIDU_THREADPRIV_KEY_CREATE #define MPID_THREADPRIV_KEY_GET_ADDR MPIDU_THREADPRIV_KEY_GET_ADDR #define MPID_THREADPRIV_KEY_DESTROY MPIDU_THREADPRIV_KEY_DESTROY #endif /* !defined(MPID_THREAD_H_INCLUDED) */ # 52 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpid_thread.h" # 26 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpid_sched.h" #endif /* expanded by -frewrite-includes */ # 27 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpid_sched.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2015 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPIR_SCHED_H_INCLUDED #define MPIR_SCHED_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpidu_sched.h" #endif /* expanded by -frewrite-includes */ # 9 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpid_sched.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/sched/mpidu_sched.h" 1 /* -*- Mode: c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2011 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPIDU_SCHED_H_INCLUDED #define MPIDU_SCHED_H_INCLUDED //#include "mpidu_pre.h" /* FIXME open questions: * - Should the schedule hold a pointer to the nbc request and the nbc request * hold a pointer to the schedule? This could cause MT issues. */ #if 0 /* expanded by -frewrite-includes */ #include "mpidu_pre.h" #endif /* expanded by -frewrite-includes */ # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/sched/mpidu_sched.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/include/mpidu_pre.h" 1 /* -*- Mode: c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2015by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPIDU_PRE_H_INCLUDED #define MPIDU_PRE_H_INCLUDED /* some common MPI forward declarations */ struct MPIR_Request; struct MPIR_Comm; /* Scheduling forward declarations */ struct MPIDU_Sched; typedef struct MPIDU_Sched *MPIR_Sched_t; typedef int (MPIR_Sched_cb_t) (struct MPIR_Comm * comm, int tag, void *state); typedef int (MPIR_Sched_cb2_t) (struct MPIR_Comm * comm, int tag, void *state, void *state2); #endif # 26 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/include/mpidu_pre.h" # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/sched/mpidu_sched.h" 2 enum MPIDU_Sched_entry_type { MPIDU_SCHED_ENTRY_INVALID_LB = 0, MPIDU_SCHED_ENTRY_SEND, /* _SEND_DEFER is easily implemented via _SEND */ MPIDU_SCHED_ENTRY_RECV, /* _RECV_STATUS is easily implemented via _RECV */ MPIDU_SCHED_ENTRY_REDUCE, MPIDU_SCHED_ENTRY_COPY, MPIDU_SCHED_ENTRY_NOP, MPIDU_SCHED_ENTRY_CB, MPIDU_SCHED_ENTRY_INVALID_UB }; struct MPIDU_Sched_send { const void *buf; MPI_Aint count; const MPI_Aint *count_p; MPI_Datatype datatype; int dest; struct MPIR_Comm *comm; struct MPIR_Request *sreq; int is_sync; /* TRUE iff this send is an ssend */ }; struct MPIDU_Sched_recv { void *buf; MPI_Aint count; MPI_Datatype datatype; int src; struct MPIR_Comm *comm; struct MPIR_Request *rreq; MPI_Status *status; }; struct MPIDU_Sched_reduce { const void *inbuf; void *inoutbuf; MPI_Aint count; MPI_Datatype datatype; MPI_Op op; }; struct MPIDU_Sched_copy { const void *inbuf; MPI_Aint incount; MPI_Datatype intype; void *outbuf; MPI_Aint outcount; MPI_Datatype outtype; }; /* nop entries have no args, so no structure is needed */ enum MPIDU_Sched_cb_type { MPIDU_SCHED_CB_TYPE_1 = 0, /* single state arg type --> MPIR_Sched_cb_t */ MPIDU_SCHED_CB_TYPE_2 /* double state arg type --> MPIR_Sched_cb2_t */ }; struct MPIDU_Sched_cb { enum MPIDU_Sched_cb_type cb_type; union { MPIR_Sched_cb_t *cb_p; MPIR_Sched_cb2_t *cb2_p; } u; void *cb_state; void *cb_state2; /* unused for single-param callbacks */ }; enum MPIDU_Sched_entry_status { MPIDU_SCHED_ENTRY_STATUS_NOT_STARTED = 0, MPIDU_SCHED_ENTRY_STATUS_STARTED, MPIDU_SCHED_ENTRY_STATUS_COMPLETE, MPIDU_SCHED_ENTRY_STATUS_FAILED, /* indicates a failure occurred while executing the entry */ MPIDU_SCHED_ENTRY_STATUS_INVALID /* indicates an invalid entry, or invalid status value */ }; /* Use a tagged union for schedule entries. Not always space optimal, but saves * lots of error-prone pointer arithmetic and makes scanning the schedule easy. */ struct MPIDU_Sched_entry { enum MPIDU_Sched_entry_type type; enum MPIDU_Sched_entry_status status; int is_barrier; union { struct MPIDU_Sched_send send; struct MPIDU_Sched_recv recv; struct MPIDU_Sched_reduce reduce; struct MPIDU_Sched_copy copy; /* nop entries have no args */ struct MPIDU_Sched_cb cb; } u; }; struct MPIDU_Sched { size_t size; /* capacity (in entries) of the entries array */ size_t idx; /* index into entries array of first yet-outstanding entry */ int num_entries; /* number of populated entries, num_entries <= size */ int tag; struct MPIR_Request *req; /* really needed? could cause MT problems... */ struct MPIDU_Sched_entry *entries; struct MPIDU_Sched *next; /* linked-list next pointer */ struct MPIDU_Sched *prev; /* linked-list next pointer */ }; /* prototypes */ int MPIDU_Sched_progress(int *made_progress); int MPIDU_Sched_are_pending(void); int MPIDU_Sched_next_tag(struct MPIR_Comm *comm_ptr, int *tag); int MPIDU_Sched_create(MPIR_Sched_t * sp); int MPIDU_Sched_clone(MPIR_Sched_t orig, MPIR_Sched_t * cloned); int MPIDU_Sched_start(MPIR_Sched_t * sp, struct MPIR_Comm *comm, int tag, struct MPIR_Request **req); int MPIDU_Sched_send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, struct MPIR_Comm *comm, MPIR_Sched_t s); int MPIDU_Sched_recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int src, struct MPIR_Comm *comm, MPIR_Sched_t s); int MPIR_Sched_ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, struct MPIR_Comm *comm, MPIR_Sched_t s); int MPIR_Sched_reduce(const void *inbuf, void *inoutbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Sched_t s); int MPIDU_Sched_copy(const void *inbuf, MPI_Aint incount, MPI_Datatype intype, void *outbuf, MPI_Aint outcount, MPI_Datatype outtype, MPIR_Sched_t s); int MPIDU_Sched_barrier(MPIR_Sched_t s); #endif /* !defined(MPIDU_SCHED_H_INCLUDED) */ # 142 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/sched/mpidu_sched.h" # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpid_sched.h" 2 #define MPIR_Sched_cb MPIDU_Sched_cb #define MPIR_Sched_cb2 MPIDU_Sched_cb2 #define MPIR_Sched_next_tag MPIDU_Sched_next_tag #define MPIR_Sched_create MPIDU_Sched_create #define MPIR_Sched_clone MPIDU_Sched_clone #define MPIR_Sched_start MPIDU_Sched_start #define MPIR_Sched_send MPIDU_Sched_send #define MPIR_Sched_send_defer MPIDU_Sched_send_defer #define MPIR_Sched_recv MPIDU_Sched_recv #define MPIR_Sched_recv_status MPIDU_Sched_recv_status #define MPIR_Sched_ssend MPIDU_Sched_ssend #define MPIR_Sched_reduce MPIDU_Sched_reduce #define MPIR_Sched_copy MPIDU_Sched_copy #define MPIR_Sched_barrier MPIDU_Sched_barrier #endif /* MPIR_SCHED_H_INCLUDED */ # 27 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpid_sched.h" # 28 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" 2 /* We simply use the fallback timer functionality and do not define * our own */ #if 0 /* expanded by -frewrite-includes */ #include "mpid_timers_fallback.h" #endif /* expanded by -frewrite-includes */ # 31 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/timers/mpid_timers_fallback.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPID_TIMERS_FALLBACK_H_INCLUDED) #define MPID_TIMERS_FALLBACK_H_INCLUDED #define MPID_Time_t MPL_time_t #define MPID_Wtime MPL_wtime #define MPID_Wtime_diff MPL_wtime_diff #define MPID_Wtime_acc MPL_wtime_acc #define MPID_Wtime_todouble MPL_wtime_todouble #define MPID_Wtick MPL_wtick #define MPID_Wtime_init MPL_wtime_init #endif /* !defined(MPID_TIMERS_FALLBACK_H_INCLUDED) */ # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/timers/mpid_timers_fallback.h" # 32 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" 2 union MPIDI_CH3_Pkt; struct MPIDI_VC; struct MPIR_Request; /* PktHandler function: vc (INPUT) -- vc on which the packet was received pkt (INPUT) -- pointer to packet header at beginning of receive buffer buflen (I/O) -- IN: number of bytes received into receive buffer OUT: number of bytes processed by the handler function req (OUTPUT) -- NULL, if the whole message has been processed by the handler function, otherwise, pointer to the receive request for this message. The IOV will be set describing where the rest of the message should be received. (This decl needs to come before mpidi_ch3_pre.h) */ typedef int MPIDI_CH3_PktHandler_Fcn(struct MPIDI_VC *vc, union MPIDI_CH3_Pkt *pkt, intptr_t *buflen, struct MPIR_Request **req ); /* Include definitions from the channel which must exist before items in this file (mpidpre.h) or the file it includes (mpiimpl.h) can be defined. */ #if 0 /* expanded by -frewrite-includes */ #include "mpidi_ch3_pre.h" #endif /* expanded by -frewrite-includes */ # 53 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPICH_MPIDI_CH3_PRE_H_INCLUDED) #define MPICH_MPIDI_CH3_PRE_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpid_nem_pre.h" #endif /* expanded by -frewrite-includes */ # 9 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_pre.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2006 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPID_NEM_PRE_H #define MPID_NEM_PRE_H #if 0 /* expanded by -frewrite-includes */ #include "mpid_nem_net_module_defs.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_pre.h" # 1 "./src/mpid/ch3/channels/nemesis/include/mpid_nem_net_module_defs.h" 1 /* -*- Mode: C; c-basic-offset:4 ; -*- */ /* * (C) 2006 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPID_NEM_NET_MODULE_DEFS_H #define MPID_NEM_NET_MODULE_DEFS_H /* Network module defines */ #define MPIDI_NEM_TCP 0 #endif # 15 "./src/mpid/ch3/channels/nemesis/include/mpid_nem_net_module_defs.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_pre.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpid_nem_defs.h" #endif /* expanded by -frewrite-includes */ # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_pre.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_defs.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2006 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPID_NEM_DEFS_H #define MPID_NEM_DEFS_H #if 0 /* expanded by -frewrite-includes */ #include "mpid_nem_datatypes.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_defs.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2006 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPID_NEM_DATATYPES_H #define MPID_NEM_DATATYPES_H #if 0 /* expanded by -frewrite-includes */ #include "mpid_nem_debug.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_debug.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2006 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPID_NEM_DEBUG_H #define MPID_NEM_DEBUG_H /*#define YIELD_IN_SKIP*/ #ifdef YIELD_IN_SKIP #define SKIP MPL_sched_yield() #warning "SKIP is yield" #else /* YIELD_IN_SKIP */ # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_debug.h" #define SKIP do{}while(0) /*#warning "SKIP is do ...while" */ #endif /* YIELD_IN_SKIP */ # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_debug.h" /* debugging message functions */ struct MPID_nem_cell; void MPID_nem_dbg_dump_cell (volatile struct MPID_nem_cell *cell); #endif /* MPID_NEM_DEBUG_H */ # 24 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_debug.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpid_nem_atomics.h" #endif /* expanded by -frewrite-includes */ # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_atomics.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2006 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPID_NEM_ATOMICS_H #define MPID_NEM_ATOMICS_H #if 0 /* expanded by -frewrite-includes */ #include "mpichconf.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_atomics.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_atomics.h" #if 0 /* expanded by -frewrite-includes */ #include "opa_primitives.h" #endif /* expanded by -frewrite-includes */ # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_atomics.h" # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_atomics.h" #endif /* MPID_NEM_ATOMICS_H */ # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_atomics.h" # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" #ifdef HAVE_SYS_MMAN_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/mman.h" 1 3 /* Definitions for BSD-style memory management. Copyright (C) 1994-2000, 2003-2005, 2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_MMAN_H #define _SYS_MMAN_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/mman.h" 3 # 23 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/mman.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 23 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/mman.h" 3 # 24 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/mman.h" 3 #define __need_size_t #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 25 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/mman.h" 3 # 1 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 1 3 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) /* Always define miscellaneous pieces when modules are available. */ #if !__has_feature(modules) #define __STDDEF_H #endif # 37 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 44 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_ptrdiff_t) #if !defined(_PTRDIFF_T) || __has_feature(modules) /* Always define ptrdiff_t when modules are available. */ #if !__has_feature(modules) #define _PTRDIFF_T #endif # 51 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 53 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 55 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_size_t) #if !defined(_SIZE_T) || __has_feature(modules) /* Always define size_t when modules are available. */ #if !__has_feature(modules) #define _SIZE_T #endif # 62 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ size_t; #endif # 64 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_size_t #endif /*defined(__need_size_t) */ # 66 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) /* Always define rsize_t when modules are available. */ #if !__has_feature(modules) #define _RSIZE_T #endif # 76 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ rsize_t; #endif # 78 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif /* defined(__need_STDDEF_H_misc) */ # 79 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_wchar_t) #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if !defined(_WCHAR_T) || __has_feature(modules) #if !__has_feature(modules) #define _WCHAR_T #if defined(_MSC_EXTENSIONS) #define _WCHAR_T_DEFINED #endif # 89 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 90 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WCHAR_TYPE__ wchar_t; #endif # 92 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 93 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 95 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_NULL) #undef NULL #ifdef __cplusplus # if !defined(__MINGW32__) && !defined(_MSC_VER) # define NULL __null # else # 102 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL 0 # endif # 104 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #else # 105 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL ((void*)0) #endif # 107 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #ifdef __cplusplus #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 112 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 113 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_NULL #endif /* defined(__need_NULL) */ # 115 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 118 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 119 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 120 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 123 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if defined(__need_wint_t) /* Always define wint_t when modules are available. */ #if !defined(_WINT_T) || __has_feature(modules) #if !__has_feature(modules) #define _WINT_T #endif # 132 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WINT_TYPE__ wint_t; #endif # 134 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wint_t #endif /* __need_wint_t */ # 136 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 138 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/mman.h" 2 3 #ifndef __off_t_defined # ifndef __USE_FILE_OFFSET64 typedef __off_t off_t; # else # 31 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/mman.h" 3 typedef __off64_t off_t; # endif # 33 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/mman.h" 3 # define __off_t_defined #endif # 35 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/mman.h" 3 #ifndef __mode_t_defined typedef __mode_t mode_t; # define __mode_t_defined #endif # 40 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/mman.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 41 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/mman.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/mman.h" 1 3 /* Definitions for POSIX memory map interface. Linux/PowerPC version. Copyright (C) 1997-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _SYS_MMAN_H # error "Never use directly; iclude instead." #endif # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/mman.h" 3 /* The following definitions basically come from the kernel headers. But the kernel header is not namespace clean. */ /* Protections are chosen from these bits, OR'd together. The implementation does not necessarily support PROT_EXEC or PROT_WRITE without PROT_READ. The only guarantees are that no writing will be allowed without PROT_WRITE and no access will be allowed for PROT_NONE. */ #define PROT_READ 0x1 /* Page can be read. */ #define PROT_WRITE 0x2 /* Page can be written. */ #define PROT_EXEC 0x4 /* Page can be executed. */ #define PROT_NONE 0x0 /* Page can not be accessed. */ #define PROT_SAO 0x10 /* Strong Access Ordering. */ #define PROT_GROWSDOWN 0x01000000 /* Extend change to start of growsdown vma (mprotect only). */ #define PROT_GROWSUP 0x02000000 /* Extend change to start of growsup vma (mprotect only). */ /* Sharing types (must choose one and only one of these). */ #define MAP_SHARED 0x001 /* Share changes. */ #define MAP_PRIVATE 0x002 /* Changes are private. */ #ifdef __USE_MISC # define MAP_TYPE 0x00f /* Mask for type of mapping. */ #endif # 48 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/mman.h" 3 /* Other flags. */ #define MAP_FIXED 0x010 /* Interpret addr exactly. */ #ifdef __USE_MISC # define MAP_FILE 0x000 # define MAP_ANONYMOUS 0x020 /* Don't use a file. */ # define MAP_ANON MAP_ANONYMOUS #endif # 56 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/mman.h" 3 /* These are Linux-specific. */ #ifdef __USE_MISC # define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ # define MAP_DENYWRITE 0x00800 /* ETXTBSY */ # define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */ # define MAP_LOCKED 0x00080 /* Lock the mapping. */ # define MAP_NORESERVE 0x00040 /* Don't check for reservations. */ # define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */ # define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ # define MAP_STACK 0x20000 /* Allocation is for a stack. */ # define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ #endif # 69 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/mman.h" 3 /* Flags to `msync'. */ #define MS_ASYNC 1 /* Sync memory asynchronously. */ #define MS_SYNC 4 /* Synchronous memory sync. */ #define MS_INVALIDATE 2 /* Invalidate the caches. */ /* Flags for `mlockall'. */ #define MCL_CURRENT 0x2000 /* Lock all currently mapped pages. */ #define MCL_FUTURE 0x4000 /* Lock all additions to address space. */ /* Flags for `mremap'. */ #ifdef __USE_GNU # define MREMAP_MAYMOVE 1 # define MREMAP_FIXED 2 #endif # 86 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/mman.h" 3 /* Advice to `madvise'. */ #ifdef __USE_BSD # define MADV_NORMAL 0 /* No further special treatment. */ # define MADV_RANDOM 1 /* Expect random page references. */ # define MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ # define MADV_REMOVE 9 /* Remove these pages and resources. */ # define MADV_DONTFORK 10 /* Do not inherit across fork. */ # define MADV_DOFORK 11 /* Do inherit across fork. */ # define MADV_MERGEABLE 12 /* KSM may merge identical pages. */ # define MADV_UNMERGEABLE 13 /* KSM may not merge identical pages. */ # define MADV_HUGEPAGE 14 /* Worth backing with hugepages. */ # define MADV_NOHUGEPAGE 15 /* Not worth backing with hugepages. */ # define MADV_DONTDUMP 16 /* Explicity exclude from the core dump, overrides the coredump filter bits. */ # define MADV_DODUMP 17 /* Clear the MADV_DONTDUMP flag. */ # define MADV_HWPOISON 100 /* Poison a page for testing. */ #endif # 106 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/mman.h" 3 /* The POSIX people had to invent similar names for the same things. */ #ifdef __USE_XOPEN2K # define POSIX_MADV_NORMAL 0 /* No further special treatment. */ # define POSIX_MADV_RANDOM 1 /* Expect random page references. */ # define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ # define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ #endif # 115 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/mman.h" 3 # 42 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/mman.h" 2 3 /* Return value of `mmap' in case of an error. */ #define MAP_FAILED ((void *) -1) __BEGIN_DECLS /* Map addresses starting near ADDR and extending for LEN bytes. from OFFSET into the file FD describes according to PROT and FLAGS. If ADDR is nonzero, it is the desired mapping address. If the MAP_FIXED bit is set in FLAGS, the mapping will be at ADDR exactly (which must be page-aligned); otherwise the system chooses a convenient nearby address. The return value is the actual mapping address chosen or MAP_FAILED for errors (in which case `errno' is set). A successful `mmap' call deallocates any previous mapping for the affected region. */ #ifndef __USE_FILE_OFFSET64 extern void *mmap (void *__addr, size_t __len, int __prot, int __flags, int __fd, __off_t __offset) __THROW; #else # 60 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/mman.h" 3 # ifdef __REDIRECT_NTH extern void * __REDIRECT_NTH (mmap, (void *__addr, size_t __len, int __prot, int __flags, int __fd, __off64_t __offset), mmap64); # else # 66 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/mman.h" 3 # define mmap mmap64 # endif # 68 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/mman.h" 3 #endif # 69 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/mman.h" 3 #ifdef __USE_LARGEFILE64 extern void *mmap64 (void *__addr, size_t __len, int __prot, int __flags, int __fd, __off64_t __offset) __THROW; #endif # 73 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/mman.h" 3 /* Deallocate any mapping for the region starting at ADDR and extending LEN bytes. Returns 0 if successful, -1 for errors (and sets errno). */ extern int munmap (void *__addr, size_t __len) __THROW; /* Change the memory protection of the region starting at ADDR and extending LEN bytes to PROT. Returns 0 if successful, -1 for errors (and sets errno). */ extern int mprotect (void *__addr, size_t __len, int __prot) __THROW; /* Synchronize the region starting at ADDR and extending LEN bytes with the file it maps. Filesystem operations on a file being mapped are unpredictable before this is done. Flags are from the MS_* set. This function is a cancellation point and therefore not marked with __THROW. */ extern int msync (void *__addr, size_t __len, int __flags); #ifdef __USE_BSD /* Advise the system about particular usage patterns the program follows for the region starting at ADDR and extending LEN bytes. */ extern int madvise (void *__addr, size_t __len, int __advice) __THROW; #endif # 96 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/mman.h" 3 #ifdef __USE_XOPEN2K /* This is the POSIX name for this function. */ extern int posix_madvise (void *__addr, size_t __len, int __advice) __THROW; #endif # 100 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/mman.h" 3 /* Guarantee all whole pages mapped by the range [ADDR,ADDR+LEN) to be memory resident. */ extern int mlock (const void *__addr, size_t __len) __THROW; /* Unlock whole pages previously mapped by the range [ADDR,ADDR+LEN). */ extern int munlock (const void *__addr, size_t __len) __THROW; /* Cause all currently mapped pages of the process to be memory resident until unlocked by a call to the `munlockall', until the process exits, or until the process calls `execve'. */ extern int mlockall (int __flags) __THROW; /* All currently mapped pages of the process' address space become unlocked. */ extern int munlockall (void) __THROW; #ifdef __USE_MISC /* mincore returns the memory residency status of the pages in the current process's address space specified by [start, start + len). The status is returned in a vector of bytes. The least significant bit of each byte is 1 if the referenced page is in memory, otherwise it is zero. */ extern int mincore (void *__start, size_t __len, unsigned char *__vec) __THROW; #endif # 126 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/mman.h" 3 #ifdef __USE_GNU /* Remap pages mapped by the range [ADDR,ADDR+OLD_LEN) to new length NEW_LEN. If MREMAP_MAYMOVE is set in FLAGS the returned address may differ from ADDR. If MREMAP_FIXED is set in FLAGS the function takes another paramter which is a fixed address at which the block resides after a successful call. */ extern void *mremap (void *__addr, size_t __old_len, size_t __new_len, int __flags, ...) __THROW; /* Remap arbitrary pages of a shared backing store within an existing VMA. */ extern int remap_file_pages (void *__start, size_t __size, int __prot, size_t __pgoff, int __flags) __THROW; #endif # 141 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/mman.h" 3 /* Open shared memory segment. */ extern int shm_open (const char *__name, int __oflag, mode_t __mode); /* Remove shared memory segment. */ extern int shm_unlink (const char *__name); __END_DECLS #endif /* sys/mman.h */ # 152 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/mman.h" 3 # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" 2 #endif # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 1 3 /* Copyright (C) 1991, 1992, 1995-2007, 2009, 2010, 2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 5.6 File Characteristics */ #ifndef _SYS_STAT_H #define _SYS_STAT_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #if 0 /* expanded by -frewrite-includes */ #include /* For __mode_t and __dev_t. */ #endif /* expanded by -frewrite-includes */ # 28 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # 29 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #if defined __USE_XOPEN || defined __USE_XOPEN2K || defined __USE_MISC \ || defined __USE_ATFILE # if defined __USE_XOPEN || defined __USE_XOPEN2K # define __need_time_t # endif # 35 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # if defined __USE_MISC || defined __USE_ATFILE # define __need_timespec # endif # 38 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #if 0 /* expanded by -frewrite-includes */ # include /* For time_t resp. timespec. */ #endif /* expanded by -frewrite-includes */ # 38 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # 39 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #endif # 40 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #if defined __USE_XOPEN || defined __USE_XOPEN2K /* The Single Unix specification says that some more types are available here. */ # ifndef __dev_t_defined typedef __dev_t dev_t; # define __dev_t_defined # endif # 48 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # ifndef __gid_t_defined typedef __gid_t gid_t; # define __gid_t_defined # endif # 53 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # ifndef __ino_t_defined # ifndef __USE_FILE_OFFSET64 typedef __ino_t ino_t; # else # 58 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 typedef __ino64_t ino_t; # endif # 60 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # define __ino_t_defined # endif # 62 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # ifndef __mode_t_defined typedef __mode_t mode_t; # define __mode_t_defined # endif # 67 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # ifndef __nlink_t_defined typedef __nlink_t nlink_t; # define __nlink_t_defined # endif # 72 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # ifndef __off_t_defined # ifndef __USE_FILE_OFFSET64 typedef __off_t off_t; # else # 77 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 typedef __off64_t off_t; # endif # 79 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # define __off_t_defined # endif # 81 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # ifndef __uid_t_defined typedef __uid_t uid_t; # define __uid_t_defined # endif # 86 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #endif /* X/Open */ # 87 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #ifdef __USE_UNIX98 # ifndef __blkcnt_t_defined # ifndef __USE_FILE_OFFSET64 typedef __blkcnt_t blkcnt_t; # else # 93 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 typedef __blkcnt64_t blkcnt_t; # endif # 95 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # define __blkcnt_t_defined # endif # 97 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # ifndef __blksize_t_defined typedef __blksize_t blksize_t; # define __blksize_t_defined # endif # 102 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #endif /* Unix98 */ # 103 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 __BEGIN_DECLS #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 106 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 1 3 /* Copyright (C) 1992, 1995-2002, 2009, 2010 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." #endif # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 #ifndef _BITS_STAT_H #define _BITS_STAT_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 1 3 /* Determine the wordsize from the preprocessor defines. */ #if defined __powerpc64__ # define __WORDSIZE 64 # define __WORDSIZE_TIME64_COMPAT32 1 #else # 7 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 # define __WORDSIZE 32 #endif # 9 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 #if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL /* Signal the glibc ABI didn't used to have a `long double'. The changes all the `long double' function variants to be redirects to the double functions. */ # define __LONG_DOUBLE_MATH_OPTIONAL 1 # ifndef __LONG_DOUBLE_128__ # define __NO_LONG_DOUBLE_MATH 1 # endif # 19 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 #endif # 20 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 2 3 /* Versions of the `struct stat' data structure. */ #define _STAT_VER_LINUX_OLD 1 #define _STAT_VER_KERNEL 1 #define _STAT_VER_SVR4 2 #define _STAT_VER_LINUX 3 #if __WORDSIZE == 32 # define _STAT_VER _STAT_VER_LINUX #else # 36 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 # define _STAT_VER _STAT_VER_KERNEL #endif # 38 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 /* Versions of the `xmknod' interface. */ #define _MKNOD_VER_LINUX 1 #define _MKNOD_VER_SVR4 2 #define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ #if __WORDSIZE == 32 struct stat { __dev_t st_dev; /* Device. */ # ifndef __USE_FILE_OFFSET64 unsigned short int __pad1; __ino_t st_ino; /* File serial number. */ # else # 54 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __ino64_t st_ino; /* File serial number. */ # endif # 56 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __mode_t st_mode; /* File mode. */ __nlink_t st_nlink; /* Link count. */ __uid_t st_uid; /* User ID of the file's owner. */ __gid_t st_gid; /* Group ID of the file's group.*/ __dev_t st_rdev; /* Device number, if device. */ unsigned short int __pad2; # ifndef __USE_FILE_OFFSET64 __off_t st_size; /* Size of file, in bytes. */ # else # 65 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __off64_t st_size; /* Size of file, in bytes. */ # endif # 67 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __blksize_t st_blksize; /* Optimal block size for I/O. */ # ifndef __USE_FILE_OFFSET64 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ # else # 72 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ # endif # 74 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 # if defined __USE_MISC || defined __USE_XOPEN2K8 /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the identifier 'timespec' to appear in the header. Therefore we have to handle the use of this header in strictly standard-compliant sources special. */ struct timespec st_atim; /* Time of last access. */ struct timespec st_mtim; /* Time of last modification. */ struct timespec st_ctim; /* Time of last status change. */ # define st_atime st_atim.tv_sec /* Backward compatibility. */ # define st_mtime st_mtim.tv_sec # define st_ctime st_ctim.tv_sec # else # 88 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __time_t st_atime; /* Time of last access. */ unsigned long int st_atimensec; /* Nscecs of last access. */ __time_t st_mtime; /* Time of last modification. */ unsigned long int st_mtimensec; /* Nsecs of last modification. */ __time_t st_ctime; /* Time of last status change. */ unsigned long int st_ctimensec; /* Nsecs of last status change. */ # endif # 95 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 unsigned long int __unused4; unsigned long int __unused5; }; # ifdef __USE_LARGEFILE64 struct stat64 { __dev_t st_dev; /* Device. */ __ino64_t st_ino; /* File serial number. */ __mode_t st_mode; /* File mode. */ __nlink_t st_nlink; /* Link count. */ __uid_t st_uid; /* User ID of the file's owner. */ __gid_t st_gid; /* Group ID of the file's group.*/ __dev_t st_rdev; /* Device number, if device. */ unsigned short int __pad2; __off64_t st_size; /* Size of file, in bytes. */ __blksize_t st_blksize; /* Optimal block size for I/O. */ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ # if defined __USE_MISC || defined __USE_XOPEN2K8 /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the identifier 'timespec' to appear in the header. Therefore we have to handle the use of this header in strictly standard-compliant sources special. */ struct timespec st_atim; /* Time of last access. */ struct timespec st_mtim; /* Time of last modification. */ struct timespec st_ctim; /* Time of last status change. */ # define st_atime st_atim.tv_sec /* Backward compatibility. */ # define st_mtime st_mtim.tv_sec # define st_ctime st_ctim.tv_sec # else # 128 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __time_t st_atime; /* Time of last access. */ unsigned long int st_atimensec; /* Nscecs of last access. */ __time_t st_mtime; /* Time of last modification. */ unsigned long int st_mtimensec; /* Nsecs of last modification. */ __time_t st_ctime; /* Time of last status change. */ unsigned long int st_ctimensec; /* Nsecs of last status change. */ # endif # 135 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 unsigned long int __unused4; unsigned long int __unused5; }; # endif /* __USE_LARGEFILE64 */ # 139 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 #else /* __WORDSIZE == 32 */ # 141 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 struct stat { __dev_t st_dev; /* Device. */ # ifndef __USE_FILE_OFFSET64 __ino_t st_ino; /* File serial number. */ # else # 148 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __ino64_t st_ino; /* File serial number. */ # endif # 150 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __nlink_t st_nlink; /* Link count. */ __mode_t st_mode; /* File mode. */ __uid_t st_uid; /* User ID of the file's owner. */ __gid_t st_gid; /* Group ID of the file's group.*/ int __pad2; __dev_t st_rdev; /* Device number, if device. */ # ifndef __USE_FILE_OFFSET64 __off_t st_size; /* Size of file, in bytes. */ # else # 159 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __off64_t st_size; /* Size of file, in bytes. */ # endif # 161 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __blksize_t st_blksize; /* Optimal block size for I/O. */ # ifndef __USE_FILE_OFFSET64 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ # else # 166 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ # endif # 168 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 # if defined __USE_MISC || defined __USE_XOPEN2K8 /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the identifier 'timespec' to appear in the header. Therefore we have to handle the use of this header in strictly standard-compliant sources special. */ struct timespec st_atim; /* Time of last access. */ struct timespec st_mtim; /* Time of last modification. */ struct timespec st_ctim; /* Time of last status change. */ # define st_atime st_atim.tv_sec /* Backward compatibility. */ # define st_mtime st_mtim.tv_sec # define st_ctime st_ctim.tv_sec # else # 182 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __time_t st_atime; /* Time of last access. */ unsigned long int st_atimensec; /* Nscecs of last access. */ __time_t st_mtime; /* Time of last modification. */ unsigned long int st_mtimensec; /* Nsecs of last modification. */ __time_t st_ctime; /* Time of last status change. */ unsigned long int st_ctimensec; /* Nsecs of last status change. */ # endif # 189 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 unsigned long int __unused4; unsigned long int __unused5; unsigned long int __unused6; }; # ifdef __USE_LARGEFILE64 struct stat64 { __dev_t st_dev; /* Device. */ __ino64_t st_ino; /* File serial number. */ __nlink_t st_nlink; /* Link count. */ __mode_t st_mode; /* File mode. */ __uid_t st_uid; /* User ID of the file's owner. */ __gid_t st_gid; /* Group ID of the file's group.*/ int __pad2; __dev_t st_rdev; /* Device number, if device. */ __off64_t st_size; /* Size of file, in bytes. */ __blksize_t st_blksize; /* Optimal block size for I/O. */ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ # if defined __USE_MISC || defined __USE_XOPEN2K8 /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the identifier 'timespec' to appear in the header. Therefore we have to handle the use of this header in strictly standard-compliant sources special. */ struct timespec st_atim; /* Time of last access. */ struct timespec st_mtim; /* Time of last modification. */ struct timespec st_ctim; /* Time of last status change. */ # define st_atime st_atim.tv_sec /* Backward compatibility. */ # define st_mtime st_mtim.tv_sec # define st_ctime st_ctim.tv_sec # else # 222 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __time_t st_atime; /* Time of last access. */ unsigned long int st_atimensec; /* Nscecs of last access. */ __time_t st_mtime; /* Time of last modification. */ unsigned long int st_mtimensec; /* Nsecs of last modification. */ __time_t st_ctime; /* Time of last status change. */ unsigned long int st_ctimensec; /* Nsecs of last status change. */ # endif # 229 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 unsigned long int __unused4; unsigned long int __unused5; unsigned long int __unused6; }; # endif /* __USE_LARGEFILE64 */ # 234 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 #endif # 235 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 /* Tell code we have these members. */ #define _STATBUF_ST_BLKSIZE #define _STATBUF_ST_RDEV /* Nanosecond resolution time values are supported. */ #define _STATBUF_ST_NSEC /* Encoding of the file mode. */ #define __S_IFMT 0170000 /* These bits determine file type. */ /* File types. */ #define __S_IFDIR 0040000 /* Directory. */ #define __S_IFCHR 0020000 /* Character device. */ #define __S_IFBLK 0060000 /* Block device. */ #define __S_IFREG 0100000 /* Regular file. */ #define __S_IFIFO 0010000 /* FIFO. */ #define __S_IFLNK 0120000 /* Symbolic link. */ #define __S_IFSOCK 0140000 /* Socket. */ /* POSIX.1b objects. Note that these macros always evaluate to zero. But they do it by enforcing the correct use of the macros. */ #define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) #define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) #define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) /* Protection bits. */ #define __S_ISUID 04000 /* Set user ID on execution. */ #define __S_ISGID 02000 /* Set group ID on execution. */ #define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ #define __S_IREAD 0400 /* Read by owner. */ #define __S_IWRITE 0200 /* Write by owner. */ #define __S_IEXEC 0100 /* Execute by owner. */ #ifdef __USE_ATFILE # define UTIME_NOW ((1l << 30) - 1l) # define UTIME_OMIT ((1l << 30) - 2l) #endif # 275 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 #endif /* bits/stat.h */ # 277 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 # 107 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 2 3 #if defined __USE_BSD || defined __USE_MISC || defined __USE_XOPEN # define S_IFMT __S_IFMT # define S_IFDIR __S_IFDIR # define S_IFCHR __S_IFCHR # define S_IFBLK __S_IFBLK # define S_IFREG __S_IFREG # ifdef __S_IFIFO # define S_IFIFO __S_IFIFO # endif # 117 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # ifdef __S_IFLNK # define S_IFLNK __S_IFLNK # endif # 120 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # if (defined __USE_BSD || defined __USE_MISC || defined __USE_UNIX98) \ && defined __S_IFSOCK # define S_IFSOCK __S_IFSOCK # endif # 124 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #endif # 125 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 /* Test macros for file types. */ #define __S_ISTYPE(mode, mask) (((mode) & __S_IFMT) == (mask)) #define S_ISDIR(mode) __S_ISTYPE((mode), __S_IFDIR) #define S_ISCHR(mode) __S_ISTYPE((mode), __S_IFCHR) #define S_ISBLK(mode) __S_ISTYPE((mode), __S_IFBLK) #define S_ISREG(mode) __S_ISTYPE((mode), __S_IFREG) #ifdef __S_IFIFO # define S_ISFIFO(mode) __S_ISTYPE((mode), __S_IFIFO) #endif # 137 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #ifdef __S_IFLNK # define S_ISLNK(mode) __S_ISTYPE((mode), __S_IFLNK) #endif # 140 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #if defined __USE_BSD && !defined __S_IFLNK # define S_ISLNK(mode) 0 #endif # 144 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #if (defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K) \ && defined __S_IFSOCK # define S_ISSOCK(mode) __S_ISTYPE((mode), __S_IFSOCK) #elif defined __USE_XOPEN2K # 149 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # define S_ISSOCK(mode) 0 #endif # 151 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 /* These are from POSIX.1b. If the objects are not implemented using separate distinct file types, the macros always will evaluate to zero. Unlike the other S_* macros the following three take a pointer to a `struct stat' object as the argument. */ #ifdef __USE_POSIX199309 # define S_TYPEISMQ(buf) __S_TYPEISMQ(buf) # define S_TYPEISSEM(buf) __S_TYPEISSEM(buf) # define S_TYPEISSHM(buf) __S_TYPEISSHM(buf) #endif # 161 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 /* Protection bits. */ #define S_ISUID __S_ISUID /* Set user ID on execution. */ #define S_ISGID __S_ISGID /* Set group ID on execution. */ #if defined __USE_BSD || defined __USE_MISC || defined __USE_XOPEN /* Save swapped text after use (sticky bit). This is pretty well obsolete. */ # define S_ISVTX __S_ISVTX #endif # 172 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #define S_IRUSR __S_IREAD /* Read by owner. */ #define S_IWUSR __S_IWRITE /* Write by owner. */ #define S_IXUSR __S_IEXEC /* Execute by owner. */ /* Read, write, and execute by owner. */ #define S_IRWXU (__S_IREAD|__S_IWRITE|__S_IEXEC) #if defined __USE_MISC && defined __USE_BSD # define S_IREAD S_IRUSR # define S_IWRITE S_IWUSR # define S_IEXEC S_IXUSR #endif # 184 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #define S_IRGRP (S_IRUSR >> 3) /* Read by group. */ #define S_IWGRP (S_IWUSR >> 3) /* Write by group. */ #define S_IXGRP (S_IXUSR >> 3) /* Execute by group. */ /* Read, write, and execute by group. */ #define S_IRWXG (S_IRWXU >> 3) #define S_IROTH (S_IRGRP >> 3) /* Read by others. */ #define S_IWOTH (S_IWGRP >> 3) /* Write by others. */ #define S_IXOTH (S_IXGRP >> 3) /* Execute by others. */ /* Read, write, and execute by others. */ #define S_IRWXO (S_IRWXG >> 3) #ifdef __USE_BSD /* Macros for common mode bit masks. */ # define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */ # define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */ # define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/ # define S_BLKSIZE 512 /* Block size for `st_blocks'. */ #endif # 206 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #ifndef __USE_FILE_OFFSET64 /* Get file attributes for FILE and put them in BUF. */ extern int stat (const char *__restrict __file, struct stat *__restrict __buf) __THROW __nonnull ((1, 2)); /* Get file attributes for the file, device, pipe, or socket that file descriptor FD is open on and put them in BUF. */ extern int fstat (int __fd, struct stat *__buf) __THROW __nonnull ((2)); #else # 217 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (stat, (const char *__restrict __file, struct stat *__restrict __buf), stat64) __nonnull ((1, 2)); extern int __REDIRECT_NTH (fstat, (int __fd, struct stat *__buf), fstat64) __nonnull ((2)); # else # 224 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # define stat stat64 # define fstat fstat64 # endif # 227 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #endif # 228 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #ifdef __USE_LARGEFILE64 extern int stat64 (const char *__restrict __file, struct stat64 *__restrict __buf) __THROW __nonnull ((1, 2)); extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2)); #endif # 233 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #ifdef __USE_ATFILE /* Similar to stat, get the attributes for FILE and put them in BUF. Relative path names are interpreted relative to FD unless FD is AT_FDCWD. */ # ifndef __USE_FILE_OFFSET64 extern int fstatat (int __fd, const char *__restrict __file, struct stat *__restrict __buf, int __flag) __THROW __nonnull ((2, 3)); # else # 243 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file, struct stat *__restrict __buf, int __flag), fstatat64) __nonnull ((2, 3)); # else # 249 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # define fstatat fstatat64 # endif # 251 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # endif # 252 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # ifdef __USE_LARGEFILE64 extern int fstatat64 (int __fd, const char *__restrict __file, struct stat64 *__restrict __buf, int __flag) __THROW __nonnull ((2, 3)); # endif # 258 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #endif # 259 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K # ifndef __USE_FILE_OFFSET64 /* Get file attributes about FILE and put them in BUF. If FILE is a symbolic link, do not follow it. */ extern int lstat (const char *__restrict __file, struct stat *__restrict __buf) __THROW __nonnull ((1, 2)); # else # 267 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (lstat, (const char *__restrict __file, struct stat *__restrict __buf), lstat64) __nonnull ((1, 2)); # else # 273 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # define lstat lstat64 # endif # 275 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # endif # 276 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # ifdef __USE_LARGEFILE64 extern int lstat64 (const char *__restrict __file, struct stat64 *__restrict __buf) __THROW __nonnull ((1, 2)); # endif # 281 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #endif # 282 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 /* Set file access permissions for FILE to MODE. If FILE is a symbolic link, this affects its target instead. */ extern int chmod (const char *__file, __mode_t __mode) __THROW __nonnull ((1)); #ifdef __USE_BSD /* Set file access permissions for FILE to MODE. If FILE is a symbolic link, this affects the link itself rather than its target. */ extern int lchmod (const char *__file, __mode_t __mode) __THROW __nonnull ((1)); #endif # 295 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 /* Set file access permissions of the file FD is open on to MODE. */ #if defined __USE_BSD || defined __USE_POSIX extern int fchmod (int __fd, __mode_t __mode) __THROW; #endif # 300 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #ifdef __USE_ATFILE /* Set file access permissions of FILE relative to the directory FD is open on. */ extern int fchmodat (int __fd, const char *__file, __mode_t __mode, int __flag) __THROW __nonnull ((2)) __wur; #endif /* Use ATFILE. */ # 308 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 /* Set the file creation mask of the current process to MASK, and return the old creation mask. */ extern __mode_t umask (__mode_t __mask) __THROW; #ifdef __USE_GNU /* Get the current `umask' value without changing it. This function is only available under the GNU Hurd. */ extern __mode_t getumask (void) __THROW; #endif # 320 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 /* Create a new directory named PATH, with permission bits MODE. */ extern int mkdir (const char *__path, __mode_t __mode) __THROW __nonnull ((1)); #ifdef __USE_ATFILE /* Like mkdir, create a new directory with permission bits MODE. But interpret relative PATH names relative to the directory associated with FD. */ extern int mkdirat (int __fd, const char *__path, __mode_t __mode) __THROW __nonnull ((2)); #endif # 332 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 /* Create a device file named PATH, with permission and special bits MODE and device number DEV (which can be constructed from major and minor device numbers with the `makedev' macro above). */ #if defined __USE_MISC || defined __USE_BSD || defined __USE_XOPEN_EXTENDED extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev) __THROW __nonnull ((1)); # ifdef __USE_ATFILE /* Like mknod, create a new device file with permission bits MODE and device number DEV. But interpret relative PATH names relative to the directory associated with FD. */ extern int mknodat (int __fd, const char *__path, __mode_t __mode, __dev_t __dev) __THROW __nonnull ((2)); # endif # 347 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #endif # 348 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 /* Create a new FIFO named PATH, with permission bits MODE. */ extern int mkfifo (const char *__path, __mode_t __mode) __THROW __nonnull ((1)); #ifdef __USE_ATFILE /* Like mkfifo, create a new FIFO with permission bits MODE. But interpret relative PATH names relative to the directory associated with FD. */ extern int mkfifoat (int __fd, const char *__path, __mode_t __mode) __THROW __nonnull ((2)); #endif # 361 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #ifdef __USE_ATFILE /* Set file access and modification times relative to directory file descriptor. */ extern int utimensat (int __fd, const char *__path, const struct timespec __times[2], int __flags) __THROW __nonnull ((2)); #endif # 370 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #ifdef __USE_XOPEN2K8 /* Set file access and modification times of the file associated with FD. */ extern int futimens (int __fd, const struct timespec __times[2]) __THROW; #endif # 375 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 /* To allow the `struct stat' structure and the file type `mode_t' bits to vary without changing shared library major version number, the `stat' family of functions and `mknod' are in fact inline wrappers around calls to `xstat', `fxstat', `lxstat', and `xmknod', which all take a leading version-number argument designating the data structure and bits used. defines _STAT_VER with the version number corresponding to `struct stat' as defined in that file; and _MKNOD_VER with the version number corresponding to the S_IF* macros defined therein. It is arranged that when not inlined these function are always statically linked; that way a dynamically-linked executable always encodes the version number corresponding to the data structures it uses, so the `x' functions in the shared library can adapt without needing to recompile all callers. */ #ifndef _STAT_VER # define _STAT_VER 0 #endif # 394 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #ifndef _MKNOD_VER # define _MKNOD_VER 0 #endif # 397 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 /* Wrappers for stat and mknod system calls. */ #ifndef __USE_FILE_OFFSET64 extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf) __THROW __nonnull ((3)); extern int __xstat (int __ver, const char *__filename, struct stat *__stat_buf) __THROW __nonnull ((2, 3)); extern int __lxstat (int __ver, const char *__filename, struct stat *__stat_buf) __THROW __nonnull ((2, 3)); extern int __fxstatat (int __ver, int __fildes, const char *__filename, struct stat *__stat_buf, int __flag) __THROW __nonnull ((3, 4)); #else # 410 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (__fxstat, (int __ver, int __fildes, struct stat *__stat_buf), __fxstat64) __nonnull ((3)); extern int __REDIRECT_NTH (__xstat, (int __ver, const char *__filename, struct stat *__stat_buf), __xstat64) __nonnull ((2, 3)); extern int __REDIRECT_NTH (__lxstat, (int __ver, const char *__filename, struct stat *__stat_buf), __lxstat64) __nonnull ((2, 3)); extern int __REDIRECT_NTH (__fxstatat, (int __ver, int __fildes, const char *__filename, struct stat *__stat_buf, int __flag), __fxstatat64) __nonnull ((3, 4)); # else # 426 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # define __fxstat __fxstat64 # define __xstat __xstat64 # define __lxstat __lxstat64 # endif # 430 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #endif # 431 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #ifdef __USE_LARGEFILE64 extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf) __THROW __nonnull ((3)); extern int __xstat64 (int __ver, const char *__filename, struct stat64 *__stat_buf) __THROW __nonnull ((2, 3)); extern int __lxstat64 (int __ver, const char *__filename, struct stat64 *__stat_buf) __THROW __nonnull ((2, 3)); extern int __fxstatat64 (int __ver, int __fildes, const char *__filename, struct stat64 *__stat_buf, int __flag) __THROW __nonnull ((3, 4)); #endif # 443 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 extern int __xmknod (int __ver, const char *__path, __mode_t __mode, __dev_t *__dev) __THROW __nonnull ((2, 4)); extern int __xmknodat (int __ver, int __fd, const char *__path, __mode_t __mode, __dev_t *__dev) __THROW __nonnull ((3, 5)); #if defined __GNUC__ && __GNUC__ >= 2 && defined __USE_EXTERN_INLINES /* Inlined versions of the real stat and mknod functions. */ __extern_inline int __NTH (stat (const char *__path, struct stat *__statbuf)) { return __xstat (_STAT_VER, __path, __statbuf); } # if defined __USE_BSD || defined __USE_XOPEN_EXTENDED __extern_inline int __NTH (lstat (const char *__path, struct stat *__statbuf)) { return __lxstat (_STAT_VER, __path, __statbuf); } # endif # 466 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 __extern_inline int __NTH (fstat (int __fd, struct stat *__statbuf)) { return __fxstat (_STAT_VER, __fd, __statbuf); } # ifdef __USE_ATFILE __extern_inline int __NTH (fstatat (int __fd, const char *__filename, struct stat *__statbuf, int __flag)) { return __fxstatat (_STAT_VER, __fd, __filename, __statbuf, __flag); } # endif # 481 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # if defined __USE_MISC || defined __USE_BSD __extern_inline int __NTH (mknod (const char *__path, __mode_t __mode, __dev_t __dev)) { return __xmknod (_MKNOD_VER, __path, __mode, &__dev); } # endif # 489 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # ifdef __USE_ATFILE __extern_inline int __NTH (mknodat (int __fd, const char *__path, __mode_t __mode, __dev_t __dev)) { return __xmknodat (_MKNOD_VER, __fd, __path, __mode, &__dev); } # endif # 498 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # if defined __USE_LARGEFILE64 \ && (! defined __USE_FILE_OFFSET64 \ || (defined __REDIRECT_NTH && defined __OPTIMIZE__)) __extern_inline int __NTH (stat64 (const char *__path, struct stat64 *__statbuf)) { return __xstat64 (_STAT_VER, __path, __statbuf); } # if defined __USE_BSD || defined __USE_XOPEN_EXTENDED __extern_inline int __NTH (lstat64 (const char *__path, struct stat64 *__statbuf)) { return __lxstat64 (_STAT_VER, __path, __statbuf); } # endif # 515 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 __extern_inline int __NTH (fstat64 (int __fd, struct stat64 *__statbuf)) { return __fxstat64 (_STAT_VER, __fd, __statbuf); } # ifdef __USE_ATFILE __extern_inline int __NTH (fstatat64 (int __fd, const char *__filename, struct stat64 *__statbuf, int __flag)) { return __fxstatat64 (_STAT_VER, __fd, __filename, __statbuf, __flag); } # endif # 530 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # endif # 532 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 #endif # 534 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 __END_DECLS #endif /* sys/stat.h */ # 539 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/sys/stat.h" 3 # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" 2 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 1 3 /* Copyright (C) 1991-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * POSIX Standard: 6.5 File Control Operations */ #ifndef _FCNTL_H #define _FCNTL_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 25 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 /* This must be early so can define types winningly. */ __BEGIN_DECLS /* Get __mode_t, __dev_t and __off_t .*/ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 31 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # 32 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 /* Get the definitions of O_*, F_*, FD_*: all the numbers and flag bits for `open', `fcntl', et al. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl.h" 1 3 /* O_*, F_*, FD_* bit values for Linux/PowerPC. Copyright (C) 1995-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _FCNTL_H # error "Never use directly; include instead." #endif # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl.h" 3 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 23 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 1 3 /* Determine the wordsize from the preprocessor defines. */ #if defined __powerpc64__ # define __WORDSIZE 64 # define __WORDSIZE_TIME64_COMPAT32 1 #else # 7 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 # define __WORDSIZE 32 #endif # 9 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 #if !defined __NO_LONG_DOUBLE_MATH && !defined __LONG_DOUBLE_MATH_OPTIONAL /* Signal the glibc ABI didn't used to have a `long double'. The changes all the `long double' function variants to be redirects to the double functions. */ # define __LONG_DOUBLE_MATH_OPTIONAL 1 # ifndef __LONG_DOUBLE_128__ # define __NO_LONG_DOUBLE_MATH 1 # endif # 19 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 #endif # 20 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/wordsize.h" 3 # 24 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl.h" 2 3 #define __O_DIRECTORY 040000 /* Must be a directory. */ #define __O_NOFOLLOW 0100000 /* Do not follow links. */ #define __O_DIRECT 0400000 /* Direct disk access. */ #if __WORDSIZE == 64 /* Not necessary, files are always with 64bit off_t. */ # define __O_LARGEFILE 0 #else # 33 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl.h" 3 # define __O_LARGEFILE 0200000 #endif # 35 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl.h" 3 struct flock { short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ #ifndef __USE_FILE_OFFSET64 __off_t l_start; /* Offset where the lock begins. */ __off_t l_len; /* Size of the locked area; zero means until EOF. */ #else # 44 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl.h" 3 __off64_t l_start; /* Offset where the lock begins. */ __off64_t l_len; /* Size of the locked area; zero means until EOF. */ #endif # 47 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl.h" 3 __pid_t l_pid; /* Process holding the lock. */ }; #ifdef __USE_LARGEFILE64 struct flock64 { short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */ __off64_t l_start; /* Offset where the lock begins. */ __off64_t l_len; /* Size of the locked area; zero means until EOF. */ __pid_t l_pid; /* Process holding the lock. */ }; #endif # 60 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl.h" 3 /* Include generic Linux declarations. */ #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 62 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 1 3 /* O_*, F_*, FD_* bit values for Linux. Copyright (C) 2001-2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #ifndef _FCNTL_H # error "Never use directly; include instead." #endif # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 /* This file contains shared definitions between Linux architectures and is included by to declare them. The various #ifndef cases allow the architecture specific file to define those values with different values. A minimal contains just: struct flock {...} #ifdef __USE_LARGEFILE64 struct flock64 {...} #endif #include */ #ifdef __USE_GNU #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 38 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 # 39 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #endif # 40 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 /* open/fcntl. */ #define O_ACCMODE 0003 #define O_RDONLY 00 #define O_WRONLY 01 #define O_RDWR 02 #ifndef O_CREAT # define O_CREAT 0100 /* Not fcntl. */ #endif # 49 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifndef O_EXCL # define O_EXCL 0200 /* Not fcntl. */ #endif # 52 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifndef O_NOCTTY # define O_NOCTTY 0400 /* Not fcntl. */ #endif # 55 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifndef O_TRUNC # define O_TRUNC 01000 /* Not fcntl. */ #endif # 58 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifndef O_APPEND # define O_APPEND 02000 #endif # 61 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifndef O_NONBLOCK # define O_NONBLOCK 04000 #endif # 64 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifndef O_NDELAY # define O_NDELAY O_NONBLOCK #endif # 67 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifndef O_SYNC # define O_SYNC 04010000 #endif # 70 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #define O_FSYNC O_SYNC #ifndef O_ASYNC # define O_ASYNC 020000 #endif # 74 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifndef __O_LARGEFILE # define __O_LARGEFILE 0100000 #endif # 77 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifndef __O_DIRECTORY # define __O_DIRECTORY 0200000 #endif # 81 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifndef __O_NOFOLLOW # define __O_NOFOLLOW 0400000 #endif # 84 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifndef __O_CLOEXEC # define __O_CLOEXEC 02000000 #endif # 87 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifndef __O_DIRECT # define __O_DIRECT 040000 #endif # 90 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifndef __O_NOATIME # define __O_NOATIME 01000000 #endif # 93 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifndef __O_PATH # define __O_PATH 010000000 #endif # 96 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifndef __O_DSYNC # define __O_DSYNC 010000 #endif # 99 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifndef F_GETLK # ifndef __USE_FILE_OFFSET64 # define F_GETLK 5 /* Get record locking info. */ # define F_SETLK 6 /* Set record locking info (non-blocking). */ # define F_SETLKW 7 /* Set record locking info (blocking). */ # else # 106 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 # define F_GETLK F_GETLK64 /* Get record locking info. */ # define F_SETLK F_SETLK64 /* Set record locking info (non-blocking).*/ # define F_SETLKW F_SETLKW64 /* Set record locking info (blocking). */ # endif # 110 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #endif # 111 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifndef F_GETLK64 # define F_GETLK64 12 /* Get record locking info. */ # define F_SETLK64 13 /* Set record locking info (non-blocking). */ # define F_SETLKW64 14 /* Set record locking info (blocking). */ #endif # 116 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifdef __USE_LARGEFILE64 # define O_LARGEFILE __O_LARGEFILE #endif # 120 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifdef __USE_XOPEN2K8 # define O_DIRECTORY __O_DIRECTORY /* Must be a directory. */ # define O_NOFOLLOW __O_NOFOLLOW /* Do not follow links. */ # define O_CLOEXEC __O_CLOEXEC /* Set close_on_exec. */ #endif # 126 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifdef __USE_GNU # define O_DIRECT __O_DIRECT /* Direct disk access. */ # define O_NOATIME __O_NOATIME /* Do not set atime. */ # define O_PATH __O_PATH /* Resolve pathname but do not open file. */ #endif # 132 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 /* For now, Linux has no separate synchronicitiy options for read operations. We define O_RSYNC therefore as the same as O_SYNC since this is a superset. */ #if defined __USE_POSIX199309 || defined __USE_UNIX98 # define O_DSYNC __O_DSYNC /* Synchronize data. */ # if defined __O_RSYNC # define O_RSYNC __O_RSYNC /* Synchronize read operations. */ # else # 141 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 # define O_RSYNC O_SYNC /* Synchronize read operations. */ # endif # 143 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #endif # 144 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 /* Values for the second argument to `fcntl'. */ #define F_DUPFD 0 /* Duplicate file descriptor. */ #define F_GETFD 1 /* Get file descriptor flags. */ #define F_SETFD 2 /* Set file descriptor flags. */ #define F_GETFL 3 /* Get file status flags. */ #define F_SETFL 4 /* Set file status flags. */ #ifndef __F_SETOWN # define __F_SETOWN 8 # define __F_GETOWN 9 #endif # 156 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #if defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K8 # define F_SETOWN __F_SETOWN /* Get owner (process receiving SIGIO). */ # define F_GETOWN __F_GETOWN /* Set owner (process receiving SIGIO). */ #endif # 161 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifndef __F_SETSIG # define __F_SETSIG 10 /* Set number of signal to be sent. */ # define __F_GETSIG 11 /* Get number of signal to be sent. */ #endif # 166 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifndef __F_SETOWN_EX # define __F_SETOWN_EX 15 /* Get owner (thread receiving SIGIO). */ # define __F_GETOWN_EX 16 /* Set owner (thread receiving SIGIO). */ #endif # 170 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifdef __USE_GNU # define F_SETSIG __F_SETSIG /* Set number of signal to be sent. */ # define F_GETSIG __F_GETSIG /* Get number of signal to be sent. */ # define F_SETOWN_EX __F_SETOWN_EX /* Get owner (thread receiving SIGIO). */ # define F_GETOWN_EX __F_GETOWN_EX /* Set owner (thread receiving SIGIO). */ #endif # 177 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifdef __USE_GNU # define F_SETLEASE 1024 /* Set a lease. */ # define F_GETLEASE 1025 /* Enquire what lease is active. */ # define F_NOTIFY 1026 /* Request notifications on a directory. */ # define F_SETPIPE_SZ 1031 /* Set pipe page size array. */ # define F_GETPIPE_SZ 1032 /* Set pipe page size array. */ #endif # 185 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifdef __USE_XOPEN2K8 # define F_DUPFD_CLOEXEC 1030 /* Duplicate file descriptor with close-on-exit set. */ #endif # 189 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 /* For F_[GET|SET]FD. */ #define FD_CLOEXEC 1 /* Actually anything with low bit set goes */ #ifndef F_RDLCK /* For posix fcntl() and `l_type' field of a `struct flock' for lockf(). */ # define F_RDLCK 0 /* Read lock. */ # define F_WRLCK 1 /* Write lock. */ # define F_UNLCK 2 /* Remove lock. */ #endif # 199 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 /* For old implementation of BSD flock. */ #ifndef F_EXLCK # define F_EXLCK 4 /* or 3 */ # define F_SHLCK 8 /* or 4 */ #endif # 206 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifdef __USE_BSD /* Operations for BSD flock, also used by the kernel implementation. */ # define LOCK_SH 1 /* Shared lock. */ # define LOCK_EX 2 /* Exclusive lock. */ # define LOCK_NB 4 /* Or'd with one of the above to prevent blocking. */ # define LOCK_UN 8 /* Remove lock. */ #endif # 215 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifdef __USE_GNU # define LOCK_MAND 32 /* This is a mandatory flock: */ # define LOCK_READ 64 /* ... which allows concurrent read operations. */ # define LOCK_WRITE 128 /* ... which allows concurrent write operations. */ # define LOCK_RW 192 /* ... Which allows concurrent read & write operations. */ #endif # 222 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifdef __USE_GNU /* Types of directory notifications that may be requested with F_NOTIFY. */ # define DN_ACCESS 0x00000001 /* File accessed. */ # define DN_MODIFY 0x00000002 /* File modified. */ # define DN_CREATE 0x00000004 /* File created. */ # define DN_DELETE 0x00000008 /* File removed. */ # define DN_RENAME 0x00000010 /* File renamed. */ # define DN_ATTRIB 0x00000020 /* File changed attributes. */ # define DN_MULTISHOT 0x80000000 /* Don't remove notifier. */ #endif # 233 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifdef __USE_GNU /* Owner types. */ enum __pid_type { F_OWNER_TID = 0, /* Kernel thread. */ F_OWNER_PID, /* Process. */ F_OWNER_PGRP, /* Process group. */ F_OWNER_GID = F_OWNER_PGRP /* Alternative, obsolete name. */ }; /* Structure to use with F_GETOWN_EX and F_SETOWN_EX. */ struct f_owner_ex { enum __pid_type type; /* Owner type of ID. */ __pid_t pid; /* ID of owner. */ }; #endif # 252 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 /* Define some more compatibility macros to be backward compatible with BSD systems which did not managed to hide these kernel macros. */ #ifdef __USE_BSD # define FAPPEND O_APPEND # define FFSYNC O_FSYNC # define FASYNC O_ASYNC # define FNONBLOCK O_NONBLOCK # define FNDELAY O_NDELAY #endif /* Use BSD. */ # 262 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifndef __POSIX_FADV_DONTNEED # define __POSIX_FADV_DONTNEED 4 # define __POSIX_FADV_NOREUSE 5 #endif # 267 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 /* Advise to `posix_fadvise'. */ #ifdef __USE_XOPEN2K # define POSIX_FADV_NORMAL 0 /* No further special treatment. */ # define POSIX_FADV_RANDOM 1 /* Expect random page references. */ # define POSIX_FADV_SEQUENTIAL 2 /* Expect sequential page references. */ # define POSIX_FADV_WILLNEED 3 /* Will need these pages. */ # define POSIX_FADV_DONTNEED __POSIX_FADV_DONTNEED /* Don't need these pages. */ # define POSIX_FADV_NOREUSE __POSIX_FADV_NOREUSE /* Data will be accessed once. */ #endif # 276 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 #ifdef __USE_GNU /* Flags for SYNC_FILE_RANGE. */ # define SYNC_FILE_RANGE_WAIT_BEFORE 1 /* Wait upon writeout of all pages in the range before performing the write. */ # define SYNC_FILE_RANGE_WRITE 2 /* Initiate writeout of all those dirty pages in the range which are not presently under writeback. */ # define SYNC_FILE_RANGE_WAIT_AFTER 4 /* Wait upon writeout of all pages in the range after performing the write. */ /* Flags for SPLICE and VMSPLICE. */ # define SPLICE_F_MOVE 1 /* Move pages instead of copying. */ # define SPLICE_F_NONBLOCK 2 /* Don't block on the pipe splicing (but we may still block on the fd we splice from/to). */ # define SPLICE_F_MORE 4 /* Expect more data. */ # define SPLICE_F_GIFT 8 /* Pages passed in are a gift. */ /* File handle structure. */ struct file_handle { unsigned int handle_bytes; int handle_type; /* File identifier. */ unsigned char f_handle[0]; }; /* Maximum handle size (for now). */ # define MAX_HANDLE_SZ 128 #endif # 311 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 __BEGIN_DECLS #ifdef __USE_GNU /* Provide kernel hint to read ahead. */ extern ssize_t readahead (int __fd, __off64_t __offset, size_t __count) __THROW; /* Selective file content synch'ing. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count, unsigned int __flags); /* Splice address range into a pipe. This function is a possible cancellation point and therefore not marked with __THROW. */ extern ssize_t vmsplice (int __fdout, const struct iovec *__iov, size_t __count, unsigned int __flags); /* Splice two files together. This function is a possible cancellation point and therefore not marked with __THROW. */ extern ssize_t splice (int __fdin, __off64_t *__offin, int __fdout, __off64_t *__offout, size_t __len, unsigned int __flags); /* In-kernel implementation of tee for pipe buffers. This function is a possible cancellation point and therefore not marked with __THROW. */ extern ssize_t tee (int __fdin, int __fdout, size_t __len, unsigned int __flags); /* Reserve storage for the data of the file associated with FD. This function is a possible cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len); # else # 358 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 # ifdef __REDIRECT extern int __REDIRECT (fallocate, (int __fd, int __mode, __off64_t __offset, __off64_t __len), fallocate64); # else # 363 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 # define fallocate fallocate64 # endif # 365 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 # endif # 366 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 # ifdef __USE_LARGEFILE64 extern int fallocate64 (int __fd, int __mode, __off64_t __offset, __off64_t __len); # endif # 370 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 /* Map file name to file handle. */ extern int name_to_handle_at (int __dfd, const char *__name, struct file_handle *__handle, int *__mnt_id, int __flags) __THROW; /* Open file using the file handle. This function is a possible cancellation point and therefore not marked with __THROW. */ extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle, int __flags); #endif /* use GNU */ # 385 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl-linux.h" 3 __END_DECLS # 63 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/fcntl.h" 2 3 # 36 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 2 3 /* POSIX.1-2001 specifies that these types are defined by . Earlier POSIX standards permitted any type ending in `_t' to be defined by any POSIX header, so we don't conditionalize the definitions here. */ #ifndef __mode_t_defined typedef __mode_t mode_t; # define __mode_t_defined #endif # 44 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 #ifndef __off_t_defined # ifndef __USE_FILE_OFFSET64 typedef __off_t off_t; # else # 49 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 typedef __off64_t off_t; # endif # 51 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # define __off_t_defined #endif # 53 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 #if defined __USE_LARGEFILE64 && !defined __off64_t_defined typedef __off64_t off64_t; # define __off64_t_defined #endif # 58 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 #ifndef __pid_t_defined typedef __pid_t pid_t; # define __pid_t_defined #endif # 63 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 /* For XPG all symbols from should also be available. */ #if defined __USE_XOPEN || defined __USE_XOPEN2K8 # define __need_timespec #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 67 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # 68 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 68 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 1 3 /* Copyright (C) 1992, 1995-2002, 2009, 2010 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ #if !defined _SYS_STAT_H && !defined _FCNTL_H # error "Never include directly; use instead." #endif # 22 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 #ifndef _BITS_STAT_H #define _BITS_STAT_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 /* Versions of the `struct stat' data structure. */ #define _STAT_VER_LINUX_OLD 1 #define _STAT_VER_KERNEL 1 #define _STAT_VER_SVR4 2 #define _STAT_VER_LINUX 3 #if __WORDSIZE == 32 # define _STAT_VER _STAT_VER_LINUX #else # 36 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 # define _STAT_VER _STAT_VER_KERNEL #endif # 38 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 /* Versions of the `xmknod' interface. */ #define _MKNOD_VER_LINUX 1 #define _MKNOD_VER_SVR4 2 #define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ #if __WORDSIZE == 32 struct stat { __dev_t st_dev; /* Device. */ # ifndef __USE_FILE_OFFSET64 unsigned short int __pad1; __ino_t st_ino; /* File serial number. */ # else # 54 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __ino64_t st_ino; /* File serial number. */ # endif # 56 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __mode_t st_mode; /* File mode. */ __nlink_t st_nlink; /* Link count. */ __uid_t st_uid; /* User ID of the file's owner. */ __gid_t st_gid; /* Group ID of the file's group.*/ __dev_t st_rdev; /* Device number, if device. */ unsigned short int __pad2; # ifndef __USE_FILE_OFFSET64 __off_t st_size; /* Size of file, in bytes. */ # else # 65 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __off64_t st_size; /* Size of file, in bytes. */ # endif # 67 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __blksize_t st_blksize; /* Optimal block size for I/O. */ # ifndef __USE_FILE_OFFSET64 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ # else # 72 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ # endif # 74 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 # if defined __USE_MISC || defined __USE_XOPEN2K8 /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the identifier 'timespec' to appear in the header. Therefore we have to handle the use of this header in strictly standard-compliant sources special. */ struct timespec st_atim; /* Time of last access. */ struct timespec st_mtim; /* Time of last modification. */ struct timespec st_ctim; /* Time of last status change. */ # define st_atime st_atim.tv_sec /* Backward compatibility. */ # define st_mtime st_mtim.tv_sec # define st_ctime st_ctim.tv_sec # else # 88 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __time_t st_atime; /* Time of last access. */ unsigned long int st_atimensec; /* Nscecs of last access. */ __time_t st_mtime; /* Time of last modification. */ unsigned long int st_mtimensec; /* Nsecs of last modification. */ __time_t st_ctime; /* Time of last status change. */ unsigned long int st_ctimensec; /* Nsecs of last status change. */ # endif # 95 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 unsigned long int __unused4; unsigned long int __unused5; }; # ifdef __USE_LARGEFILE64 struct stat64 { __dev_t st_dev; /* Device. */ __ino64_t st_ino; /* File serial number. */ __mode_t st_mode; /* File mode. */ __nlink_t st_nlink; /* Link count. */ __uid_t st_uid; /* User ID of the file's owner. */ __gid_t st_gid; /* Group ID of the file's group.*/ __dev_t st_rdev; /* Device number, if device. */ unsigned short int __pad2; __off64_t st_size; /* Size of file, in bytes. */ __blksize_t st_blksize; /* Optimal block size for I/O. */ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ # if defined __USE_MISC || defined __USE_XOPEN2K8 /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the identifier 'timespec' to appear in the header. Therefore we have to handle the use of this header in strictly standard-compliant sources special. */ struct timespec st_atim; /* Time of last access. */ struct timespec st_mtim; /* Time of last modification. */ struct timespec st_ctim; /* Time of last status change. */ # define st_atime st_atim.tv_sec /* Backward compatibility. */ # define st_mtime st_mtim.tv_sec # define st_ctime st_ctim.tv_sec # else # 128 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __time_t st_atime; /* Time of last access. */ unsigned long int st_atimensec; /* Nscecs of last access. */ __time_t st_mtime; /* Time of last modification. */ unsigned long int st_mtimensec; /* Nsecs of last modification. */ __time_t st_ctime; /* Time of last status change. */ unsigned long int st_ctimensec; /* Nsecs of last status change. */ # endif # 135 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 unsigned long int __unused4; unsigned long int __unused5; }; # endif /* __USE_LARGEFILE64 */ # 139 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 #else /* __WORDSIZE == 32 */ # 141 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 struct stat { __dev_t st_dev; /* Device. */ # ifndef __USE_FILE_OFFSET64 __ino_t st_ino; /* File serial number. */ # else # 148 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __ino64_t st_ino; /* File serial number. */ # endif # 150 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __nlink_t st_nlink; /* Link count. */ __mode_t st_mode; /* File mode. */ __uid_t st_uid; /* User ID of the file's owner. */ __gid_t st_gid; /* Group ID of the file's group.*/ int __pad2; __dev_t st_rdev; /* Device number, if device. */ # ifndef __USE_FILE_OFFSET64 __off_t st_size; /* Size of file, in bytes. */ # else # 159 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __off64_t st_size; /* Size of file, in bytes. */ # endif # 161 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __blksize_t st_blksize; /* Optimal block size for I/O. */ # ifndef __USE_FILE_OFFSET64 __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */ # else # 166 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ # endif # 168 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 # if defined __USE_MISC || defined __USE_XOPEN2K8 /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the identifier 'timespec' to appear in the header. Therefore we have to handle the use of this header in strictly standard-compliant sources special. */ struct timespec st_atim; /* Time of last access. */ struct timespec st_mtim; /* Time of last modification. */ struct timespec st_ctim; /* Time of last status change. */ # define st_atime st_atim.tv_sec /* Backward compatibility. */ # define st_mtime st_mtim.tv_sec # define st_ctime st_ctim.tv_sec # else # 182 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __time_t st_atime; /* Time of last access. */ unsigned long int st_atimensec; /* Nscecs of last access. */ __time_t st_mtime; /* Time of last modification. */ unsigned long int st_mtimensec; /* Nsecs of last modification. */ __time_t st_ctime; /* Time of last status change. */ unsigned long int st_ctimensec; /* Nsecs of last status change. */ # endif # 189 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 unsigned long int __unused4; unsigned long int __unused5; unsigned long int __unused6; }; # ifdef __USE_LARGEFILE64 struct stat64 { __dev_t st_dev; /* Device. */ __ino64_t st_ino; /* File serial number. */ __nlink_t st_nlink; /* Link count. */ __mode_t st_mode; /* File mode. */ __uid_t st_uid; /* User ID of the file's owner. */ __gid_t st_gid; /* Group ID of the file's group.*/ int __pad2; __dev_t st_rdev; /* Device number, if device. */ __off64_t st_size; /* Size of file, in bytes. */ __blksize_t st_blksize; /* Optimal block size for I/O. */ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ # if defined __USE_MISC || defined __USE_XOPEN2K8 /* Nanosecond resolution timestamps are stored in a format equivalent to 'struct timespec'. This is the type used whenever possible but the Unix namespace rules do not allow the identifier 'timespec' to appear in the header. Therefore we have to handle the use of this header in strictly standard-compliant sources special. */ struct timespec st_atim; /* Time of last access. */ struct timespec st_mtim; /* Time of last modification. */ struct timespec st_ctim; /* Time of last status change. */ # define st_atime st_atim.tv_sec /* Backward compatibility. */ # define st_mtime st_mtim.tv_sec # define st_ctime st_ctim.tv_sec # else # 222 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 __time_t st_atime; /* Time of last access. */ unsigned long int st_atimensec; /* Nscecs of last access. */ __time_t st_mtime; /* Time of last modification. */ unsigned long int st_mtimensec; /* Nsecs of last modification. */ __time_t st_ctime; /* Time of last status change. */ unsigned long int st_ctimensec; /* Nsecs of last status change. */ # endif # 229 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 unsigned long int __unused4; unsigned long int __unused5; unsigned long int __unused6; }; # endif /* __USE_LARGEFILE64 */ # 234 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 #endif # 235 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 /* Tell code we have these members. */ #define _STATBUF_ST_BLKSIZE #define _STATBUF_ST_RDEV /* Nanosecond resolution time values are supported. */ #define _STATBUF_ST_NSEC /* Encoding of the file mode. */ #define __S_IFMT 0170000 /* These bits determine file type. */ /* File types. */ #define __S_IFDIR 0040000 /* Directory. */ #define __S_IFCHR 0020000 /* Character device. */ #define __S_IFBLK 0060000 /* Block device. */ #define __S_IFREG 0100000 /* Regular file. */ #define __S_IFIFO 0010000 /* FIFO. */ #define __S_IFLNK 0120000 /* Symbolic link. */ #define __S_IFSOCK 0140000 /* Socket. */ /* POSIX.1b objects. Note that these macros always evaluate to zero. But they do it by enforcing the correct use of the macros. */ #define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode) #define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode) #define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode) /* Protection bits. */ #define __S_ISUID 04000 /* Set user ID on execution. */ #define __S_ISGID 02000 /* Set group ID on execution. */ #define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ #define __S_IREAD 0400 /* Read by owner. */ #define __S_IWRITE 0200 /* Write by owner. */ #define __S_IEXEC 0100 /* Execute by owner. */ #ifdef __USE_ATFILE # define UTIME_NOW ((1l << 30) - 1l) # define UTIME_OMIT ((1l << 30) - 2l) #endif # 275 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 #endif /* bits/stat.h */ # 277 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/bits/stat.h" 3 # 69 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 2 3 # define S_IFMT __S_IFMT # define S_IFDIR __S_IFDIR # define S_IFCHR __S_IFCHR # define S_IFBLK __S_IFBLK # define S_IFREG __S_IFREG # ifdef __S_IFIFO # define S_IFIFO __S_IFIFO # endif # 78 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # ifdef __S_IFLNK # define S_IFLNK __S_IFLNK # endif # 81 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # if (defined __USE_UNIX98 || defined __USE_XOPEN2K8) && defined __S_IFSOCK # define S_IFSOCK __S_IFSOCK # endif # 84 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 /* Protection bits. */ # define S_ISUID __S_ISUID /* Set user ID on execution. */ # define S_ISGID __S_ISGID /* Set group ID on execution. */ # if defined __USE_BSD || defined __USE_MISC || defined __USE_XOPEN /* Save swapped text after use (sticky bit). This is pretty well obsolete. */ # define S_ISVTX __S_ISVTX # endif # 94 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # define S_IRUSR __S_IREAD /* Read by owner. */ # define S_IWUSR __S_IWRITE /* Write by owner. */ # define S_IXUSR __S_IEXEC /* Execute by owner. */ /* Read, write, and execute by owner. */ # define S_IRWXU (__S_IREAD|__S_IWRITE|__S_IEXEC) # define S_IRGRP (S_IRUSR >> 3) /* Read by group. */ # define S_IWGRP (S_IWUSR >> 3) /* Write by group. */ # define S_IXGRP (S_IXUSR >> 3) /* Execute by group. */ /* Read, write, and execute by group. */ # define S_IRWXG (S_IRWXU >> 3) # define S_IROTH (S_IRGRP >> 3) /* Read by others. */ # define S_IWOTH (S_IWGRP >> 3) /* Write by others. */ # define S_IXOTH (S_IXGRP >> 3) /* Execute by others. */ /* Read, write, and execute by others. */ # define S_IRWXO (S_IRWXG >> 3) #endif # 113 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 #ifdef __USE_MISC # ifndef R_OK /* Verbatim from . Ugh. */ /* Values for the second argument to access. These may be OR'd together. */ # define R_OK 4 /* Test for read permission. */ # define W_OK 2 /* Test for write permission. */ # define X_OK 1 /* Test for execute permission. */ # define F_OK 0 /* Test for existence. */ # endif # 123 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 #endif /* Use misc. */ # 124 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 /* XPG wants the following symbols. has the same definitions. */ #if defined __USE_XOPEN || defined __USE_XOPEN2K8 # define SEEK_SET 0 /* Seek from beginning of file. */ # define SEEK_CUR 1 /* Seek from current position. */ # define SEEK_END 2 /* Seek from end of file. */ #endif /* XPG */ # 131 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 #ifdef __USE_ATFILE # define AT_FDCWD -100 /* Special value used to indicate the *at functions should use the current working directory. */ # define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */ # define AT_REMOVEDIR 0x200 /* Remove directory instead of unlinking file. */ # define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */ # ifdef __USE_GNU # define AT_NO_AUTOMOUNT 0x800 /* Suppress terminal automount traversal. */ # define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname. */ # endif # 145 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # define AT_EACCESS 0x200 /* Test access permitted for effective IDs, not real IDs. */ #endif # 148 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 /* Do the file control operation described by CMD on FD. The remaining arguments are interpreted depending on CMD. This function is a cancellation point and therefore not marked with __THROW. */ extern int fcntl (int __fd, int __cmd, ...); /* Open FILE and return a new file descriptor for it, or -1 on error. OFLAG determines the type of access used. If O_CREAT is on OFLAG, the third argument is taken as a `mode_t', the mode of the created file. This function is a cancellation point and therefore not marked with __THROW. */ #ifndef __USE_FILE_OFFSET64 extern int open (const char *__file, int __oflag, ...) __nonnull ((1)); #else # 165 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # ifdef __REDIRECT extern int __REDIRECT (open, (const char *__file, int __oflag, ...), open64) __nonnull ((1)); # else # 169 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # define open open64 # endif # 171 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 #endif # 172 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 #ifdef __USE_LARGEFILE64 extern int open64 (const char *__file, int __oflag, ...) __nonnull ((1)); #endif # 175 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 #ifdef __USE_ATFILE /* Similar to `open' but a relative path name is interpreted relative to the directory for which FD is a descriptor. NOTE: some other `openat' implementation support additional functionality through this interface, especially using the O_XATTR flag. This is not yet supported here. This function is a cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int openat (int __fd, const char *__file, int __oflag, ...) __nonnull ((2)); # else # 190 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # ifdef __REDIRECT extern int __REDIRECT (openat, (int __fd, const char *__file, int __oflag, ...), openat64) __nonnull ((2)); # else # 194 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # define openat openat64 # endif # 196 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # endif # 197 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # ifdef __USE_LARGEFILE64 extern int openat64 (int __fd, const char *__file, int __oflag, ...) __nonnull ((2)); # endif # 201 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 #endif # 202 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 /* Create and open FILE, with mode MODE. This takes an `int' MODE argument because that is what `mode_t' will be widened to. This function is a cancellation point and therefore not marked with __THROW. */ #ifndef __USE_FILE_OFFSET64 extern int creat (const char *__file, mode_t __mode) __nonnull ((1)); #else # 211 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # ifdef __REDIRECT extern int __REDIRECT (creat, (const char *__file, mode_t __mode), creat64) __nonnull ((1)); # else # 215 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # define creat creat64 # endif # 217 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 #endif # 218 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 #ifdef __USE_LARGEFILE64 extern int creat64 (const char *__file, mode_t __mode) __nonnull ((1)); #endif # 221 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 #if !defined F_LOCK && (defined __USE_MISC || (defined __USE_XOPEN_EXTENDED \ && !defined __USE_POSIX)) /* NOTE: These declarations also appear in ; be sure to keep both files consistent. Some systems have them there and some here, and some software depends on the macros being defined without including both. */ /* `lockf' is a simpler interface to the locking facilities of `fcntl'. LEN is always relative to the current file position. The CMD argument is one of the following. */ # define F_ULOCK 0 /* Unlock a previously locked region. */ # define F_LOCK 1 /* Lock a region for exclusive use. */ # define F_TLOCK 2 /* Test and lock a region for exclusive use. */ # define F_TEST 3 /* Test a region for other processes locks. */ # ifndef __USE_FILE_OFFSET64 extern int lockf (int __fd, int __cmd, off_t __len); # else # 240 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # ifdef __REDIRECT extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len), lockf64); # else # 243 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # define lockf lockf64 # endif # 245 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # endif # 246 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # ifdef __USE_LARGEFILE64 extern int lockf64 (int __fd, int __cmd, off64_t __len); # endif # 249 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 #endif # 250 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 #ifdef __USE_XOPEN2K /* Advice the system about the expected behaviour of the application with respect to the file associated with FD. */ # ifndef __USE_FILE_OFFSET64 extern int posix_fadvise (int __fd, off_t __offset, off_t __len, int __advise) __THROW; # else # 258 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (posix_fadvise, (int __fd, __off64_t __offset, __off64_t __len, int __advise), posix_fadvise64); # else # 263 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # define posix_fadvise posix_fadvise64 # endif # 265 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # endif # 266 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # ifdef __USE_LARGEFILE64 extern int posix_fadvise64 (int __fd, off64_t __offset, off64_t __len, int __advise) __THROW; # endif # 270 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 /* Reserve storage for the data of the file associated with FD. This function is a possible cancellation point and therefore not marked with __THROW. */ # ifndef __USE_FILE_OFFSET64 extern int posix_fallocate (int __fd, off_t __offset, off_t __len); # else # 279 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # ifdef __REDIRECT extern int __REDIRECT (posix_fallocate, (int __fd, __off64_t __offset, __off64_t __len), posix_fallocate64); # else # 284 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # define posix_fallocate posix_fallocate64 # endif # 286 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # endif # 287 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # ifdef __USE_LARGEFILE64 extern int posix_fallocate64 (int __fd, off64_t __offset, off64_t __len); # endif # 290 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 #endif # 291 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 /* Define some inlines helping to catch common problems. */ #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function \ && defined __va_arg_pack_len #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 296 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # 297 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 #endif # 298 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 __END_DECLS #endif /* fcntl.h */ # 302 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/fcntl.h" 3 # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" 2 #ifdef HAVE_UNISTD_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 22 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" # 23 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" #endif # 24 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 24 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 1 3 /* Copyright (C) 1991, 1992, 1996, 1997, 1998, 1999, 2000, 2005 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.10/5.2.4.2.1 Sizes of integer types */ #ifndef _LIBC_LIMITS_H_ #define _LIBC_LIMITS_H_ 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 26 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 27 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 /* Maximum length of any multibyte character in any locale. We define this value here since the gcc header does not define the correct value. */ #define MB_LEN_MAX 16 /* If we are not using GNU CC we have to define all the symbols ourself. Otherwise use gcc's definitions (see below). */ #if !defined __GNUC__ || __GNUC__ < 2 /* We only protect from multiple inclusion here, because all the other #include's protect themselves, and in GCC 2 we may #include_next through multiple copies of this file before we get to GCC's. */ # ifndef _LIMITS_H # define _LIMITS_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 45 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 46 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 /* We don't have #include_next. Define ANSI for standard 32-bit words. */ /* These assume 8-bit `char's, 16-bit `short int's, and 32-bit `int's and `long int's. */ /* Number of bits in a `char'. */ # define CHAR_BIT 8 /* Minimum and maximum values a `signed char' can hold. */ # define SCHAR_MIN (-128) # define SCHAR_MAX 127 /* Maximum value an `unsigned char' can hold. (Minimum is 0.) */ # define UCHAR_MAX 255 /* Minimum and maximum values a `char' can hold. */ # ifdef __CHAR_UNSIGNED__ # define CHAR_MIN 0 # define CHAR_MAX UCHAR_MAX # else # 68 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # define CHAR_MIN SCHAR_MIN # define CHAR_MAX SCHAR_MAX # endif # 71 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 /* Minimum and maximum values a `signed short int' can hold. */ # define SHRT_MIN (-32768) # define SHRT_MAX 32767 /* Maximum value an `unsigned short int' can hold. (Minimum is 0.) */ # define USHRT_MAX 65535 /* Minimum and maximum values a `signed int' can hold. */ # define INT_MIN (-INT_MAX - 1) # define INT_MAX 2147483647 /* Maximum value an `unsigned int' can hold. (Minimum is 0.) */ # define UINT_MAX 4294967295U /* Minimum and maximum values a `signed long int' can hold. */ # if __WORDSIZE == 64 # define LONG_MAX 9223372036854775807L # else # 90 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # define LONG_MAX 2147483647L # endif # 92 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # define LONG_MIN (-LONG_MAX - 1L) /* Maximum value an `unsigned long int' can hold. (Minimum is 0.) */ # if __WORDSIZE == 64 # define ULONG_MAX 18446744073709551615UL # else # 98 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # define ULONG_MAX 4294967295UL # endif # 100 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # ifdef __USE_ISOC99 /* Minimum and maximum values a `signed long long int' can hold. */ # define LLONG_MAX 9223372036854775807LL # define LLONG_MIN (-LLONG_MAX - 1LL) /* Maximum value an `unsigned long long int' can hold. (Minimum is 0.) */ # define ULLONG_MAX 18446744073709551615ULL # endif /* ISO C99 */ # 111 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # endif /* limits.h */ # 113 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif /* GCC 2. */ # 114 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif /* !_LIBC_LIMITS_H_ */ # 116 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 /* Get the compiler's limits.h, which defines almost all the ISO constants. We put this #include_next outside the double inclusion check because it should be possible to include this file more than once and still get the definitions from gcc's header. */ #if defined __GNUC__ && !defined _GCC_LIMITS_H_ /* `_GCC_LIMITS_H_' is what GCC's file defines. */ #if 0 /* expanded by -frewrite-includes */ # include_next #endif /* expanded by -frewrite-includes */ # 124 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 125 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif # 126 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 /* The files in some gcc versions don't define LLONG_MIN, LLONG_MAX, and ULLONG_MAX. Instead only the values gcc defined for ages are available. */ #if defined __USE_ISOC99 && defined __GNUC__ # ifndef LLONG_MIN # define LLONG_MIN (-LLONG_MAX-1) # endif # 134 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # ifndef LLONG_MAX # define LLONG_MAX __LONG_LONG_MAX__ # endif # 137 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # ifndef ULLONG_MAX # define ULLONG_MAX (LLONG_MAX * 2ULL + 1) # endif # 140 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif # 141 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #ifdef __USE_POSIX /* POSIX adds things to . */ #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 144 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 145 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif # 146 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #ifdef __USE_POSIX2 #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 148 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 149 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif # 150 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #ifdef __USE_XOPEN #if 0 /* expanded by -frewrite-includes */ # include #endif /* expanded by -frewrite-includes */ # 152 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 153 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 #endif # 154 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/limits.h" 3 # 26 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" 2 #ifdef HAVE_SCHED_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 27 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" # 28 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" #endif # 29 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" #if 0 /* expanded by -frewrite-includes */ #include "mpichconf.h" #endif /* expanded by -frewrite-includes */ # 29 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" # 30 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" /* FIXME We are using this as an interprocess lock in the queue code, although it's not strictly guaranteed to work for this scenario. These should really use the "process locks" code, but it's in such terrible shape that it doesn't really work for us right now. Also, because it has some inline assembly it's not really a fair comparison for studying the impact of atomic instructions. [goodell@ 2009-01-16] */ #if !defined(MPID_NEM_USE_LOCK_FREE_QUEUES) #if 0 /* expanded by -frewrite-includes */ #include "mpid_thread.h" #endif /* expanded by -frewrite-includes */ # 39 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" # 40 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" #endif # 41 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" #define MPID_NEM_OFFSETOF(struc, field) ((int)(&((struc *)0)->field)) #define MPID_NEM_CACHE_LINE_LEN 64 #define MPID_NEM_NUM_CELLS 64 #define MPID_NEM_CELL_LEN (64*1024) /* The layout of the cell looks like this: --CELL------------------ | next | | padding | | --MPICH PKT-------- | | | packet headers | | | | packet payload | | | | . | | | | . | | | | . | | | | | | | -------------------- | ------------------------ For optimization, we want the cell to start at a cacheline boundary and the cell length to be a multiple of cacheline size. This will avoid false sharing. We also want payload to start at an 8-byte boundary to to optimize memcpys and dataloop operations on the payload. To ensure payload is 8-byte aligned, we add padding after the next pointer so the packet starts at the 8-byte boundary. Forgive the misnomers of the macros. MPID_NEM_CELL_LEN size of the whole cell (currently 64K) MPID_NEM_CELL_HEAD_LEN is the size of the next pointer plus the padding. MPID_NEM_CELL_PAYLOAD_LEN is the maximum length of the packet. This is MPID_NEM_CELL_LEN minus the size of the next pointer and any padding. MPID_NEM_MPICH_HEAD_LEN is the length of the mpich packet header fields. MPID_NEM_MPICH_DATA_LEN is the maximum length of the mpich packet payload and is basically what's left after the next pointer, padding and packet header. This is MPID_NEM_CELL_PAYLOAD_LEN - MPID_NEM_MPICH_HEAD_LEN. MPID_NEM_CALC_CELL_LEN is the amount of data plus headers in the cell. I.e., how much of a cell would need to be sent over a network. FIXME: Simplify this maddness! Maybe something like this: typedef struct mpich_pkt { header_field1; header_field2; payload[1]; } mpich_pkt_t; typedef struct cell { *next; padding; pkt; } cell_t; typedef union cell_container { cell_t cell; char padding[MPID_NEM_CELL_LEN]; } cell_container_t; #define MPID_NEM_MPICH_DATA_LEN (sizeof(cell_container_t) - sizeof(cell_t) + 1) The packet payload can overflow the array in the packet struct up to MPID_NEM_MPICH_DATA_LEN bytes. */ #if (SIZEOF_OPA_PTR_T > 8) # if (SIZEOF_OPA_PTR_T > 16) # error unexpected size for OPA_ptr_t # endif # 123 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" # define MPID_NEM_CELL_HEAD_LEN 16 /* We use this to keep elements 64-bit aligned */ #else /* (SIZEOF_OPA_PTR_T <= 8) */ # 125 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" # define MPID_NEM_CELL_HEAD_LEN 8 /* We use this to keep elements 64-bit aligned */ #endif # 127 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" #define MPID_NEM_CELL_PAYLOAD_LEN (MPID_NEM_CELL_LEN - MPID_NEM_CELL_HEAD_LEN) #define MPID_NEM_CALC_CELL_LEN(cellp) (MPID_NEM_CELL_HEAD_LEN + MPID_NEM_MPICH_HEAD_LEN + MPID_NEM_CELL_DLEN (cell)) #define MPID_NEM_ALIGNED(addr, bytes) ((((unsigned long)addr) & (((unsigned long)bytes)-1)) == 0) #define MPID_NEM_PKT_UNKNOWN 0 #define MPID_NEM_PKT_MPICH 1 #define MPID_NEM_PKT_MPICH_HEAD 2 #define MPID_NEM_FBOX_SOURCE(cell) (MPID_nem_mem_region.local_procs[(cell)->pkt.header.source]) #define MPID_NEM_CELL_SOURCE(cell) ((cell)->pkt.header.source) #define MPID_NEM_CELL_DEST(cell) ((cell)->pkt.header.dest) #define MPID_NEM_CELL_DLEN(cell) ((cell)->pkt.header.datalen) #define MPID_NEM_CELL_SEQN(cell) ((cell)->pkt.header.seqno) #define MPID_NEM_MPICH_HEAD_LEN sizeof(MPID_nem_pkt_header_t) #define MPID_NEM_MPICH_DATA_LEN (MPID_NEM_CELL_PAYLOAD_LEN - MPID_NEM_MPICH_HEAD_LEN) #define MPID_NEM_PKT_HEADER_FIELDS \ typedef struct MPID_nem_pkt_header { int source; int dest; intptr_t datalen; unsigned short seqno; unsigned short type; /* currently used only with checkpointing */ } MPID_nem_pkt_header_t; typedef struct MPID_nem_pkt { MPID_nem_pkt_header_t header; union { char payload[MPID_NEM_MPICH_DATA_LEN]; double dummy; /* align paylod to double */ } p; } MPID_nem_pkt_t; /* Nemesis cells which are to be used in shared memory need to use * "relative pointers" because the absolute pointers to a cell from * different processes may be different. Relative pointers are * offsets from the beginning of the mmapped region where they live. * We use different types for relative and absolute pointers to help * catch errors. Use MPID_NEM_REL_TO_ABS and MPID_NEM_ABS_TO_REL to * convert between relative and absolute pointers. */ /* This should always be exactly the size of a pointer */ typedef struct MPID_nem_cell_rel_ptr { OPA_ptr_t p; } MPID_nem_cell_rel_ptr_t; /* MPID_nem_cell and MPID_nem_abs_cell must be kept in sync so that we * can cast between them. MPID_nem_abs_cell should only be used when * a cell is enqueued on a queue local to a single process (e.g., a * queue in a network module) where relative pointers are not * needed. */ typedef struct MPID_nem_cell { MPID_nem_cell_rel_ptr_t next; #if (MPID_NEM_CELL_HEAD_LEN > SIZEOF_OPA_PTR_T) char padding[MPID_NEM_CELL_HEAD_LEN - sizeof(MPID_nem_cell_rel_ptr_t)]; #endif # 194 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" volatile MPID_nem_pkt_t pkt; } MPID_nem_cell_t; typedef MPID_nem_cell_t *MPID_nem_cell_ptr_t; typedef struct MPID_nem_abs_cell { struct MPID_nem_abs_cell *next; #if (MPID_NEM_CELL_HEAD_LEN > SIZEOF_VOID_P) char padding[MPID_NEM_CELL_HEAD_LEN - sizeof(struct MPID_nem_abs_cell*)]; #endif # 204 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" volatile MPID_nem_pkt_t pkt; } MPID_nem_abs_cell_t; typedef MPID_nem_abs_cell_t *MPID_nem_abs_cell_ptr_t; #define MPID_NEM_CELL_TO_PACKET(cellp) (&(cellp)->pkt) #define MPID_NEM_PACKET_TO_CELL(packetp) \ ((MPID_nem_cell_ptr_t) ((char*)(packetp) - (char *)MPID_NEM_CELL_TO_PACKET((MPID_nem_cell_ptr_t)0))) #define MPID_NEM_MIN_PACKET_LEN (sizeof (MPID_nem_pkt_header_t)) #define MPID_NEM_MAX_PACKET_LEN (sizeof (MPID_nem_pkt_t)) #define MPID_NEM_PACKET_LEN(pkt) ((pkt)->header.datalen + MPID_NEM_MPICH_HEAD_LEN) #define MPID_NEM_OPT_LOAD 16 #define MPID_NEM_OPT_SIZE ((sizeof(MPIDI_CH3_Pkt_t)) + (MPID_NEM_OPT_LOAD)) #define MPID_NEM_OPT_HEAD_LEN ((MPID_NEM_MPICH_HEAD_LEN) + (MPID_NEM_OPT_SIZE)) #define MPID_NEM_PACKET_OPT_LEN(pkt) \ (((pkt)->header.datalen < MPID_NEM_OPT_SIZE) ? (MPID_NEM_OPT_HEAD_LEN) : (MPID_NEM_PACKET_LEN(pkt))) #define MPID_NEM_PACKET_PAYLOAD(pkt) ((pkt)->header.payload) typedef struct MPID_nem_queue { MPID_nem_cell_rel_ptr_t head; MPID_nem_cell_rel_ptr_t tail; #if (MPID_NEM_CACHE_LINE_LEN > (2 * SIZEOF_OPA_PTR_T)) char padding1[MPID_NEM_CACHE_LINE_LEN - 2 * sizeof(MPID_nem_cell_rel_ptr_t)]; #endif # 231 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" MPID_nem_cell_rel_ptr_t my_head; #if (MPID_NEM_CACHE_LINE_LEN > SIZEOF_OPA_PTR_T) char padding2[MPID_NEM_CACHE_LINE_LEN - sizeof(MPID_nem_cell_rel_ptr_t)]; #endif # 235 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" #if !defined(MPID_NEM_USE_LOCK_FREE_QUEUES) /* see FIXME in mpid_nem_queue.h */ #define MPID_nem_queue_mutex_t MPID_Thread_mutex_t MPID_nem_queue_mutex_t lock; char padding3[MPID_NEM_CACHE_LINE_LEN - sizeof(MPID_Thread_mutex_t)]; #endif # 241 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" } MPID_nem_queue_t, *MPID_nem_queue_ptr_t; /* Fast Boxes*/ typedef union { OPA_int_t value; #if MPID_NEM_CACHE_LINE_LEN != 0 char padding[MPID_NEM_CACHE_LINE_LEN]; #endif # 250 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" } MPID_nem_opt_volint_t; typedef struct MPID_nem_fbox_common { MPID_nem_opt_volint_t flag; } MPID_nem_fbox_common_t, *MPID_nem_fbox_common_ptr_t; typedef struct MPID_nem_fbox_mpich { MPID_nem_opt_volint_t flag; MPID_nem_cell_t cell; } MPID_nem_fbox_mpich_t; #define MPID_NEM_FBOX_DATALEN MPID_NEM_MPICH_DATA_LEN typedef union { MPID_nem_fbox_common_t common; MPID_nem_fbox_mpich_t mpich; } MPID_nem_fastbox_t; typedef struct MPID_nem_fbox_arrays { MPID_nem_fastbox_t **in; MPID_nem_fastbox_t **out; } MPID_nem_fbox_arrays_t; #endif /* MPID_NEM_DATATYPES_H */ # 280 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_datatypes.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_defs.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpi.h" #endif /* expanded by -frewrite-includes */ # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_defs.h" # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_defs.h" #if 0 /* expanded by -frewrite-includes */ #include "mpiimpl.h" #endif /* expanded by -frewrite-includes */ # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_defs.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * * Portions of this code were written by Microsoft. Those portions are * Copyright (c) 2007 Microsoft Corporation. Microsoft grants * permission to use, reproduce, prepare derivative works, and to * redistribute to others. The code is licensed "as is." The User * bears the risk of using it. Microsoft gives no express warranties, * guarantees or conditions. To the extent permitted by law, Microsoft * excludes the implied warranties of merchantability, fitness for a * particular purpose and non-infringement. */ #ifndef MPIIMPL_H_INCLUDED #define MPIIMPL_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpichconfconst.h" #endif /* expanded by -frewrite-includes */ # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpichconf.h" #endif /* expanded by -frewrite-includes */ # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 22 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 23 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #ifdef STDC_HEADERS #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 24 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 26 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 26 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 27 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #else # 28 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #ifdef HAVE_STDLIB_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 29 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 30 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 31 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #ifdef HAVE_STDARG_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 32 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 33 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 34 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #ifdef HAVE_STRING_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 36 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 37 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 38 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #ifdef HAVE_LIMITS_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 40 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 41 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 42 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #ifdef HAVE_SYS_TYPES_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 44 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 45 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 46 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" /* for MAXHOSTNAMELEN under Linux and OSX */ #ifdef HAVE_SYS_PARAM_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 49 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 50 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 51 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if defined (HAVE_USLEEP) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 53 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 54 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if defined (NEEDS_USLEEP_DECL) int usleep(useconds_t usec); #endif # 57 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 58 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if defined(HAVE_LONG_LONG_INT) /* Assume two's complement for determining LLONG_MAX (already assumed * elsewhere in MPICH). */ #ifndef LLONG_MAX /* slightly tricky (values in binary): * - put a 1 in the second-to-msb digit (0100...0000) * - sub 1, giving all 1s starting at third-to-msb digit (0011...1111) * - shift left 1 (0111...1110) * - add 1, yielding all 1s in positive space (0111...1111) */ #define LLONG_MAX (((((long long) 1 << (sizeof(long long) * CHAR_BIT - 2)) - 1 ) << 1) + 1) #endif # 70 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif /* defined(HAVE_LONG_LONG_INT) */ # 71 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if (!defined MAXHOSTNAMELEN) && (!defined MAX_HOSTNAME_LEN) #define MAX_HOSTNAME_LEN 256 #elif !defined MAX_HOSTNAME_LEN # 75 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #define MAX_HOSTNAME_LEN MAXHOSTNAMELEN #endif # 77 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" /* This allows us to keep names local to a single file when we can use weak symbols */ #ifdef USE_WEAK_SYMBOLS #define PMPI_LOCAL static #else # 83 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #define PMPI_LOCAL #endif # 85 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" /* Fix for universal endianess added in autoconf 2.62 */ #ifdef WORDS_UNIVERSAL_ENDIAN #if defined(__BIG_ENDIAN__) #elif defined(__LITTLE_ENDIAN__) # 90 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #define WORDS_LITTLEENDIAN #else # 92 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #error 'Universal endianess defined without __BIG_ENDIAN__ or __LITTLE_ENDIAN__' #endif # 94 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 95 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if defined(HAVE_VSNPRINTF) && defined(NEEDS_VSNPRINTF_DECL) && !defined(vsnprintf) int vsnprintf(char *str, size_t size, const char *format, va_list ap); # endif # 99 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" /***************************************************************************** * We use the following ordering of information in this file: * * 1. Start with independent headers that do not have any * dependencies on the rest of the MPICH implementation (e.g., * mpl, opa, mpi.h). * * 2. Next is forward declarations of MPIR structures (MPIR_Comm, * MPIR_Win, etc.). * * 3. After that we have device-independent headers (MPIR * functionality that does not have any dependency on MPID). * * 4. Next is the device "pre" header that defines device-level * initial objects that would be used by the MPIR structures. * * 5. Then comes the device-dependent MPIR functionality, with the * actual definitions of structures, function prototypes, etc. * This functionality can only rely on the device "pre" * functionality. * * 6. Finally, we'll add the device "post" header that is allowed to * use anything from the MPIR layer. *****************************************************************************/ /*****************************************************************************/ /*********************** PART 1: INDEPENDENT HEADERS *************************/ /*****************************************************************************/ /* if we are defining this, we must define it before including mpl.h */ #if defined(MPICH_DEBUG_MEMINIT) #define MPL_VG_ENABLED 1 #endif # 135 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl.h" #endif /* expanded by -frewrite-includes */ # 136 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 137 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "opa_primitives.h" #endif /* expanded by -frewrite-includes */ # 137 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 138 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpi.h" #endif /* expanded by -frewrite-includes */ # 138 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 139 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" /*****************************************************************************/ /*********************** PART 2: FORWARD DECLARATION *************************/ /*****************************************************************************/ struct MPIR_Request; typedef struct MPIR_Request MPIR_Request; struct MPIR_Comm; typedef struct MPIR_Comm MPIR_Comm; struct MPIR_Datatype; /* FIXME: waiting for Wes' patch revert to fix this */ /* typedef struct MPIR_Datatype MPIR_Datatype; */ struct MPIR_Win; typedef struct MPIR_Win MPIR_Win; struct MPIR_Info; typedef struct MPIR_Info MPIR_Info; struct MPIR_Group; typedef struct MPIR_Group MPIR_Group; struct MPIR_Topology; typedef struct MPIR_Topology MPIR_Topology; /*****************************************************************************/ /******************* PART 3: DEVICE INDEPENDENT HEADERS **********************/ /*****************************************************************************/ #if 0 /* expanded by -frewrite-includes */ #include "mpir_misc.h" #endif /* expanded by -frewrite-includes */ # 172 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 173 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_dbg.h" #endif /* expanded by -frewrite-includes */ # 173 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 174 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_objects.h" #endif /* expanded by -frewrite-includes */ # 174 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 175 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_strerror.h" #endif /* expanded by -frewrite-includes */ # 175 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 176 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_type_defs.h" #endif /* expanded by -frewrite-includes */ # 176 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 177 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_assert.h" #endif /* expanded by -frewrite-includes */ # 177 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 178 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_pointers.h" #endif /* expanded by -frewrite-includes */ # 178 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 179 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_refcount.h" #endif /* expanded by -frewrite-includes */ # 179 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 180 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_mem.h" #endif /* expanded by -frewrite-includes */ # 180 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 181 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_info.h" #endif /* expanded by -frewrite-includes */ # 181 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 182 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_errhandler.h" #endif /* expanded by -frewrite-includes */ # 182 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 183 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_attr_generic.h" #endif /* expanded by -frewrite-includes */ # 183 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 184 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_contextid.h" #endif /* expanded by -frewrite-includes */ # 184 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 185 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_status.h" #endif /* expanded by -frewrite-includes */ # 185 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 186 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_debugger.h" #endif /* expanded by -frewrite-includes */ # 186 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 187 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_op.h" #endif /* expanded by -frewrite-includes */ # 187 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 188 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_topo.h" #endif /* expanded by -frewrite-includes */ # 188 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 189 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_tags.h" #endif /* expanded by -frewrite-includes */ # 189 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 190 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_pt2pt.h" #endif /* expanded by -frewrite-includes */ # 190 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 191 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_ext.h" #endif /* expanded by -frewrite-includes */ # 191 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 192 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #ifdef HAVE_CXX_BINDING #if 0 /* expanded by -frewrite-includes */ #include "mpii_cxxinterface.h" #endif /* expanded by -frewrite-includes */ # 194 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 195 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 196 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #ifdef HAVE_FORTRAN_BINDING #if 0 /* expanded by -frewrite-includes */ #include "mpii_f77interface.h" #endif /* expanded by -frewrite-includes */ # 198 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 199 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 200 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" /*****************************************************************************/ /********************** PART 4: DEVICE PRE DECLARATION ***********************/ /*****************************************************************************/ #if 0 /* expanded by -frewrite-includes */ #include "mpidpre.h" #endif /* expanded by -frewrite-includes */ # 206 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 207 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" /*****************************************************************************/ /********************* PART 5: DEVICE DEPENDENT HEADERS **********************/ /*****************************************************************************/ #if 0 /* expanded by -frewrite-includes */ #include "mpir_thread.h" #endif /* expanded by -frewrite-includes */ # 213 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 214 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_attr.h" #endif /* expanded by -frewrite-includes */ # 214 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 215 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_group.h" #endif /* expanded by -frewrite-includes */ # 215 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 216 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_comm.h" #endif /* expanded by -frewrite-includes */ # 216 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 217 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_request.h" #endif /* expanded by -frewrite-includes */ # 217 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 218 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_win.h" #endif /* expanded by -frewrite-includes */ # 218 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 219 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_coll.h" #endif /* expanded by -frewrite-includes */ # 219 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 220 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_func.h" #endif /* expanded by -frewrite-includes */ # 220 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 221 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_err.h" #endif /* expanded by -frewrite-includes */ # 221 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 222 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_datatype.h" #endif /* expanded by -frewrite-includes */ # 222 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 223 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_nbc.h" #endif /* expanded by -frewrite-includes */ # 223 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 224 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_process.h" #endif /* expanded by -frewrite-includes */ # 224 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 225 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_cvars.h" #endif /* expanded by -frewrite-includes */ # 225 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 226 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_misc_post.h" #endif /* expanded by -frewrite-includes */ # 226 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 227 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpit.h" #endif /* expanded by -frewrite-includes */ # 227 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 228 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_handlemem.h" #endif /* expanded by -frewrite-includes */ # 228 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 229 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" /*****************************************************************************/ /******************** PART 6: DEVICE "POST" FUNCTIONALITY ********************/ /*****************************************************************************/ #if 0 /* expanded by -frewrite-includes */ #include "mpidpost.h" #endif /* expanded by -frewrite-includes */ # 234 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 235 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" /* avoid conflicts in source files with old-style "char FCNAME[]" vars */ #undef FUNCNAME #undef FCNAME #endif /* MPIIMPL_INCLUDED */ # 241 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_defs.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpidu_shm.h" #endif /* expanded by -frewrite-includes */ # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_defs.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/shm/mpidu_shm.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* vim: set ft=c.mpich : */ /* * (C) 2016 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPIDU_SHM_H #define MPIDU_SHM_H #define MPIDU_SHM_MAX_FNAME_LEN 256 #define MPIDU_SHM_CACHE_LINE_LEN 64 typedef struct MPIDU_shm_barrier { OPA_int_t val; OPA_int_t wait; } MPIDU_shm_barrier_t, *MPIDU_shm_barrier_ptr_t; typedef struct MPIDU_shm_seg { size_t segment_len; /* Handle to shm seg */ MPL_shm_hnd_t hnd; /* Pointers */ char *base_addr; /* Misc */ char file_name[MPIDU_SHM_MAX_FNAME_LEN]; int base_descs; int symmetrical; } MPIDU_shm_seg_t, *MPIDU_shm_seg_ptr_t; typedef struct MPIDU_shm_seg_info { size_t size; char *addr; } MPIDU_shm_seg_info_t, *MPIDU_shm_seg_info_ptr_t; int MPIDU_shm_seg_alloc(size_t len, void **ptr_p); int MPIDU_shm_seg_commit(MPIDU_shm_seg_ptr_t memory, MPIDU_shm_barrier_ptr_t *barrier, int num_local, int local_rank, int local_procs_0, int rank); int MPIDU_shm_seg_destroy(MPIDU_shm_seg_ptr_t memory, int num_local); int MPIDU_shm_barrier_init(MPIDU_shm_barrier_t *barrier_region, MPIDU_shm_barrier_ptr_t *barrier, int init_values); int MPIDU_shm_barrier(MPIDU_shm_barrier_t *barrier, int num_local); #endif /* MPIDU_SHM_H */ # 49 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/shm/mpidu_shm.h" # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_defs.h" 2 /* FIXME: This definition should be gotten from mpidi_ch3_impl.h */ #ifndef MAX_HOSTNAME_LEN #define MAX_HOSTNAME_LEN 256 #endif /* MAX_HOSTNAME_LEN */ # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_defs.h" extern char MPID_nem_hostname[MAX_HOSTNAME_LEN]; #define MPID_NEM_RET_OK 1 #define MPID_NEM_RET_NG -1 #define MPID_NEM_KEY 632236 #define MPID_NEM_ANY_SOURCE -1 #define MPID_NEM_IN 1 #define MPID_NEM_OUT 0 #define MPID_NEM_POLL_IN 0 #define MPID_NEM_POLL_OUT 1 #define MPID_NEM_ASYMM_NULL_VAL 64 typedef MPI_Aint MPID_nem_addr_t; extern char *MPID_nem_asymm_base_addr; #define MPID_NEM_REL_NULL (0x0) #define MPID_NEM_IS_REL_NULL(rel_ptr) (OPA_load_ptr(&(rel_ptr).p) == MPID_NEM_REL_NULL) #define MPID_NEM_SET_REL_NULL(rel_ptr) (OPA_store_ptr(&((rel_ptr).p), MPID_NEM_REL_NULL)) #define MPID_NEM_REL_ARE_EQUAL(rel_ptr1, rel_ptr2) \ (OPA_load_ptr(&(rel_ptr1).p) == OPA_load_ptr(&(rel_ptr2).p)) #ifndef MPID_NEM_SYMMETRIC_QUEUES static inline MPID_nem_cell_ptr_t MPID_NEM_REL_TO_ABS (MPID_nem_cell_rel_ptr_t r) { return (MPID_nem_cell_ptr_t)((char*)OPA_load_ptr(&r.p) + (MPID_nem_addr_t)MPID_nem_asymm_base_addr); } static inline MPID_nem_cell_rel_ptr_t MPID_NEM_ABS_TO_REL (MPID_nem_cell_ptr_t a) { MPID_nem_cell_rel_ptr_t ret; OPA_store_ptr(&ret.p, (char *)a - (MPID_nem_addr_t)MPID_nem_asymm_base_addr); return ret; } #else /*MPID_NEM_SYMMETRIC_QUEUES */ # 57 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_defs.h" #define MPID_NEM_REL_TO_ABS(ptr) (ptr) #define MPID_NEM_ABS_TO_REL(ptr) (ptr) #endif /*MPID_NEM_SYMMETRIC_QUEUES */ # 60 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_defs.h" /* NOTE: MPID_NEM_IS_LOCAL should only be used when the process is known to be in your comm_world (such as at init time). This will generally not work for dynamic processes. Check vc_ch->is_local instead. If that is true, then it's safe to use MPID_NEM_LOCAL_RANK. */ #define MPID_NEM_NON_LOCAL -1 #define MPID_NEM_IS_LOCAL(grank) (MPID_nem_mem_region.local_ranks[grank] != MPID_NEM_NON_LOCAL) #define MPID_NEM_LOCAL_RANK(grank) (MPID_nem_mem_region.local_ranks[grank]) #define MPID_NEM_NUM_BARRIER_VARS 16 typedef struct MPID_nem_barrier_vars { OPA_int_t context_id; OPA_int_t usage_cnt; OPA_int_t cnt; #if MPID_NEM_CACHE_LINE_LEN != SIZEOF_INT char padding0[MPID_NEM_CACHE_LINE_LEN - sizeof(int)]; #endif # 78 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_defs.h" OPA_int_t sig0; OPA_int_t sig; char padding1[MPID_NEM_CACHE_LINE_LEN - 2* sizeof(int)]; } MPID_nem_barrier_vars_t; typedef struct MPID_nem_mem_region { MPIDU_shm_seg_t memory; MPIDU_shm_seg_info_t *seg; int num_seg; int map_lock; int num_local; int num_procs; int *local_procs; /* local_procs[lrank] gives the global rank of proc with local rank lrank */ int local_rank; int *local_ranks; /* local_ranks[grank] gives the local rank of proc with global rank grank or MPID_NEM_NON_LOCAL */ int ext_procs; /* Number of non-local processes */ int *ext_ranks; /* Ranks of non-local processes */ MPID_nem_fbox_arrays_t mailboxes; MPID_nem_cell_ptr_t Elements; MPID_nem_queue_ptr_t *FreeQ; MPID_nem_queue_ptr_t *RecvQ; MPIDU_shm_barrier_t *barrier; MPID_nem_queue_ptr_t my_freeQ; MPID_nem_queue_ptr_t my_recvQ; MPID_nem_barrier_vars_t *barrier_vars; int rank; struct MPID_nem_mem_region *next; } MPID_nem_mem_region_t, *MPID_nem_mem_region_ptr_t; /* #define MEM_REGION_IN_HEAP */ #ifdef MEM_REGION_IN_HEAP #define MPID_nem_mem_region (*MPID_nem_mem_region_ptr) extern MPID_nem_mem_region_t *MPID_nem_mem_region_ptr; #else /* MEM_REGION_IN_HEAP */ # 114 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_defs.h" extern MPID_nem_mem_region_t MPID_nem_mem_region; #endif /* MEM_REGION_IN_HEAP */ # 116 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_defs.h" #endif /* MPID_NEM_DEFS_H */ # 121 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_defs.h" # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_pre.h" 2 #if defined(HAVE_PTHREAD_H) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_pre.h" # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_pre.h" #endif # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_pre.h" typedef pthread_mutex_t MPIDI_CH3I_SHM_MUTEX; #define MPIDI_CH3_WIN_DECL \ void *shm_base_addr; /* base address of shared memory region */ \ MPI_Aint shm_segment_len; /* size of shared memory region */ \ MPL_shm_hnd_t shm_segment_handle; /* handle to shared memory region */ \ MPIDI_CH3I_SHM_MUTEX *shm_mutex; /* shared memory windows -- lock for \ accumulate/atomic operations */ \ MPL_shm_hnd_t shm_mutex_segment_handle; /* handle to interprocess mutex memory \ region */ \ \ void *info_shm_base_addr; /* base address of shared memory region for window info */ \ MPI_Aint info_shm_segment_len; /* size of shared memory region for window info */ \ MPL_shm_hnd_t info_shm_segment_handle; /* handle to shared memory region for window info */ \ #endif /* MPID_NEM_PRE_H */ # 33 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_pre.h" # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpidu_generic_queue.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/shm/mpidu_generic_queue.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2006 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPIDU_SHM_GENERIC_QUEUE_H #define MPIDU_SHM_GENERIC_QUEUE_H /* Generic queue macros -- "next_field" should be set to the name of the next pointer field in the element (e.g., "ch.tcp_sendq_next") */ #define PRINT_QUEUE(qp, next_field) do { \ } while(0) #define PRINTM_QUEUE(qp, next_field_macro, next_field) do { \ } while(0) #define GENERIC_Q_DECL(type) struct { type *head, *tail; } #define GENERIC_Q_EMPTY(q) ((q).head == NULL) #define GENERIC_Q_HEAD(q) ((q).head) #define GENERIC_Q_ENQUEUE_EMPTY(qp, ep, next_field) do { \ MPIR_Assert (GENERIC_Q_EMPTY (*(qp))); \ (qp)->head = (qp)->tail = ep; \ (ep)->next_field = NULL; \ PRINT_QUEUE (qp, next_field); \ } while (0) #define GENERIC_Q_ENQUEUE(qp, ep, next_field) do { \ if (GENERIC_Q_EMPTY (*(qp))) \ GENERIC_Q_ENQUEUE_EMPTY (qp, ep, next_field); \ else \ { \ (qp)->tail->next_field = ep; \ (qp)->tail = ep; \ (ep)->next_field = NULL; \ } \ PRINT_QUEUE (qp, next_field); \ } while (0) #define GENERIC_Q_ENQUEUE_AT_HEAD(qp, ep, next_field) do { \ if (GENERIC_Q_EMPTY (*(qp))) \ GENERIC_Q_ENQUEUE_EMPTY (qp, ep, next_field); \ else \ { \ (ep)->next_field = (qp)->head; \ (qp)->head = ep; \ } \ PRINT_QUEUE (qp, next_field); \ } while (0) /* the _MULTIPLE routines assume that ep0 is the head and ep1 is the tail of a linked list of elements. The list is inserted on the end of the queue. */ #define GENERIC_Q_ENQUEUE_EMPTY_MULTIPLE(qp, ep0, ep1, next_field) do { \ MPIR_Assert (GENERIC_Q_EMPTY (*(qp))); \ (qp)->head = ep0; \ (qp)->tail = ep1; \ (ep1)->next_field = NULL; \ } while (0) #define GENERIC_Q_ENQUEUE_MULTIPLE(qp, ep0, ep1, next_field) do { \ if (GENERIC_Q_EMPTY (*(qp))) \ GENERIC_Q_ENQUEUE_EMPTY_MULTIPLE (qp, ep0, ep1, next_field); \ else \ { \ (qp)->tail->next_field = ep0; \ (qp)->tail = ep1; \ (ep1)->next_field = NULL; \ } \ } while (0) #define GENERIC_Q_DEQUEUE(qp, epp, next_field) do { \ MPIR_Assert (!GENERIC_Q_EMPTY (*(qp))); \ *(epp) = (qp)->head; \ (qp)->head = (*(epp))->next_field; \ if ((qp)->head == NULL) \ (qp)->tail = NULL; \ PRINT_QUEUE (qp, next_field); \ } while (0) /* remove the elements from the top of the queue starting with ep0 through ep1 */ #define GENERIC_Q_REMOVE_ELEMENTS(qp, ep0, ep1, next_field) do { \ MPIR_Assert (GENERIC_Q_HEAD (*(qp)) == (ep0)); \ (qp)->head = (ep1)->next_field; \ if ((qp)->head == NULL) \ (qp)->tail = NULL; \ } while (0) /* search for element satisfying a predicate */ /* the predicate "pred" is any legal c conditional */ /* the current element can be accessed in the predicate with the _e variable e.g.: "_e->foo == NULL" */ #define GENERIC_Q_SEARCH(qp, pred, epp, el_type, next_field) do { \ el_type *_e; \ *(epp) = NULL; \ _e = GENERIC_Q_HEAD(*(qp)); \ while (_e) \ { \ if (pred) \ { \ *(epp) = _e; \ break; \ } \ _e = _e->next_field; \ } \ } while (0) /* search for element satisfying a predicate and remove it from the queue */ #define GENERIC_Q_SEARCH_REMOVE(qp, pred, epp, el_type, next_field) do { \ el_type *_e; \ el_type *_prev; \ if (GENERIC_Q_EMPTY(*(qp))) { \ *(epp) = NULL; \ break; \ } \ _e = GENERIC_Q_HEAD(*(qp)); \ if (pred) \ { \ GENERIC_Q_DEQUEUE(qp, epp, next_field); \ } \ else \ { \ while (1) \ { \ _prev = _e; \ _e = _e->next_field; \ \ if (_e == NULL) \ { \ *(epp) = NULL; \ break; \ } \ \ if (pred) \ { \ *(epp) = _e; \ _prev->next_field = _e->next_field; \ if ((qp)->tail == _e) \ (qp)->tail = _prev; \ break; \ } \ } \ } \ } while (0) /* queue macros that use another macro to find the 'next' field, e.g., when the next field is in the channel private area of a request. The macro is of the form "macro_name(element_ptr, next_field)"*/ #define GENERICM_Q_DECL(type, q_name) typedef struct { type *head, *tail; } q_name; #define GENERICM_Q_EMPTY(q) ((q).head == NULL) #define GENERICM_Q_HEAD(q) ((q).head) #define GENERICM_Q_ENQUEUE_EMPTY(qp, ep, next_field_macro, next_field) do { \ MPIR_Assert (GENERICM_Q_EMPTY (*(qp))); \ (qp)->head = (qp)->tail = ep; \ next_field_macro(ep, next_field) = NULL; \ PRINTM_QUEUE (qp, next_field_macro, next_field); \ } while (0) #define GENERICM_Q_ENQUEUE(qp, ep, next_field_macro, next_field) do { \ if (GENERICM_Q_EMPTY (*(qp))) \ GENERICM_Q_ENQUEUE_EMPTY (qp, ep, next_field_macro, next_field); \ else \ { \ next_field_macro((qp)->tail, next_field) = ep; \ (qp)->tail = ep; \ next_field_macro(ep, next_field) = NULL; \ } \ PRINTM_QUEUE (qp, next_field_macro, next_field); \ } while (0) #define GENERICM_Q_ENQUEUE_AT_HEAD(qp, ep, next_field_macro, next_field) do { \ if (GENERICM_Q_EMPTY (*(qp))) \ GENERICM_Q_ENQUEUE_EMPTY (qp, ep, next_field_macro, next_field); \ else \ { \ next_field_macro(ep, next_field) = (qp)->head; \ (qp)->head = ep; \ } \ PRINTM_QUEUE (qp, next_field_macro, next_field); \ } while (0) /* the _MULTIPLE routines assume that ep0 is the head and ep1 is the tail of a linked list of elements. The list is inserted on the end of the queue. */ #define GENERICM_Q_ENQUEUE_EMPTY_MULTIPLE(qp, ep0, ep1, next_field_macro, next_field) do { \ MPIR_Assert (GENERICM_Q_EMPTY (*(qp))); \ (qp)->head = ep0; \ (qp)->tail = ep1; \ next_field_macro(ep1, next_field) = NULL; \ } while (0) #define GENERICM_Q_ENQUEUE_MULTIPLE(qp, ep0, ep1, next_field_macro, next_field) do { \ if (GENERICM_Q_EMPTY (*(qp))) \ GENERICM_Q_ENQUEUE_EMPTY_MULTIPLE (qp, ep0, ep1, next_field_macro, next_field); \ else \ { \ next_field_macro((qp)->tail, next_field) = ep0; \ (qp)->tail = ep1; \ next_field_macro(ep1, next_field) = NULL; \ } \ } while (0) #define GENERICM_Q_DEQUEUE(qp, epp, next_field_macro, next_field) do { \ MPIR_Assert (!GENERICM_Q_EMPTY (*(qp))); \ *(epp) = (qp)->head; \ (qp)->head = next_field_macro(*(epp), next_field); \ if ((qp)->head == NULL) \ (qp)->tail = NULL; \ } while (0) /* remove the elements from the top of the queue starting with ep0 through ep1 */ #define GENERICM_Q_REMOVE_ELEMENTS(qp, ep0, ep1, next_field_macro, next_field) do { \ MPIR_Assert (GENERICM_Q_HEAD (*(qp)) == (ep0)); \ (qp)->head = next_field_macro(ep1, next_field); \ if ((qp)->head == NULL) \ (qp)->tail = NULL; \ } while (0) /* search for element satisfying a predicate */ /* the predicate "pred" is any legal c conditional */ /* the current element can be accessed in the predicate with the _e variable e.g.: "_e->foo == NULL" */ #define GENERICM_Q_SEARCH(qp, pred, epp, el_type, next_field_macro, next_field) do { \ el_type *_e; \ *(epp) = NULL; \ _e = GENERICM_Q_HEAD(*(qp)); \ while (_e) \ { \ if (pred) \ { \ *(epp) = _e; \ break; \ } \ _e = next_field_macro(_e, next_field); \ } \ } while (0) /* search for element satisfying a predicate and remove it from the queue */ #define GENERICM_Q_SEARCH_REMOVE(qp, pred, epp, el_type, next_field_macro, next_field) do { \ el_type *_e; \ el_type *_prev; \ if (GENERICM_Q_EMPTY(*(qp))) \ *(epp) = NULL; \ _e = GENERICM_Q_HEAD(*(qp)); \ if (pred) \ { \ GENERICM_Q_DEQUEUE(qp, epp, next_field_macro, next_field); \ } \ else \ { \ while (1) \ { \ _prev = _e; \ _e = next_field_macro(_e, next_field); \ \ if (_e == NULL) \ { \ *(epp) = NULL; \ break; \ } \ \ if (pred) \ { \ *(epp) = _e; \ _prev->next = _e->next; \ if ((qp)->tail == _e) \ (qp)->tail = _prev; \ break; \ } \ } \ } \ } while (0) /* Generic list macros */ #define GENERIC_L_EMPTY(q) ((q).head == NULL) #define GENERIC_L_HEAD(q) ((q).head) #define GENERIC_L_ADD_EMPTY(qp, ep, next_field, prev_field) do { \ MPIR_Assert (GENERIC_L_EMPTY (*(qp))); \ (qp)->head = ep; \ (ep)->next_field = (ep)->prev_field = NULL; \ } while (0) #define GENERIC_L_ADD(qp, ep, next_field, prev_field) do { \ if (GENERIC_L_EMPTY (*(qp))) \ GENERIC_L_ADD_EMPTY (qp, ep, next_field, prev_field); \ else \ { \ (ep)->prev_field = NULL; \ (ep)->next_field = (qp)->head; \ (qp)->head->prev_field = ep; \ (qp)->head = ep; \ } \ } while (0) #define GENERIC_L_REMOVE(qp, ep, next_field, prev_field) do { \ MPIR_Assert (!GENERIC_L_EMPTY (*(qp))); \ if ((ep)->prev_field) \ ((ep)->prev_field)->next_field = (ep)->next_field; \ else \ (qp)->head = (ep)->next_field; \ if ((ep)->next_field) \ ((ep)->next_field)->prev_field = (ep)->prev_field; \ } while (0) /* Generic stack macros */ #define GENERIC_S_EMPTY(s) ((s).top == NULL) #define GENERIC_S_TOP(s) ((s).top) #define GENERIC_S_PUSH(sp, ep, next_field) do { \ (ep)->next_field = (sp)->top; \ (sp)->top = ep; \ } while (0) /* PUSH_MULTIPLE pushes a linked list of elements onto the stack. It assumes that ep0 is the head of the linked list and ep1 is at the tail */ #define GENERIC_S_PUSH_MULTIPLE(sp, ep0, ep1, next_field) do { \ (ep1)->next_field = (sp)->top; \ (sp)->top = ep0; \ } while (0) #define GENERIC_S_POP(sp, epp, next_field) do { \ *(epp) = (sp)->top; \ (sp)->top = (*(epp))->next_field; \ } while (0) #endif /* MPIDU_SHM_GENERIC_QUEUE_H */ # 340 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/common/shm/mpidu_generic_queue.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h" 2 #if defined(HAVE_NETINET_IN_H) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h" # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h" #elif defined(HAVE_WINSOCK2_H) # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h" # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h" # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h" #endif # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h" /*#define MPID_USE_SEQUENCE_NUMBERS*/ /*#define HAVE_CH3_PRE_INIT*/ /* #define MPIDI_CH3_HAS_NO_DYNAMIC_PROCESS */ #define MPIDI_DEV_IMPLEMENTS_KVS /* Nemesis packets */ #define MPIDI_CH3_PKT_ENUM \ MPIDI_NEM_PKT_LMT_RTS, \ MPIDI_NEM_PKT_LMT_CTS, \ MPIDI_NEM_PKT_LMT_DONE, \ MPIDI_NEM_PKT_LMT_COOKIE, \ MPIDI_NEM_PKT_CKPT_MARKER, \ MPIDI_NEM_PKT_NETMOD typedef struct { struct MPID_nem_barrier_vars *barrier_vars; /* shared memory variables used in barrier */ void *netmod_priv; /* netmod communicator private data */ } MPIDI_CH3I_CH_comm_t; typedef enum MPIDI_CH3I_VC_state { MPIDI_CH3I_VC_STATE_UNCONNECTED, MPIDI_CH3I_VC_STATE_CONNECTING, MPIDI_CH3I_VC_STATE_CONNECTED, MPIDI_CH3I_VC_STATE_FAILED } MPIDI_CH3I_VC_state_t; /* size of private data area in vc and req for network modules */ #define MPIDI_NEM_VC_NETMOD_AREA_LEN 128 #define MPIDI_NEM_REQ_NETMOD_AREA_LEN 192 /* define functions for access MPID_nem_lmt_rts_queue_t */ typedef GENERIC_Q_DECL(struct MPIR_Request) MPID_nem_lmt_rts_queue_t; #define MPID_nem_lmt_rtsq_empty(q) GENERIC_Q_EMPTY (q) #define MPID_nem_lmt_rtsq_head(q) GENERIC_Q_HEAD (q) #define MPID_nem_lmt_rtsq_enqueue(qp, ep) do { \ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, \ "MPID_nem_lmt_rtsq_enqueue req=%p (handle=%#x), queue=%p", \ ep, (ep)->handle, qp)); \ GENERIC_Q_ENQUEUE (qp, ep, dev.next); \ } while (0) #define MPID_nem_lmt_rtsq_dequeue(qp, epp) do { \ GENERIC_Q_DEQUEUE (qp, epp, dev.next); \ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, \ "MPID_nem_lmt_rtsq_dequeue req=%p (handle=%#x), queue=%p", \ *(epp), *(epp) ? (*(epp))->handle : -1, qp)); \ } while (0) #define MPID_nem_lmt_rtsq_search_remove(qp, req_id, epp) do { \ GENERIC_Q_SEARCH_REMOVE(qp, _e->handle == (req_id), epp, \ struct MPIR_Request, dev.next); \ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CHANNEL, VERBOSE, (MPL_DBG_FDEST, \ "MPID_nem_lmt_rtsq_search_remove req=%p (handle=%#x), queue=%p", \ *(epp), req_id, qp)); \ } while (0) typedef struct MPIDI_CH3I_VC { int pg_rank; struct MPIR_Request *recv_active; int is_local; unsigned short send_seqno; MPID_nem_fbox_mpich_t *fbox_out; MPID_nem_fbox_mpich_t *fbox_in; MPID_nem_queue_ptr_t recv_queue; MPID_nem_queue_ptr_t free_queue; #ifdef ENABLE_CHECKPOINTING intptr_t ckpt_msg_len; void *ckpt_msg_buf; #endif # 91 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h" /* temp buffer to store partially received header */ intptr_t pending_pkt_len; union MPIDI_CH3_Pkt *pending_pkt; /* can be used by netmods to put this vc on a send queue or list */ struct MPIDI_VC *next; struct MPIDI_VC *prev; /* contig function pointers. Netmods should set these. */ /* iStartContigMsg -- sends a message consisting of a header (hdr) and contiguous data (data), possibly of 0 size. If the message cannot be sent immediately, the function should create a request and return a pointer in sreq_ptr. The network module should complete the request once the message has been completely sent. */ int (* iStartContigMsg)(struct MPIDI_VC *vc, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz, struct MPIR_Request **sreq_ptr); /* iSentContig -- sends a message consisting of a header (hdr) and contiguous data (data), possibly of 0 size. The network module should complete the request once the message has been completely sent. */ int (* iSendContig)(struct MPIDI_VC *vc, struct MPIR_Request *sreq, void *hdr, intptr_t hdr_sz, void *data, intptr_t data_sz); #ifdef ENABLE_CHECKPOINTING /* ckpt_pause_send -- netmod should stop sending on this vc and queue messages to be sent after ckpt_continue()*/ int (* ckpt_pause_send_vc)(struct MPIDI_VC *vc); /* ckpt_continue -- Notify remote side to start sending again. */ int (* ckpt_continue_vc)(struct MPIDI_VC *vc); /* ckpt_restart -- similar to ckpt_continue, except that the process has been restarted */ int (* ckpt_restart_vc)(struct MPIDI_VC *vc); #endif # 119 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h" /* LMT function pointers */ int (* lmt_initiate_lmt)(struct MPIDI_VC *vc, union MPIDI_CH3_Pkt *rts_pkt, struct MPIR_Request *req); int (* lmt_start_recv)(struct MPIDI_VC *vc, struct MPIR_Request *req, MPL_IOV s_cookie); int (* lmt_start_send)(struct MPIDI_VC *vc, struct MPIR_Request *sreq, MPL_IOV r_cookie); int (* lmt_handle_cookie)(struct MPIDI_VC *vc, struct MPIR_Request *req, MPL_IOV cookie); int (* lmt_done_send)(struct MPIDI_VC *vc, struct MPIR_Request *req); int (* lmt_done_recv)(struct MPIDI_VC *vc, struct MPIR_Request *req); int (* lmt_vc_terminated)(struct MPIDI_VC *vc); /* LMT shared memory copy-buffer ptr */ struct MPID_nem_copy_buf *lmt_copy_buf; MPL_shm_hnd_t lmt_copy_buf_handle; MPL_shm_hnd_t lmt_recv_copy_buf_handle; int lmt_buf_num; intptr_t lmt_surfeit; struct {struct MPID_nem_lmt_shm_wait_element *head, *tail;} lmt_queue; struct MPID_nem_lmt_shm_wait_element *lmt_active_lmt; int lmt_enqueued; /* FIXME: used for debugging */ MPID_nem_lmt_rts_queue_t lmt_rts_queue; /* Pointer to per-vc packet handlers */ MPIDI_CH3_PktHandler_Fcn **pkt_handler; int num_pkt_handlers; union { char padding[MPIDI_NEM_VC_NETMOD_AREA_LEN]; /* Temporary helper field for ticket #1679. Should force proper pointer * alignment on finnicky platforms like SPARC. Proper fix is to stop * this questionable type aliasing altogether. */ void *align_helper; } netmod_area; /* FIXME: ch3 assumes there is a field called sendq_head in the ch portion of the vc. This is unused in nemesis and should be set to NULL */ void *sendq_head; } MPIDI_CH3I_VC; #define MPIDI_CH3_VC_DECL struct MPIDI_CH3I_VC ch; struct MPIDI_CH3I_Request { struct MPIDI_VC *vc; int noncontig; intptr_t header_sz; MPI_Request lmt_req_id; /* request id of remote side */ struct MPIR_Request *lmt_req; /* pointer to original send/recv request */ intptr_t lmt_data_sz; /* data size to be transferred, after checking for truncation */ MPL_IOV lmt_tmp_cookie; /* temporary storage for received cookie */ void *s_cookie; /* temporary storage for the cookie data in case the packet can't be sent immediately */ union { char padding[MPIDI_NEM_REQ_NETMOD_AREA_LEN]; /* Temporary helper field for ticket #1679. Should force proper pointer * alignment on finnicky platforms like SPARC. Proper fix is to stop * this questionable type aliasing altogether. */ void *align_helper; } netmod_area; }; /* * MPIDI_CH3_REQUEST_DECL (additions to MPIR_Request) */ #define MPIDI_CH3_REQUEST_DECL struct MPIDI_CH3I_Request ch; #if 0 #define DUMP_REQUEST(req) do { \ int i; \ MPL_DBG_MSG_P(MPIDI_CH3_DBG_OTHER, TERSE, "request %p\n", (req)); \ MPL_DBG_MSG_D(MPIDI_CH3_DBG_OTHER, TERSE, " handle = %d\n", (req)->handle); \ MPL_DBG_MSG_D(MPIDI_CH3_DBG_OTHER, TERSE, " ref_count = %d\n", (req)->ref_count); \ MPL_DBG_MSG_D(MPIDI_CH3_DBG_OTHER, TERSE, " cc = %d\n", (req)->cc); \ for (i = 0; i < (req)->iov_count; ++i) \ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER, TERSE, (MPL_DBG_FDEST, " dev.iov[%d] = (%p, %d)\n", i, \ (req)->dev.iov[i+(req)->dev.iov_offset].MPL_IOV_BUF, \ (req)->dev.iov[i+(req)->dev.iov_offset].MPL_IOV_LEN)); \ MPL_DBG_MSG_D(MPIDI_CH3_DBG_OTHER, TERSE, " dev.iov_count = %d\n", \ (req)->dev.iov_count); \ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER, TERSE, (MPL_DBG_FDEST, " dev.state = 0x%x\n", (req)->dev.state)); \ MPL_DBG_MSG_D(MPIDI_CH3_DBG_OTHER, TERSE, " type = %d\n", \ MPIDI_Request_get_type(req)); \ } while (0) #else # 210 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h" #define DUMP_REQUEST(req) do { } while (0) #endif # 212 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h" #define MPIDI_POSTED_RECV_ENQUEUE_HOOK(req) MPIDI_CH3I_Posted_recv_enqueued(req) #define MPIDI_POSTED_RECV_DEQUEUE_HOOK(req) MPIDI_CH3I_Posted_recv_dequeued(req) /* * MPID_Progress_state - device/channel dependent state to be passed between * MPID_Progress_{start,wait,end} * */ typedef struct MPIDI_CH3I_Progress_state { int completion_count; } MPIDI_CH3I_Progress_state; #define MPIDI_CH3_PROGRESS_STATE_DECL MPIDI_CH3I_Progress_state ch; extern OPA_int_t MPIDI_CH3I_progress_completion_count; #define MPIDI_CH3I_INCR_PROGRESS_COMPLETION_COUNT do { \ OPA_write_barrier(); \ OPA_incr_int(&MPIDI_CH3I_progress_completion_count); \ MPL_DBG_MSG_D(MPIDI_CH3_DBG_PROGRESS,VERBOSE, \ "just incremented MPIDI_CH3I_progress_completion_count=%d", \ OPA_load_int(&MPIDI_CH3I_progress_completion_count)); \ } while(0) #endif /* !defined(MPICH_MPIDI_CH3_PRE_H_INCLUDED) */ # 241 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_pre.h" # 54 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" 2 /* FIXME: Who defines this name */ /* As of 8/1/06, no-one defined MSGS_UNORDERED. We should consider moving support for unordered messages to a different part of the code However, note that sequence numbers may be useful in other contexts, including identifying messages when multithreaded (for better profiling tools) and handling cancellations (rather than relying on unique request ids) */ #if defined (MPIDI_CH3_MSGS_UNORDERED) #define MPID_USE_SEQUENCE_NUMBERS #endif # 66 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" #if defined(MPID_USE_SEQUENCE_NUMBERS) typedef unsigned long MPID_Seqnum_t; #endif # 70 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" #if 0 /* expanded by -frewrite-includes */ #include "mpichconf.h" #endif /* expanded by -frewrite-includes */ # 71 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" # 72 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" #if CH3_RANK_BITS == 16 typedef int16_t MPIDI_Rank_t; #elif CH3_RANK_BITS == 32 # 76 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" typedef int32_t MPIDI_Rank_t; #endif /* CH3_RANK_BITS */ # 78 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" /* Indicates that this device is topology aware and implements the MPID_Get_node_id function (and friends). */ #define MPID_USE_NODE_IDS typedef MPIDI_Rank_t MPID_Node_id_t; /* For the typical communication system for which the ch3 channel is appropriate, 16 bits is sufficient for the rank. By also using 16 bits for the context, we can reduce the size of the match information, which is beneficial for slower communication links. Further, this allows the total structure size to be 64 bits and the search operations can be optimized on 64-bit platforms. We use a union of the actual required structure with a uintptr_t, so in this optimized case, the "whole" field can be used for comparisons. Note that the MPICH code (in src/mpi) uses int for rank (and usually for contextids, though some work is needed there). Note: We need to check for truncation of rank in MPID_Init - it should confirm that the size of comm_world is less than 2^15, and in an communicator create (that may make use of dynamically created processes) that the size of the communicator is within range. If any part of the definition of this type is changed, those changes must be reflected in the debugger interface in src/mpi/debugger/dll_mpich.c and dbgstub.c */ typedef struct MPIDI_Message_match_parts { int32_t tag; MPIDI_Rank_t rank; MPIR_Context_id_t context_id; } MPIDI_Message_match_parts_t; typedef union { MPIDI_Message_match_parts_t parts; uintptr_t whole; } MPIDI_Message_match; /* Provides MPIDI_CH3_Pkt_t. Must come after MPIDI_Message_match definition. */ #if 0 /* expanded by -frewrite-includes */ #include "mpidpkt.h" #endif /* expanded by -frewrite-includes */ # 118 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpkt.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef HAVE_MPIDPKT_H #define HAVE_MPIDPKT_H #if 0 /* expanded by -frewrite-includes */ #include "mpir_op_util.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpkt.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_op_util.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * * (C) 2009 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPIR_OP_UTIL_H_INCLUDED #define MPIR_OP_UTIL_H_INCLUDED /* The MPI Standard (MPI-2.1, sec 5.9.2) defines which predfined reduction operators are valid by groups of types: C integer Fortran integer Floating point Logical Complex Byte We define an "x-macro" for each type group. Immediately prior to instantiating any of these macros you should define a valid MPIR_OP_TYPE_MACRO(mpi_type_,c_type_,type_name_). The primary use for this is to expand a given group's list into a sequence of case statements. The macro MPIR_OP_TYPE_REDUCE_CASE is available as a convenience to generate a case block that performs a reduction with the given operator. */ #if 0 /* sample usage: */ #undef MPIR_OP_TYPE_MACRO #define MPIR_OP_TYPE_MACRO(mpi_type_,c_type_,type_name_) MPIR_OP_TYPE_REDUCE_CASE(mpi_type_,c_type_,MPIR_MAX) /* or */ #define MPIR_OP_TYPE_MACRO(mpi_type_,c_type_,type_name_) case (mpi_type_): MPIR_OP_TYPE_GROUP(C_INTEGER) MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER) #undef MPIR_OP_TYPE_MACRO #endif # 37 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_op_util.h" /* op_macro_ is a 2-arg macro or function that preforms the reduction operation on a single element */ /* FIXME: This code may penalize the performance on many platforms as a work-around for a compiler bug in some versions of xlc. It would be far better to either test for that bug or to confirm that the work-around is really as benign as claimed. */ /* Ideally "b" would be const, but xlc on POWER7 can't currently handle * "const long double _Complex * restrict" as a valid pointer type. It just * emits a warning and generates invalid arithmetic code. We could drop the * restrict instead, but we are more likely to get an optimization from it than * const. [goodell@ 2010-12-15] */ #define MPIR_OP_TYPE_REDUCE_CASE(mpi_type_,c_type_,op_macro_) \ case (mpi_type_): { \ c_type_ * restrict a = (c_type_ *)inoutvec; \ /*const*/ c_type_ * restrict b = (c_type_ *)invec; \ for ( i=0; i #endif /* expanded by -frewrite-includes */ # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpkt.h" # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpkt.h" #endif # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpkt.h" #ifdef HAVE_INTTYPES_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpkt.h" # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpkt.h" #endif # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpkt.h" /* Enable the use of data within the message packet for small messages */ #define USE_EAGER_SHORT #define MPIDI_EAGER_SHORT_INTS 4 /* FIXME: This appears to assume that sizeof(int) == 4 (or at least >= 4) */ #define MPIDI_EAGER_SHORT_SIZE 16 /* This is the number of ints that can be carried within an RMA packet */ #define MPIDI_RMA_IMMED_BYTES 8 /* Union over all types (integer, logical, and multi-language types) that are allowed in a CAS operation. This is used to allocate enough space in the packet header for immediate data. */ typedef union { #define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) c_type_ cas_##type_name_; MPIR_OP_TYPE_GROUP(C_INTEGER) MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER) MPIR_OP_TYPE_GROUP(LOGICAL) MPIR_OP_TYPE_GROUP(BYTE) MPIR_OP_TYPE_GROUP(C_INTEGER_EXTRA) MPIR_OP_TYPE_GROUP(FORTRAN_INTEGER_EXTRA) MPIR_OP_TYPE_GROUP(LOGICAL_EXTRA) MPIR_OP_TYPE_GROUP(BYTE_EXTRA) #undef MPIR_OP_TYPE_MACRO } MPIDI_CH3_CAS_Immed_u; /* Union over all types (all predefined types) that are allowed in a Fetch-and-op operation. This can be too large for the packet header, so we limit the immediate space in the header to FOP_IMMED_INTS. */ /* *INDENT-OFF* */ /* Indentation turned off because "indent" is getting confused with * the lack of a semi-colon in the fields below */ typedef union { #define MPIR_OP_TYPE_MACRO(mpi_type_, c_type_, type_name_) c_type_ fop##type_name_; MPIR_OP_TYPE_GROUP_ALL_BASIC MPIR_OP_TYPE_GROUP_ALL_EXTRA #undef MPIR_OP_TYPE_MACRO } MPIDI_CH3_FOP_Immed_u; /* *INDENT-ON* */ /* * Predefined packet types. This simplifies some of the code. */ /* FIXME: Having predefined names makes it harder to add new message types, such as different RMA types. */ typedef enum { MPIDI_CH3_PKT_EAGER_SEND = 0, #if defined(USE_EAGER_SHORT) MPIDI_CH3_PKT_EAGERSHORT_SEND, #endif /* defined(USE_EAGER_SHORT) */ # 69 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpkt.h" MPIDI_CH3_PKT_EAGER_SYNC_SEND, /* FIXME: no sync eager */ MPIDI_CH3_PKT_EAGER_SYNC_ACK, MPIDI_CH3_PKT_READY_SEND, MPIDI_CH3_PKT_RNDV_REQ_TO_SEND, MPIDI_CH3_PKT_RNDV_CLR_TO_SEND, MPIDI_CH3_PKT_RNDV_SEND, /* FIXME: should be stream put */ MPIDI_CH3_PKT_CANCEL_SEND_REQ, MPIDI_CH3_PKT_CANCEL_SEND_RESP, /* RMA Packets begin here */ MPIDI_CH3_PKT_PUT, MPIDI_CH3_PKT_PUT_IMMED, MPIDI_CH3_PKT_GET, MPIDI_CH3_PKT_ACCUMULATE, MPIDI_CH3_PKT_ACCUMULATE_IMMED, MPIDI_CH3_PKT_GET_ACCUM, MPIDI_CH3_PKT_GET_ACCUM_IMMED, MPIDI_CH3_PKT_FOP, MPIDI_CH3_PKT_FOP_IMMED, MPIDI_CH3_PKT_CAS_IMMED, MPIDI_CH3_PKT_GET_RESP, MPIDI_CH3_PKT_GET_RESP_IMMED, MPIDI_CH3_PKT_GET_ACCUM_RESP, MPIDI_CH3_PKT_GET_ACCUM_RESP_IMMED, MPIDI_CH3_PKT_FOP_RESP, MPIDI_CH3_PKT_FOP_RESP_IMMED, MPIDI_CH3_PKT_CAS_RESP_IMMED, MPIDI_CH3_PKT_LOCK, MPIDI_CH3_PKT_LOCK_ACK, MPIDI_CH3_PKT_LOCK_OP_ACK, MPIDI_CH3_PKT_UNLOCK, MPIDI_CH3_PKT_FLUSH, MPIDI_CH3_PKT_ACK, /* ACK packet for FLUSH, UNLOCK, DECR_AT_COUNTER */ MPIDI_CH3_PKT_DECR_AT_COUNTER, /* RMA Packets end here */ MPIDI_CH3_PKT_FLOW_CNTL_UPDATE, /* FIXME: Unused */ MPIDI_CH3_PKT_CLOSE, MPIDI_CH3_PKT_REVOKE, #ifndef MPIDI_CH3_HAS_NO_DYNAMIC_PROCESS /* Dynamic Connection Management */ MPIDI_CH3_PKT_CONN_ACK, MPIDI_CH3_PKT_ACCEPT_ACK, #endif # 111 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpkt.h" MPIDI_CH3_PKT_END_CH3, /* The channel can define additional types by defining the value * MPIDI_CH3_PKT_ENUM */ #if defined(MPIDI_CH3_PKT_ENUM) MPIDI_CH3_PKT_ENUM, #endif # 117 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpkt.h" MPIDI_CH3_PKT_END_ALL, MPIDI_CH3_PKT_INVALID = -1 /* forces a signed enum to quash warnings */ } MPIDI_CH3_Pkt_type_t; /* These flags can be "OR'ed" together */ typedef enum { MPIDI_CH3_PKT_FLAG_NONE = 0, MPIDI_CH3_PKT_FLAG_RMA_LOCK_SHARED = 1, MPIDI_CH3_PKT_FLAG_RMA_LOCK_EXCLUSIVE = 2, MPIDI_CH3_PKT_FLAG_RMA_UNLOCK = 4, MPIDI_CH3_PKT_FLAG_RMA_FLUSH = 8, MPIDI_CH3_PKT_FLAG_RMA_REQ_ACK = 16, MPIDI_CH3_PKT_FLAG_RMA_DECR_AT_COUNTER = 32, MPIDI_CH3_PKT_FLAG_RMA_NOCHECK = 64, MPIDI_CH3_PKT_FLAG_RMA_ACK = 128, MPIDI_CH3_PKT_FLAG_RMA_LOCK_GRANTED = 256, MPIDI_CH3_PKT_FLAG_RMA_LOCK_QUEUED_DATA_QUEUED = 512, MPIDI_CH3_PKT_FLAG_RMA_LOCK_QUEUED_DATA_DISCARDED = 1024, MPIDI_CH3_PKT_FLAG_RMA_LOCK_DISCARDED = 2048, MPIDI_CH3_PKT_FLAG_RMA_UNLOCK_NO_ACK = 4096, MPIDI_CH3_PKT_FLAG_RMA_IMMED_RESP = 8192, MPIDI_CH3_PKT_FLAG_RMA_STREAM = 16384 } MPIDI_CH3_Pkt_flags_t; typedef struct MPIDI_CH3_Pkt_send { MPIDI_CH3_Pkt_type_t type; /* XXX - uint8_t to conserve space ??? */ MPIDI_Message_match match; MPI_Request sender_req_id; /* needed for ssend and send cancel */ intptr_t data_sz; #if defined(MPID_USE_SEQUENCE_NUMBERS) MPID_Seqnum_t seqnum; #endif # 149 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpkt.h" } MPIDI_CH3_Pkt_send_t; /* NOTE: Normal and synchronous eager sends, as well as all ready-mode sends, use the same structure but have a different type value. */ typedef MPIDI_CH3_Pkt_send_t MPIDI_CH3_Pkt_eager_send_t; typedef MPIDI_CH3_Pkt_send_t MPIDI_CH3_Pkt_eager_sync_send_t; typedef MPIDI_CH3_Pkt_send_t MPIDI_CH3_Pkt_ready_send_t; #if defined(USE_EAGER_SHORT) typedef struct MPIDI_CH3_Pkt_eagershort_send { MPIDI_CH3_Pkt_type_t type; /* XXX - uint8_t to conserve space ??? */ MPIDI_Message_match match; intptr_t data_sz; #if defined(MPID_USE_SEQUENCE_NUMBERS) MPID_Seqnum_t seqnum; #endif # 165 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpkt.h" int data[MPIDI_EAGER_SHORT_INTS]; /* FIXME: Experimental for now */ } MPIDI_CH3_Pkt_eagershort_send_t; #endif /* defined(USE_EAGER_SHORT) */ # 168 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpkt.h" typedef struct MPIDI_CH3_Pkt_eager_sync_ack { MPIDI_CH3_Pkt_type_t type; MPI_Request sender_req_id; } MPIDI_CH3_Pkt_eager_sync_ack_t; typedef MPIDI_CH3_Pkt_send_t MPIDI_CH3_Pkt_rndv_req_to_send_t; typedef struct MPIDI_CH3_Pkt_rndv_clr_to_send { MPIDI_CH3_Pkt_type_t type; MPI_Request sender_req_id; MPI_Request receiver_req_id; } MPIDI_CH3_Pkt_rndv_clr_to_send_t; typedef struct MPIDI_CH3_Pkt_rndv_send { MPIDI_CH3_Pkt_type_t type; MPI_Request receiver_req_id; } MPIDI_CH3_Pkt_rndv_send_t; typedef struct MPIDI_CH3_Pkt_cancel_send_req { MPIDI_CH3_Pkt_type_t type; MPIDI_Message_match match; MPI_Request sender_req_id; } MPIDI_CH3_Pkt_cancel_send_req_t; typedef struct MPIDI_CH3_Pkt_cancel_send_resp { MPIDI_CH3_Pkt_type_t type; MPI_Request sender_req_id; int ack; } MPIDI_CH3_Pkt_cancel_send_resp_t; /* *INDENT-OFF* */ /* Indentation turned off because "indent" is getting confused with * the lack of a semi-colon in the field below */ #if defined(MPIDI_CH3_PKT_DEFS) MPIDI_CH3_PKT_DEFS #endif # 205 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpkt.h" /* *INDENT-ON* */ #define MPIDI_CH3_PKT_RMA_GET_TARGET_DATATYPE(pkt_, datatype_, err_) \ { \ /* This macro returns target_datatype in RMA operation \ packets. (PUT, GET, ACC, GACC, CAS, FOP) */ \ err_ = MPI_SUCCESS; \ switch((pkt_).type) { \ case (MPIDI_CH3_PKT_PUT): \ case (MPIDI_CH3_PKT_PUT_IMMED): \ datatype_ = (pkt_).put.datatype; \ break; \ case (MPIDI_CH3_PKT_GET): \ datatype_ = (pkt_).get.datatype; \ break; \ case (MPIDI_CH3_PKT_ACCUMULATE): \ case (MPIDI_CH3_PKT_ACCUMULATE_IMMED): \ datatype_ = (pkt_).accum.datatype; \ break; \ case (MPIDI_CH3_PKT_GET_ACCUM): \ case (MPIDI_CH3_PKT_GET_ACCUM_IMMED): \ datatype_ = (pkt_).get_accum.datatype; \ break; \ case (MPIDI_CH3_PKT_CAS_IMMED): \ datatype_ = (pkt_).cas.datatype; \ break; \ case (MPIDI_CH3_PKT_FOP): \ case (MPIDI_CH3_PKT_FOP_IMMED): \ datatype_ = (pkt_).fop.datatype; \ break; \ default: \ MPIR_ERR_SETANDJUMP1(err_, MPI_ERR_OTHER, "**invalidpkt", "**invalidpkt %d", (pkt_).type); \ } \ } #define MPIDI_CH3_PKT_RMA_GET_TARGET_COUNT(pkt_, count_, err_) \ { \ /* This macro returns target_count in RMA operation \ packets. (PUT, GET, ACC, GACC, CAS, FOP) */ \ err_ = MPI_SUCCESS; \ switch((pkt_).type) { \ case (MPIDI_CH3_PKT_PUT): \ case (MPIDI_CH3_PKT_PUT_IMMED): \ count_ = (pkt_).put.count; \ break; \ case (MPIDI_CH3_PKT_GET): \ count_ = (pkt_).get.count; \ break; \ case (MPIDI_CH3_PKT_ACCUMULATE): \ case (MPIDI_CH3_PKT_ACCUMULATE_IMMED): \ count_ = (pkt_).accum.count; \ break; \ case (MPIDI_CH3_PKT_GET_ACCUM): \ case (MPIDI_CH3_PKT_GET_ACCUM_IMMED): \ count_ = (pkt_).get_accum.count; \ break; \ case (MPIDI_CH3_PKT_CAS_IMMED): \ case (MPIDI_CH3_PKT_FOP): \ case (MPIDI_CH3_PKT_FOP_IMMED): \ count_ = 1; \ break; \ default: \ MPIR_ERR_SETANDJUMP1(err_, MPI_ERR_OTHER, "**invalidpkt", "**invalidpkt %d", (pkt_).type); \ } \ } #define MPIDI_CH3_PKT_RMA_GET_IMMED_DATA_PTR(pkt_, immed_data_, err_) \ { \ /* This macro returns pointer to immed data in RMA operation \ packets (PUT, ACC, GACC, FOP, CAS) and RMA response \ packets (GET_RESP, GACC_RESP, FOP_RESP, CAS_RESP). */ \ err_ = MPI_SUCCESS; \ switch((pkt_).type) { \ case (MPIDI_CH3_PKT_PUT_IMMED): \ immed_data_ = (pkt_).put.info.data; \ break; \ case (MPIDI_CH3_PKT_ACCUMULATE_IMMED): \ immed_data_ = (pkt_).accum.info.data; \ break; \ case (MPIDI_CH3_PKT_GET_ACCUM_IMMED): \ immed_data_ = (pkt_).get_accum.info.data; \ break; \ case (MPIDI_CH3_PKT_FOP_IMMED): \ immed_data_ = (pkt_).fop.info.data; \ break; \ case (MPIDI_CH3_PKT_CAS_IMMED): \ /* Note that here we return pointer of origin data, not \ pointer of compare data. */ \ immed_data_ = &((pkt_).cas.origin_data); \ break; \ case (MPIDI_CH3_PKT_GET_RESP_IMMED): \ immed_data_ = (pkt_).get_resp.info.data; \ break; \ case (MPIDI_CH3_PKT_GET_ACCUM_RESP_IMMED): \ immed_data_ = (pkt_).get_accum_resp.info.data; \ break; \ case (MPIDI_CH3_PKT_FOP_RESP_IMMED): \ immed_data_ = (pkt_).fop_resp.info.data; \ break; \ case (MPIDI_CH3_PKT_CAS_RESP_IMMED): \ immed_data_ = &((pkt_).cas_resp.info.data); \ break; \ default: \ MPIR_ERR_SETANDJUMP1(err_, MPI_ERR_OTHER, "**invalidpkt", "**invalidpkt %d", (pkt_).type); \ } \ } #define MPIDI_CH3_PKT_RMA_GET_FLAGS(pkt_, flags_, err_) \ { \ /* This macro returns flags in RMA operation packets (PUT, GET, \ ACC, GACC, FOP, CAS), RMA operation response packets \ (GET_RESP, GET_ACCUM_RESP, FOP_RESP, CAS_RESP), RMA control \ packets (UNLOCK) and RMA control response packets (LOCK_ACK, \ LOCK_OP_ACK) */ \ err_ = MPI_SUCCESS; \ switch((pkt_).type) { \ case (MPIDI_CH3_PKT_PUT): \ case (MPIDI_CH3_PKT_PUT_IMMED): \ flags_ = (pkt_).put.flags; \ break; \ case (MPIDI_CH3_PKT_GET): \ flags_ = (pkt_).get.flags; \ break; \ case (MPIDI_CH3_PKT_ACCUMULATE): \ case (MPIDI_CH3_PKT_ACCUMULATE_IMMED): \ flags_ = (pkt_).accum.flags; \ break; \ case (MPIDI_CH3_PKT_GET_ACCUM): \ case (MPIDI_CH3_PKT_GET_ACCUM_IMMED): \ flags_ = (pkt_).get_accum.flags; \ break; \ case (MPIDI_CH3_PKT_CAS_IMMED): \ flags_ = (pkt_).cas.flags; \ break; \ case (MPIDI_CH3_PKT_FOP): \ case (MPIDI_CH3_PKT_FOP_IMMED): \ flags_ = (pkt_).fop.flags; \ break; \ case (MPIDI_CH3_PKT_GET_RESP): \ case (MPIDI_CH3_PKT_GET_RESP_IMMED): \ flags_ = (pkt_).get_resp.flags; \ break; \ case (MPIDI_CH3_PKT_GET_ACCUM_RESP): \ case (MPIDI_CH3_PKT_GET_ACCUM_RESP_IMMED): \ flags_ = (pkt_).get_accum_resp.flags; \ break; \ case (MPIDI_CH3_PKT_FOP_RESP): \ case (MPIDI_CH3_PKT_FOP_RESP_IMMED): \ flags_ = (pkt_).fop_resp.flags; \ break; \ case (MPIDI_CH3_PKT_CAS_RESP_IMMED): \ flags_ = (pkt_).cas_resp.flags; \ break; \ case (MPIDI_CH3_PKT_LOCK): \ flags_ = (pkt_).lock.flags; \ break; \ case (MPIDI_CH3_PKT_UNLOCK): \ flags_ = (pkt_).unlock.flags; \ break; \ case (MPIDI_CH3_PKT_LOCK_ACK): \ flags_ = (pkt_).lock_ack.flags; \ break; \ case (MPIDI_CH3_PKT_LOCK_OP_ACK): \ flags_ = (pkt_).lock_op_ack.flags; \ break; \ default: \ MPIR_ERR_SETANDJUMP1(err_, MPI_ERR_OTHER, "**invalidpkt", "**invalidpkt %d", (pkt_).type); \ } \ } #define MPIDI_CH3_PKT_RMA_GET_OP(pkt_, op_, err_) \ { \ /* This macro returns op in RMA operation packets (ACC, GACC, \ FOP) */ \ err_ = MPI_SUCCESS; \ switch((pkt_).type) { \ case (MPIDI_CH3_PKT_ACCUMULATE): \ case (MPIDI_CH3_PKT_ACCUMULATE_IMMED): \ op_ = (pkt_).accum.op; \ break; \ case (MPIDI_CH3_PKT_GET_ACCUM): \ case (MPIDI_CH3_PKT_GET_ACCUM_IMMED): \ op_ = (pkt_).get_accum.op; \ break; \ case (MPIDI_CH3_PKT_FOP): \ case (MPIDI_CH3_PKT_FOP_IMMED): \ op_ = (pkt_).fop.op; \ break; \ default: \ MPIR_ERR_SETANDJUMP1(err_, MPI_ERR_OTHER, "**invalidpkt", "**invalidpkt %d", (pkt_).type); \ } \ } #define MPIDI_CH3_PKT_RMA_ERASE_FLAGS(pkt_, err_) \ { \ /* This macro erases flags in RMA operation packets (PUT, GET, \ ACC, GACC, FOP, CAS), RMA operation response packets \ (GET_RESP, GET_ACCUM_RESP, FOP_RESP, CAS_RESP), RMA control \ packets (UNLOCK) and RMA control response packets (LOCK_ACK, \ LOCK_OP_ACK) */ \ err_ = MPI_SUCCESS; \ switch((pkt_).type) { \ case (MPIDI_CH3_PKT_PUT): \ case (MPIDI_CH3_PKT_PUT_IMMED): \ (pkt_).put.flags = MPIDI_CH3_PKT_FLAG_NONE; \ break; \ case (MPIDI_CH3_PKT_GET): \ (pkt_).get.flags = MPIDI_CH3_PKT_FLAG_NONE; \ break; \ case (MPIDI_CH3_PKT_ACCUMULATE): \ case (MPIDI_CH3_PKT_ACCUMULATE_IMMED): \ (pkt_).accum.flags = MPIDI_CH3_PKT_FLAG_NONE; \ break; \ case (MPIDI_CH3_PKT_GET_ACCUM): \ case (MPIDI_CH3_PKT_GET_ACCUM_IMMED): \ (pkt_).get_accum.flags = MPIDI_CH3_PKT_FLAG_NONE; \ break; \ case (MPIDI_CH3_PKT_CAS_IMMED): \ (pkt_).cas.flags = MPIDI_CH3_PKT_FLAG_NONE; \ break; \ case (MPIDI_CH3_PKT_FOP): \ case (MPIDI_CH3_PKT_FOP_IMMED): \ (pkt_).fop.flags = MPIDI_CH3_PKT_FLAG_NONE; \ break; \ case (MPIDI_CH3_PKT_GET_RESP): \ case (MPIDI_CH3_PKT_GET_RESP_IMMED): \ (pkt_).get_resp.flags = MPIDI_CH3_PKT_FLAG_NONE; \ break; \ case (MPIDI_CH3_PKT_GET_ACCUM_RESP): \ case (MPIDI_CH3_PKT_GET_ACCUM_RESP_IMMED): \ (pkt_).get_accum_resp.flags = MPIDI_CH3_PKT_FLAG_NONE; \ break; \ case (MPIDI_CH3_PKT_FOP_RESP): \ case (MPIDI_CH3_PKT_FOP_RESP_IMMED): \ (pkt_).fop_resp.flags = MPIDI_CH3_PKT_FLAG_NONE; \ break; \ case (MPIDI_CH3_PKT_CAS_RESP_IMMED): \ (pkt_).cas_resp.flags = MPIDI_CH3_PKT_FLAG_NONE; \ break; \ case (MPIDI_CH3_PKT_LOCK): \ (pkt_).lock.flags = MPIDI_CH3_PKT_FLAG_NONE; \ break; \ case (MPIDI_CH3_PKT_UNLOCK): \ (pkt_).unlock.flags = MPIDI_CH3_PKT_FLAG_NONE; \ break; \ case (MPIDI_CH3_PKT_LOCK_ACK): \ (pkt_).lock_ack.flags = MPIDI_CH3_PKT_FLAG_NONE; \ break; \ case (MPIDI_CH3_PKT_LOCK_OP_ACK): \ (pkt_).lock_op_ack.flags = MPIDI_CH3_PKT_FLAG_NONE; \ break; \ default: \ MPIR_ERR_SETANDJUMP1(err_, MPI_ERR_OTHER, "**invalidpkt", "**invalidpkt %d", (pkt_).type); \ } \ } #define MPIDI_CH3_PKT_RMA_GET_SOURCE_WIN_HANDLE(pkt_, win_hdl_, err_) \ { \ /* This macro returns source_win_handle in RMA operation \ packets (PUT, GET, ACC, GACC, CAS, FOP), RMA operation \ response packets (GET_RESP, GACC_RESP, CAS_RESP, FOP_RESP), \ RMA control packets (LOCK, UNLOCK, FLUSH), and RMA control \ response packets (LOCK_ACK, LOCK_OP_ACK, ACK). */ \ err_ = MPI_SUCCESS; \ switch((pkt_).type) { \ case (MPIDI_CH3_PKT_PUT): \ case (MPIDI_CH3_PKT_PUT_IMMED): \ win_hdl_ = (pkt_).put.source_win_handle; \ break; \ case (MPIDI_CH3_PKT_ACCUMULATE): \ case (MPIDI_CH3_PKT_ACCUMULATE_IMMED): \ win_hdl_ = (pkt_).accum.source_win_handle; \ break; \ case (MPIDI_CH3_PKT_LOCK): \ win_hdl_ = (pkt_).lock.source_win_handle; \ break; \ case (MPIDI_CH3_PKT_UNLOCK): \ win_hdl_ = (pkt_).unlock.source_win_handle; \ break; \ case (MPIDI_CH3_PKT_FLUSH): \ win_hdl_ = (pkt_).flush.source_win_handle; \ break; \ case (MPIDI_CH3_PKT_LOCK_ACK): \ win_hdl_ = (pkt_).lock_ack.source_win_handle; \ break; \ case (MPIDI_CH3_PKT_LOCK_OP_ACK): \ win_hdl_ = (pkt_).lock_op_ack.source_win_handle; \ break; \ case (MPIDI_CH3_PKT_ACK): \ win_hdl_ = (pkt_).ack.source_win_handle; \ break; \ default: \ MPIR_ERR_SETANDJUMP1(err_, MPI_ERR_OTHER, "**invalidpkt", "**invalidpkt %d", (pkt_).type); \ } \ } #define MPIDI_CH3_PKT_RMA_GET_TARGET_WIN_HANDLE(pkt_, win_hdl_, err_) \ { \ /* This macro returns target_win_handle in RMA operation \ packets (PUT, GET, ACC, GACC, CAS, FOP) and RMA control \ packets (LOCK, UNLOCK, FLUSH, DECR_AT_CNT) */ \ err_ = MPI_SUCCESS; \ switch((pkt_).type) { \ case (MPIDI_CH3_PKT_PUT): \ case (MPIDI_CH3_PKT_PUT_IMMED): \ win_hdl_ = (pkt_).put.target_win_handle; \ break; \ case (MPIDI_CH3_PKT_GET): \ win_hdl_ = (pkt_).get.target_win_handle; \ break; \ case (MPIDI_CH3_PKT_ACCUMULATE): \ case (MPIDI_CH3_PKT_ACCUMULATE_IMMED): \ win_hdl_ = (pkt_).accum.target_win_handle; \ break; \ case (MPIDI_CH3_PKT_GET_ACCUM): \ case (MPIDI_CH3_PKT_GET_ACCUM_IMMED): \ win_hdl_ = (pkt_).get_accum.target_win_handle; \ break; \ case (MPIDI_CH3_PKT_CAS_IMMED): \ win_hdl_ = (pkt_).cas.target_win_handle; \ break; \ case (MPIDI_CH3_PKT_FOP): \ case (MPIDI_CH3_PKT_FOP_IMMED): \ win_hdl_ = (pkt_).fop.target_win_handle; \ break; \ case (MPIDI_CH3_PKT_LOCK): \ win_hdl_ = (pkt_).lock.target_win_handle; \ break; \ case (MPIDI_CH3_PKT_UNLOCK): \ win_hdl_ = (pkt_).unlock.target_win_handle; \ break; \ case (MPIDI_CH3_PKT_FLUSH): \ win_hdl_ = (pkt_).flush.target_win_handle; \ break; \ case (MPIDI_CH3_PKT_DECR_AT_COUNTER): \ win_hdl_ = (pkt_).decr_at_cnt.target_win_handle; \ break; \ default: \ MPIR_ERR_SETANDJUMP1(err_, MPI_ERR_OTHER, "**invalidpkt", "**invalidpkt %d", (pkt_).type); \ } \ } #define MPIDI_CH3_PKT_RMA_SET_DATALOOP_SIZE(pkt_, dataloop_size_, err_) \ { \ /* This macro sets dataloop_size in RMA operation packets \ (PUT, GET, ACC, GACC) */ \ err_ = MPI_SUCCESS; \ switch((pkt_).type) { \ case (MPIDI_CH3_PKT_PUT): \ (pkt_).put.info.dataloop_size = (dataloop_size_); \ break; \ case (MPIDI_CH3_PKT_GET): \ (pkt_).get.info.dataloop_size = (dataloop_size_); \ break; \ case (MPIDI_CH3_PKT_ACCUMULATE): \ (pkt_).accum.info.dataloop_size = (dataloop_size_); \ break; \ case (MPIDI_CH3_PKT_GET_ACCUM): \ (pkt_).get_accum.info.dataloop_size = (dataloop_size_); \ break; \ default: \ MPIR_ERR_SETANDJUMP1(err_, MPI_ERR_OTHER, "**invalidpkt", "**invalidpkt %d", (pkt_).type); \ } \ } #define MPIDI_CH3_PKT_RMA_GET_REQUEST_HANDLE(pkt_, request_hdl_, err_) \ { \ err_ = MPI_SUCCESS; \ switch((pkt_).type) { \ case (MPIDI_CH3_PKT_GET): \ request_hdl_ = (pkt_).get.request_handle; \ break; \ case (MPIDI_CH3_PKT_GET_ACCUM): \ case (MPIDI_CH3_PKT_GET_ACCUM_IMMED): \ request_hdl_ = (pkt_).get_accum.request_handle; \ break; \ case (MPIDI_CH3_PKT_CAS_IMMED): \ request_hdl_ = (pkt_).cas.request_handle; \ break; \ case (MPIDI_CH3_PKT_FOP): \ case (MPIDI_CH3_PKT_FOP_IMMED): \ request_hdl_ = (pkt_).fop.request_handle; \ break; \ case (MPIDI_CH3_PKT_GET_RESP): \ case (MPIDI_CH3_PKT_GET_RESP_IMMED): \ request_hdl_ = (pkt_).get_resp.request_handle; \ break; \ case (MPIDI_CH3_PKT_GET_ACCUM_RESP): \ case (MPIDI_CH3_PKT_GET_ACCUM_RESP_IMMED): \ request_hdl_ = (pkt_).get_accum_resp.request_handle; \ break; \ case (MPIDI_CH3_PKT_FOP_RESP): \ case (MPIDI_CH3_PKT_FOP_RESP_IMMED): \ request_hdl_ = (pkt_).fop_resp.request_handle; \ break; \ case (MPIDI_CH3_PKT_CAS_RESP_IMMED): \ request_hdl_ = (pkt_).cas_resp.request_handle; \ break; \ case (MPIDI_CH3_PKT_LOCK): \ request_hdl_ = (pkt_).lock.request_handle; \ break; \ case (MPIDI_CH3_PKT_LOCK_ACK): \ request_hdl_ = (pkt_).lock_ack.request_handle; \ break; \ case (MPIDI_CH3_PKT_LOCK_OP_ACK): \ request_hdl_ = (pkt_).lock_op_ack.request_handle; \ break; \ default: \ MPIR_ERR_SETANDJUMP1(err_, MPI_ERR_OTHER, "**invalidpkt", "**invalidpkt %d", (pkt_).type); \ } \ } /* This macro judges if the RMA operation is a read operation, * which means, it will triffer the issuing of response data from * the target to the origin */ #define MPIDI_CH3I_RMA_PKT_IS_READ_OP(pkt_) \ ((pkt_).type == MPIDI_CH3_PKT_GET_ACCUM_IMMED || \ (pkt_).type == MPIDI_CH3_PKT_GET_ACCUM || \ (pkt_).type == MPIDI_CH3_PKT_FOP_IMMED || \ (pkt_).type == MPIDI_CH3_PKT_FOP || \ (pkt_).type == MPIDI_CH3_PKT_CAS_IMMED || \ (pkt_).type == MPIDI_CH3_PKT_GET) /* This macro judges if the RMA operation is a immed operation */ #define MPIDI_CH3I_RMA_PKT_IS_IMMED_OP(pkt_) \ ((pkt_).type == MPIDI_CH3_PKT_GET_ACCUM_IMMED || \ (pkt_).type == MPIDI_CH3_PKT_FOP_IMMED || \ (pkt_).type == MPIDI_CH3_PKT_CAS_IMMED || \ (pkt_).type == MPIDI_CH3_PKT_PUT_IMMED || \ (pkt_).type == MPIDI_CH3_PKT_ACCUMULATE_IMMED) typedef struct MPIDI_CH3_Pkt_put { MPIDI_CH3_Pkt_type_t type; MPIDI_CH3_Pkt_flags_t flags; void *addr; int count; MPI_Datatype datatype; MPI_Win target_win_handle; MPI_Win source_win_handle; union { int dataloop_size; char data[MPIDI_RMA_IMMED_BYTES]; } info; } MPIDI_CH3_Pkt_put_t; typedef struct MPIDI_CH3_Pkt_get { MPIDI_CH3_Pkt_type_t type; MPIDI_CH3_Pkt_flags_t flags; void *addr; int count; MPI_Datatype datatype; struct { int dataloop_size; /* for derived datatypes */ } info; MPI_Request request_handle; MPI_Win target_win_handle; } MPIDI_CH3_Pkt_get_t; typedef struct MPIDI_CH3_Pkt_get_resp { MPIDI_CH3_Pkt_type_t type; MPI_Request request_handle; /* followings are used to decrement ack_counter at origin */ int target_rank; MPIDI_CH3_Pkt_flags_t flags; /* Followings are to piggyback IMMED data */ struct { /* note that we use struct here in order * to consistently access data * by "pkt->info.data". */ char data[MPIDI_RMA_IMMED_BYTES]; } info; } MPIDI_CH3_Pkt_get_resp_t; typedef struct MPIDI_CH3_Pkt_accum { MPIDI_CH3_Pkt_type_t type; MPIDI_CH3_Pkt_flags_t flags; void *addr; int count; MPI_Datatype datatype; MPI_Op op; MPI_Win target_win_handle; MPI_Win source_win_handle; union { int dataloop_size; char data[MPIDI_RMA_IMMED_BYTES]; } info; } MPIDI_CH3_Pkt_accum_t; typedef struct MPIDI_CH3_Pkt_get_accum { MPIDI_CH3_Pkt_type_t type; MPIDI_CH3_Pkt_flags_t flags; MPI_Request request_handle; /* For get_accumulate response */ void *addr; int count; MPI_Datatype datatype; MPI_Op op; MPI_Win target_win_handle; union { int dataloop_size; char data[MPIDI_RMA_IMMED_BYTES]; } info; } MPIDI_CH3_Pkt_get_accum_t; typedef struct MPIDI_CH3_Pkt_get_accum_resp { MPIDI_CH3_Pkt_type_t type; MPI_Request request_handle; /* followings are used to decrement ack_counter at origin */ int target_rank; MPIDI_CH3_Pkt_flags_t flags; /* Followings are to piggyback IMMED data */ struct { /* note that we use struct here in order * to consistently access data * by "pkt->info.data". */ char data[MPIDI_RMA_IMMED_BYTES]; } info; } MPIDI_CH3_Pkt_get_accum_resp_t; typedef struct MPIDI_CH3_Pkt_cas { MPIDI_CH3_Pkt_type_t type; MPIDI_CH3_Pkt_flags_t flags; MPI_Datatype datatype; void *addr; MPI_Request request_handle; MPI_Win target_win_handle; MPIDI_CH3_CAS_Immed_u origin_data; MPIDI_CH3_CAS_Immed_u compare_data; } MPIDI_CH3_Pkt_cas_t; typedef struct MPIDI_CH3_Pkt_cas_resp { MPIDI_CH3_Pkt_type_t type; MPI_Request request_handle; struct { /* note that we use struct here in order * to consistently access data * by "pkt->info.data". */ MPIDI_CH3_CAS_Immed_u data; } info; /* followings are used to decrement ack_counter at orign */ int target_rank; MPIDI_CH3_Pkt_flags_t flags; } MPIDI_CH3_Pkt_cas_resp_t; typedef struct MPIDI_CH3_Pkt_fop { MPIDI_CH3_Pkt_type_t type; MPIDI_CH3_Pkt_flags_t flags; MPI_Datatype datatype; void *addr; MPI_Op op; MPI_Request request_handle; MPI_Win target_win_handle; struct { /* note that we use struct here in order * to consistently access data * by "pkt->info.data". */ char data[MPIDI_RMA_IMMED_BYTES]; } info; } MPIDI_CH3_Pkt_fop_t; typedef struct MPIDI_CH3_Pkt_fop_resp { MPIDI_CH3_Pkt_type_t type; MPI_Request request_handle; struct { /* note that we use struct here in order * to consistently access data * by "pkt->info.data". */ char data[MPIDI_RMA_IMMED_BYTES]; } info; /* followings are used to decrement ack_counter at orign */ int target_rank; MPIDI_CH3_Pkt_flags_t flags; } MPIDI_CH3_Pkt_fop_resp_t; typedef struct MPIDI_CH3_Pkt_lock { MPIDI_CH3_Pkt_type_t type; MPIDI_CH3_Pkt_flags_t flags; MPI_Win target_win_handle; /* Note that either source_win_handle * or request_handle will be used. Here * we need both of them because PUT/GET * may be converted to LOCK packet, * PUT has source_win_handle area and * GET has request_handle area. */ MPI_Win source_win_handle; MPI_Request request_handle; } MPIDI_CH3_Pkt_lock_t; typedef struct MPIDI_CH3_Pkt_unlock { MPIDI_CH3_Pkt_type_t type; MPI_Win target_win_handle; MPI_Win source_win_handle; MPIDI_CH3_Pkt_flags_t flags; } MPIDI_CH3_Pkt_unlock_t; typedef struct MPIDI_CH3_Pkt_flush { MPIDI_CH3_Pkt_type_t type; MPI_Win target_win_handle; MPI_Win source_win_handle; } MPIDI_CH3_Pkt_flush_t; typedef struct MPIDI_CH3_Pkt_lock_ack { MPIDI_CH3_Pkt_type_t type; MPIDI_CH3_Pkt_flags_t flags; /* note that either source_win_handle * or request_handle is used. */ MPI_Win source_win_handle; MPI_Request request_handle; int target_rank; } MPIDI_CH3_Pkt_lock_ack_t; typedef struct MPIDI_CH3_Pkt_lock_op_ack { MPIDI_CH3_Pkt_type_t type; MPIDI_CH3_Pkt_flags_t flags; /* note that either source_win_handle * or request_handle is used. */ MPI_Win source_win_handle; MPI_Request request_handle; int target_rank; } MPIDI_CH3_Pkt_lock_op_ack_t; /* This ACK packet is the acknowledgement * for FLUSH, UNLOCK and DECR_AT_COUNTER * packet */ typedef struct MPIDI_CH3_Pkt_ack { MPIDI_CH3_Pkt_type_t type; MPI_Win source_win_handle; int target_rank; MPIDI_CH3_Pkt_flags_t flags; } MPIDI_CH3_Pkt_ack_t; typedef struct MPIDI_CH3_Pkt_decr_at_counter { MPIDI_CH3_Pkt_type_t type; MPI_Win target_win_handle; MPI_Win source_win_handle; MPIDI_CH3_Pkt_flags_t flags; } MPIDI_CH3_Pkt_decr_at_counter_t; typedef struct MPIDI_CH3_Pkt_close { MPIDI_CH3_Pkt_type_t type; int ack; } MPIDI_CH3_Pkt_close_t; #ifndef MPIDI_CH3_HAS_NO_DYNAMIC_PROCESS /* packet types used in dynamic process connection. */ typedef struct MPIDI_CH3_Pkt_conn_ack { MPIDI_CH3_Pkt_type_t type; int ack; } MPIDI_CH3_Pkt_conn_ack_t; typedef MPIDI_CH3_Pkt_conn_ack_t MPIDI_CH3_Pkt_accept_ack_t; #endif /* end of MPIDI_CH3_HAS_NO_DYNAMIC_PROCESS */ # 857 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpkt.h" typedef struct MPIDI_CH3_Pkt_revoke { MPIDI_CH3_Pkt_type_t type; MPIR_Context_id_t revoked_comm; } MPIDI_CH3_Pkt_revoke_t; typedef union MPIDI_CH3_Pkt { MPIDI_CH3_Pkt_type_t type; MPIDI_CH3_Pkt_eager_send_t eager_send; #if defined(USE_EAGER_SHORT) MPIDI_CH3_Pkt_eagershort_send_t eagershort_send; #endif /* defined(USE_EAGER_SHORT) */ # 869 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpkt.h" MPIDI_CH3_Pkt_eager_sync_send_t eager_sync_send; MPIDI_CH3_Pkt_eager_sync_ack_t eager_sync_ack; MPIDI_CH3_Pkt_eager_send_t ready_send; MPIDI_CH3_Pkt_rndv_req_to_send_t rndv_req_to_send; MPIDI_CH3_Pkt_rndv_clr_to_send_t rndv_clr_to_send; MPIDI_CH3_Pkt_rndv_send_t rndv_send; MPIDI_CH3_Pkt_cancel_send_req_t cancel_send_req; MPIDI_CH3_Pkt_cancel_send_resp_t cancel_send_resp; MPIDI_CH3_Pkt_put_t put; MPIDI_CH3_Pkt_get_t get; MPIDI_CH3_Pkt_get_resp_t get_resp; MPIDI_CH3_Pkt_accum_t accum; MPIDI_CH3_Pkt_get_accum_t get_accum; MPIDI_CH3_Pkt_lock_t lock; MPIDI_CH3_Pkt_lock_ack_t lock_ack; MPIDI_CH3_Pkt_lock_op_ack_t lock_op_ack; MPIDI_CH3_Pkt_unlock_t unlock; MPIDI_CH3_Pkt_flush_t flush; MPIDI_CH3_Pkt_ack_t ack; MPIDI_CH3_Pkt_decr_at_counter_t decr_at_cnt; MPIDI_CH3_Pkt_close_t close; #ifndef MPIDI_CH3_HAS_NO_DYNAMIC_PROCESS MPIDI_CH3_Pkt_conn_ack_t conn_ack; MPIDI_CH3_Pkt_accept_ack_t accept_ack; #endif # 894 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpkt.h" MPIDI_CH3_Pkt_cas_t cas; MPIDI_CH3_Pkt_cas_resp_t cas_resp; MPIDI_CH3_Pkt_fop_t fop; MPIDI_CH3_Pkt_fop_resp_t fop_resp; MPIDI_CH3_Pkt_get_accum_resp_t get_accum_resp; MPIDI_CH3_Pkt_revoke_t revoke; #if defined(MPIDI_CH3_PKT_DECL) MPIDI_CH3_PKT_DECL #endif # 903 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpkt.h" } MPIDI_CH3_Pkt_t; /* Extended header packet types */ /* to send derived datatype across in RMA ops */ typedef struct MPIDI_RMA_dtype_info { /* for derived datatypes */ int is_contig; MPI_Aint max_contig_blocks; MPI_Aint size; MPI_Aint extent; MPI_Aint dataloop_size; /* not needed because this info is sent in * packet header. remove it after lock/unlock * is implemented in the device */ void *dataloop; /* pointer needed to update pointers * within dataloop on remote side */ int dataloop_depth; int basic_type; MPI_Aint ub, lb, true_ub, true_lb; int has_sticky_ub, has_sticky_lb; } MPIDI_RMA_dtype_info; typedef struct MPIDI_CH3_Ext_pkt_stream { MPI_Aint stream_offset; } MPIDI_CH3_Ext_pkt_stream_t; typedef struct MPIDI_CH3_Ext_pkt_derived { MPIDI_RMA_dtype_info dtype_info; /* Follow with variable-length dataloop. * On origin we allocate a large buffer including * this header and the dataloop; on target we use * separate buffer to receive dataloop in order * to avoid extra copy.*/ } MPIDI_CH3_Ext_pkt_derived_t; typedef struct MPIDI_CH3_Ext_pkt_stream_derived { MPI_Aint stream_offset; MPIDI_RMA_dtype_info dtype_info; /* follow with variable-length dataloop. */ } MPIDI_CH3_Ext_pkt_stream_derived_t; /* Note that since ACC and GET_ACC contain the same extended attributes, * we use generic routines for them in some places (see below). * If we add OP-specific attribute in future, we should handle them separately. * 1. origin issuing function * 2. target packet handler * 3. target data receive complete handler. */ typedef MPIDI_CH3_Ext_pkt_stream_t MPIDI_CH3_Ext_pkt_accum_stream_t; typedef MPIDI_CH3_Ext_pkt_derived_t MPIDI_CH3_Ext_pkt_accum_derived_t; typedef MPIDI_CH3_Ext_pkt_stream_derived_t MPIDI_CH3_Ext_pkt_accum_stream_derived_t; typedef MPIDI_CH3_Ext_pkt_stream_t MPIDI_CH3_Ext_pkt_get_accum_stream_t; typedef MPIDI_CH3_Ext_pkt_derived_t MPIDI_CH3_Ext_pkt_get_accum_derived_t; typedef MPIDI_CH3_Ext_pkt_stream_derived_t MPIDI_CH3_Ext_pkt_get_accum_stream_derived_t; typedef MPIDI_CH3_Ext_pkt_derived_t MPIDI_CH3_Ext_pkt_put_derived_t; typedef MPIDI_CH3_Ext_pkt_derived_t MPIDI_CH3_Ext_pkt_get_derived_t; #if defined(MPID_USE_SEQUENCE_NUMBERS) typedef struct MPIDI_CH3_Pkt_send_container { MPIDI_CH3_Pkt_send_t pkt; struct MPIDI_CH3_Pkt_send_container_s *next; } MPIDI_CH3_Pkt_send_container_t; #endif # 966 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpkt.h" #endif # 968 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpkt.h" # 119 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" 2 /* * THIS IS OBSOLETE AND UNUSED, BUT RETAINED FOR ITS DESCRIPTIONS OF THE * VARIOUS STATES. Note that this is not entirely accurate, as the * CA_COMPLETE state could depend on the packet type (e.g., for RMA * operations). * * MPIDI_CA_t * * An enumeration of the actions to perform when the requested I/O operation * has completed. * * MPIDI_CH3_CA_COMPLETE - The last operation for this request has completed. * The completion counter should be decremented. If * it has reached zero, then the request should be released by calling * MPIR_Request_free(). * * MPIDI_CH3_CA_UNPACK_UEBUF_AND_COMPLETE - This is a special case of the * MPIDI_CH3_CA_COMPLETE. The data for an unexpected * eager messaage has been stored into a temporary buffer and needs to be * copied/unpacked into the user buffer before the * completion counter can be decremented, etc. * * MPIDI_CH3_CA_UNPACK_SRBUF_AND_COMPLETE - This is a special case of the * MPIDI_CH3_CA_COMPLETE. The data from the completing * read has been stored into a temporary send/receive buffer and needs to be * copied/unpacked into the user buffer before the * completion counter can be decremented, etc. * * MPIDI_CH3_CA_RELOAD_IOV - This request contains more segments of data than * the IOV or buffer space allow. Since the * previously request operation has completed, the IOV in the request should * be reload at this time. * * MPIDI_CH3_CA_UNPACK_SRBUF_AND_RELOAD_IOV - This is a special case of the * MPIDI_CH3_CA_RELOAD_IOV. The data from the * completing read operation has been stored into a temporary send/receive * buffer and needs to be copied/unpacked into the user * buffer before the IOV is reloaded. * * MPIDI_CH3_CA_END_CH3 - This not a real action, but rather a marker. * All actions numerically less than MPID_CA_END are defined * by channel device. Any actions numerically greater than MPIDI_CA_END are * internal to the channel instance and must be handled * by the channel instance. */ #define MPID_Comm_create_hook(comm_) MPIDI_CH3I_Comm_create_hook(comm_) #define MPID_Comm_free_hook(comm_) MPIDI_CH3I_Comm_destroy_hook(comm_) #ifndef HAVE_MPIDI_VCRT #define HAVE_MPIDI_VCRT typedef struct MPIDI_VC * MPIDI_VCR; #endif # 173 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" typedef struct MPIDI_CH3I_comm { int eager_max_msg_sz; /* comm-wide eager/rendezvous message threshold */ int anysource_enabled; /* TRUE iff this anysource recvs can be posted on this communicator */ int last_ack_rank; /* The rank of the last acknowledged failure */ int waiting_for_revoke; /* The number of other processes from which we are * waiting for a revoke message before we can release * the context id */ int is_disconnected; /* set to TRUE if this communicator was * disconnected as a part of * MPI_COMM_DISCONNECT; FALSE otherwise. */ struct MPIDI_VCRT *vcrt; /* virtual connecton reference table */ struct MPIDI_VCRT *local_vcrt; /* local virtual connecton reference table */ struct MPIR_Comm *next; /* next pointer for list of communicators */ struct MPIR_Comm *prev; /* prev pointer for list of communicators */ MPIDI_CH3I_CH_comm_t ch; } MPIDI_CH3I_comm_t; #define MPID_DEV_COMM_DECL MPIDI_CH3I_comm_t dev; #ifndef DEFINED_REQ #define DEFINED_REQ #if defined(MPID_USE_SEQUENCE_NUMBERS) # define MPIDI_REQUEST_SEQNUM \ MPID_Seqnum_t seqnum; #else # 204 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" # define MPIDI_REQUEST_SEQNUM #endif # 206 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" /* Here we add RMA sync types to specify types * of synchronizations the origin is going to * perform to the target. */ /* There are four kinds of synchronizations: NONE, * FLUSH_LOCAL, FLUSH, UNLOCK. * (1) NONE means there is no special synchronization, * origin just issues as many operations as it can, * excluding the last operation which is a piggyback * candidate; * (2) FLUSH_LOCAL means origin wants to do a * FLUSH_LOCAL sync and issues out all pending * operations including the piggyback candidate; * (3) FLUSH means origin wants to do a FLUSH sync * and issues out all pending operations including * the last op piggybacked with a FLUSH flag to * detect remote completion; * (4) UNLOCK means origin issues all pending operations * incuding the last op piggybacked with an UNLOCK * flag to release the lock on target and detect remote * completion. * Note that FLUSH_LOCAL is a superset of NONE, FLUSH * is a superset of FLUSH_LOCAL, and UNLOCK is a superset * of FLUSH. */ /* We start with an arbitrarily chosen number (58), to help with * debugging when a sync type is not initialized or wrongly * initialized. */ enum MPIDI_RMA_sync_types { MPIDI_RMA_SYNC_NONE = 58, MPIDI_RMA_SYNC_FLUSH_LOCAL, MPIDI_RMA_SYNC_FLUSH, MPIDI_RMA_SYNC_UNLOCK }; /* We start with an arbitrarily chosen number (63), to help with * debugging when a window state is not initialized or wrongly * initialized. */ enum MPIDI_RMA_states { /* window-wide states */ MPIDI_RMA_NONE = 63, MPIDI_RMA_FENCE_ISSUED, /* access / exposure */ MPIDI_RMA_FENCE_GRANTED, /* access / exposure */ MPIDI_RMA_PSCW_ISSUED, /* access */ MPIDI_RMA_PSCW_GRANTED, /* access */ MPIDI_RMA_PSCW_EXPO, /* exposure */ MPIDI_RMA_PER_TARGET, /* access */ MPIDI_RMA_LOCK_ALL_CALLED, /* access */ MPIDI_RMA_LOCK_ALL_ISSUED, /* access */ MPIDI_RMA_LOCK_ALL_GRANTED, /* access */ /* target-specific states */ MPIDI_RMA_LOCK_CALLED, /* access */ MPIDI_RMA_LOCK_ISSUED, /* access */ MPIDI_RMA_LOCK_GRANTED, /* access */ }; /* We start with an arbitrarily chosen number (19), to help with * debugging when a lock state is not initialized or wrongly * initialized. */ enum MPIDI_CH3_Lock_states { MPIDI_CH3_WIN_LOCK_NONE = 19, MPIDI_CH3_WIN_LOCK_CALLED, MPIDI_CH3_WIN_LOCK_REQUESTED, MPIDI_CH3_WIN_LOCK_GRANTED, MPIDI_CH3_WIN_LOCK_FLUSH }; enum MPIDI_Win_info_arv_vals_accumulate_ordering { MPIDI_ACC_ORDER_RAR = 1, MPIDI_ACC_ORDER_RAW = 2, MPIDI_ACC_ORDER_WAR = 4, MPIDI_ACC_ORDER_WAW = 8 }; /* We start with an arbitrarily chosen number (11), to help with * debugging when an window info is not initialized or wrongly * initialized. */ enum MPIDI_Win_info_arg_vals_accumulate_ops { MPIDI_ACC_OPS_SAME_OP = 11, MPIDI_ACC_OPS_SAME_OP_NO_OP }; struct MPIDI_Win_info_args { int no_locks; /* valid flavor = all */ int accumulate_ordering; int accumulate_ops; int same_size; /* valid flavor = allocate */ int alloc_shared_noncontig; /* valid flavor = allocate shared */ int alloc_shm; /* valid flavor = allocate */ }; struct MPIDI_RMA_op; /* forward decl from mpidrma.h */ typedef struct MPIDI_Win_basic_info { void *base_addr; MPI_Aint size; int disp_unit; MPI_Win win_handle; } MPIDI_Win_basic_info_t; #define MPIDI_DEV_WIN_DECL \ volatile int at_completion_counter; /* completion counter for operations \ targeting this window */ \ void **shm_base_addrs; /* shared memory windows -- array of base \ addresses of the windows of all processes \ in this process's address space */ \ MPIDI_Win_basic_info_t *basic_info_table; \ volatile int current_lock_type; /* current lock type on this window (as target) \ * (none, shared, exclusive) */ \ volatile int shared_lock_ref_cnt; \ struct MPIDI_RMA_Target_lock_entry volatile *target_lock_queue_head; /* list of unsatisfied locks */ \ struct MPIDI_Win_info_args info_args; \ int shm_allocated; /* flag: TRUE iff this window has a shared memory \ region associated with it */ \ struct MPIDI_RMA_Op *op_pool_start; /* start pointer used for freeing */\ struct MPIDI_RMA_Op *op_pool_head; /* pool of operations */ \ struct MPIDI_RMA_Target *target_pool_start; /* start pointer used for freeing */\ struct MPIDI_RMA_Target *target_pool_head; /* pool of targets */ \ struct MPIDI_RMA_Slot *slots; \ int num_slots; \ struct { \ enum MPIDI_RMA_states access_state; \ enum MPIDI_RMA_states exposure_state; \ } states; \ int num_targets_with_pending_net_ops; /* keep track of number of \ targets that has non-empty \ net pending op list. */ \ int *start_ranks_in_win_grp; \ int start_grp_size; \ int lock_all_assert; \ int lock_epoch_count; /* number of lock access epoch on this process */ \ int outstanding_locks; /* when issuing multiple lock requests in \ MPI_WIN_LOCK_ALL, this counter keeps track \ of number of locks not being granted yet. */ \ struct MPIDI_RMA_Target_lock_entry *target_lock_entry_pool_start; \ struct MPIDI_RMA_Target_lock_entry *target_lock_entry_pool_head; \ int current_target_lock_data_bytes; \ int sync_request_cnt; /* This counter tracks number of \ incomplete sync requests (used in \ Win_fence and PSCW). */ \ int active; /* specify if this window is active or not */ \ struct MPIR_Win *prev; \ struct MPIR_Win *next; \ int outstanding_acks; /* keep track of # of outstanding ACKs window \ wide. */ \ extern struct MPIR_Win *MPIDI_RMA_Win_active_list_head, *MPIDI_RMA_Win_inactive_list_head; extern int MPIDI_CH3I_RMA_Active_req_cnt; extern int MPIDI_CH3I_RMA_Progress_hook_id; #ifdef MPIDI_CH3_WIN_DECL #define MPID_DEV_WIN_DECL \ MPIDI_DEV_WIN_DECL \ MPIDI_CH3_WIN_DECL #else # 364 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" #define MPID_DEV_WIN_DECL \ MPIDI_DEV_WIN_DECL #endif # 367 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" typedef struct MPIDI_Request { MPIDI_Message_match match; MPIDI_Message_match mask; /* user_buf, user_count, and datatype needed to process rendezvous messages. */ void *user_buf; MPI_Aint user_count; MPI_Datatype datatype; int drop_data; /* segment, segment_first, and segment_size are used when processing non-contiguous datatypes */ /* MPIDU_Segment segment; */ struct MPIDU_Segment *segment_ptr; intptr_t segment_first; intptr_t segment_size; /* Pointer to datatype for reference counting purposes */ struct MPIDU_Datatype* datatype_ptr; /* iov and iov_count define the data to be transferred/received. iov_offset points to the current head element in the IOV */ MPL_IOV iov[MPL_IOV_LIMIT]; int iov_count; size_t iov_offset; /* OnDataAvail is the action to take when data is now available. For example, when an operation described by an iov has completed. This replaces the MPIDI_CA_t (completion action) field used through MPICH 1.0.4. */ int (*OnDataAvail)( struct MPIDI_VC *, struct MPIR_Request *, int * ); /* OnFinal is used in the following case: OnDataAvail is set to a function, and that function has processed all of the data. At that point, the OnDataAvail function can reset OnDataAvail to OnFinal. This is normally used when processing non-contiguous data, where there is one more action to take (such as a get-response) when processing of the non-contiguous data completes. This value need not be initialized unless OnDataAvail is set to a non-null value (and then only in certain cases) */ int (*OnFinal)( struct MPIDI_VC *, struct MPIR_Request *, int * ); /* tmpbuf and tmpbuf_sz describe temporary storage used for things like unexpected eager messages and packing/unpacking buffers. tmpuf_off is the current offset into the temporary buffer. */ void *tmpbuf; intptr_t tmpbuf_off; intptr_t tmpbuf_sz; intptr_t recv_data_sz; MPI_Request sender_req_id; unsigned int state; int cancel_pending; /* This field seems to be used for unexpected messages. Unexpected messages * need to go through two steps: matching and receiving the data. These * steps could happen in either order though, so this field is initialized * to 2. It is decremented when the request is matched and also when all of * the data is available. Once it reaches 0 it should be safe to copy from * the temporary buffer (if there is one) to the user buffer. This field is * related to, but not quite the same thing as the completion counter (cc). */ /* MT access should be controlled by the MSGQUEUE CS when the req is still * unexpected, exclusive access otherwise */ int recv_pending_count; /* The next several fields are used to hold state for ongoing RMA operations */ MPI_Op op; /* For accumulate, since data is first read into a tmp_buf */ void *real_user_buf; /* For derived datatypes at target. */ void *dataloop; /* req. handle needed to implement derived datatype gets. * It also used for remembering user request of request-based RMA operations. */ MPI_Request request_handle; MPI_Win target_win_handle; MPI_Win source_win_handle; MPIDI_CH3_Pkt_flags_t flags; /* flags that were included in the original RMA packet header */ struct MPIDI_RMA_Target_lock_entry *target_lock_queue_entry; MPI_Request resp_request_handle; /* Handle for get_accumulate response */ void *ext_hdr_ptr; /* Pointer to extended packet header. * It is allocated in RMA issuing/pkt_handler functions, * and freed when release request. */ intptr_t ext_hdr_sz; struct MPIDI_RMA_Target *rma_target_ptr; MPIDI_REQUEST_SEQNUM /* Occasionally, when a message cannot be sent, we need to cache the data that is required. The fields above (such as userbuf and tmpbuf) are used for the message data. However, we also need space for the message packet. This field provide a generic location for that. Question: do we want to make this a link instead of reserving a fixed spot in the request? */ MPIDI_CH3_Pkt_t pending_pkt; /* partner send request when a receive request is created by the * sender (only used for self send) */ struct MPIR_Request * partner_request; struct MPIR_Request * next; } MPIDI_Request; #define MPIR_REQUEST_DECL MPIDI_Request dev; #if defined(MPIDI_CH3_REQUEST_DECL) #define MPID_DEV_REQUEST_DECL \ MPIR_REQUEST_DECL \ MPIDI_CH3_REQUEST_DECL #else # 480 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" #define MPID_DEV_REQUEST_DECL \ MPIR_REQUEST_DECL #endif # 483 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" #ifdef MPIDI_CH3_REQUEST_KIND_DECL #define MPID_REQUEST_KIND_DECL MPIDI_CH3_REQUEST_KIND_DECL #endif # 487 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" #endif # 489 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" /* FIXME: This ifndef test is a temp until mpidpre is cleaned of all items that do not belong (e.g., all items not needed by the top layers of MPICH) */ /* FIXME: The progress routines will be made into ch3-common definitions, not channel specific. Channels that need more will need to piggy back or otherwise override */ typedef struct { #if defined(MPIDI_CH3_PROGRESS_STATE_DECL) MPIDI_CH3_PROGRESS_STATE_DECL #else # 500 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" int foo; #endif # 502 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" } MPID_Progress_state; #define MPID_DEV_GPID_DECL int gpid[2]; /* Tell initthread to prepare a private comm_world */ #define MPID_NEEDS_ICOMM_WORLD int MPID_Init( int *argc_p, char ***argv_p, int requested, int *provided, int *has_args, int *has_env ); int MPID_InitCompleted( void ); int MPID_Finalize(void); int MPID_Abort( MPIR_Comm *comm, int mpi_errno, int exit_code, const char *error_msg ); int MPID_Open_port(MPIR_Info *, char *); int MPID_Close_port(const char *); int MPID_Comm_accept(const char *, MPIR_Info *, int, MPIR_Comm *, MPIR_Comm **); int MPID_Comm_connect(const char *, MPIR_Info *, int, MPIR_Comm *, MPIR_Comm **); int MPID_Comm_disconnect(MPIR_Comm *); int MPID_Comm_spawn_multiple(int, char *[], char **[], const int [], MPIR_Info* [], int, MPIR_Comm *, MPIR_Comm **, int []); int MPID_Comm_failure_ack(MPIR_Comm *comm); int MPID_Comm_failure_get_acked(MPIR_Comm *comm, MPIR_Group **failed_group_ptr); int MPID_Comm_get_all_failed_procs(MPIR_Comm *comm_ptr, MPIR_Group **failed_group, int tag); int MPID_Comm_revoke(MPIR_Comm *comm, int is_remote); int MPID_Send( const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm, int context_offset, MPIR_Request **request ); int MPID_Rsend( const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm, int context_offset, MPIR_Request **request ); int MPID_Ssend( const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm, int context_offset, MPIR_Request **request ); int MPID_tBsend( const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm, int context_offset ); int MPID_Isend( const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm, int context_offset, MPIR_Request **request ); int MPID_Irsend( const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm, int context_offset, MPIR_Request **request ); int MPID_Issend( const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm, int context_offset, MPIR_Request **request ); int MPID_Recv( void *buf, MPI_Aint count, MPI_Datatype datatype, int source, int tag, MPIR_Comm *comm, int context_offset, MPI_Status *status, MPIR_Request **request ); int MPID_Irecv( void *buf, MPI_Aint count, MPI_Datatype datatype, int source, int tag, MPIR_Comm *comm, int context_offset, MPIR_Request **request ); int MPID_Send_init( const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm, int context_offset, MPIR_Request **request ); int MPID_Bsend_init(const void *, int, MPI_Datatype, int, int, MPIR_Comm *, int, MPIR_Request **); int MPID_Rsend_init( const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm, int context_offset, MPIR_Request **request ); int MPID_Ssend_init( const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm, int context_offset, MPIR_Request **request ); int MPID_Recv_init( void *buf, int count, MPI_Datatype datatype, int source, int tag, MPIR_Comm *comm, int context_offset, MPIR_Request **request ); int MPID_Startall(int count, MPIR_Request *requests[]); int MPID_Probe(int, int, MPIR_Comm *, int, MPI_Status *); int MPID_Iprobe(int, int, MPIR_Comm *, int, int *, MPI_Status *); int MPID_Mprobe(int source, int tag, MPIR_Comm *comm, int context_offset, MPIR_Request **message, MPI_Status *status); int MPID_Improbe(int source, int tag, MPIR_Comm *comm, int context_offset, int *flag, MPIR_Request **message, MPI_Status *status); int MPID_Imrecv(void *buf, int count, MPI_Datatype datatype, MPIR_Request *message, MPIR_Request **rreqp); int MPID_Mrecv(void *buf, int count, MPI_Datatype datatype, MPIR_Request *message, MPI_Status *status); int MPID_Cancel_send(MPIR_Request *); int MPID_Cancel_recv(MPIR_Request *); int MPID_Comm_AS_enabled(MPIR_Comm *); int MPID_Request_is_anysource(MPIR_Request *); MPI_Aint MPID_Aint_add(MPI_Aint base, MPI_Aint disp); MPI_Aint MPID_Aint_diff(MPI_Aint addr1, MPI_Aint addr2); int MPID_Win_create(void *, MPI_Aint, int, MPIR_Info *, MPIR_Comm *, MPIR_Win **); int MPID_Win_free(MPIR_Win **); int MPID_Put(const void *, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype, MPIR_Win *); int MPID_Get(void *, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype, MPIR_Win *); int MPID_Accumulate(const void *, int, MPI_Datatype, int, MPI_Aint, int, MPI_Datatype, MPI_Op, MPIR_Win *); int MPID_Win_fence(int, MPIR_Win *); int MPID_Win_post(MPIR_Group *group_ptr, int assert, MPIR_Win *win_ptr); int MPID_Win_start(MPIR_Group *group_ptr, int assert, MPIR_Win *win_ptr); int MPID_Win_test(MPIR_Win *win_ptr, int *flag); int MPID_Win_wait(MPIR_Win *win_ptr); int MPID_Win_complete(MPIR_Win *win_ptr); int MPID_Win_lock(int lock_type, int dest, int assert, MPIR_Win *win_ptr); int MPID_Win_unlock(int dest, MPIR_Win *win_ptr); int MPID_Win_allocate(MPI_Aint size, int disp_unit, MPIR_Info *info, MPIR_Comm *comm, void *baseptr, MPIR_Win **win); int MPID_Win_allocate_shared(MPI_Aint size, int disp_unit, MPIR_Info *info_ptr, MPIR_Comm *comm_ptr, void *base_ptr, MPIR_Win **win_ptr); int MPID_Win_shared_query(MPIR_Win *win, int rank, MPI_Aint *size, int *disp_unit, void *baseptr); int MPID_Win_create_dynamic(MPIR_Info *info, MPIR_Comm *comm, MPIR_Win **win); int MPID_Win_attach(MPIR_Win *win, void *base, MPI_Aint size); int MPID_Win_detach(MPIR_Win *win, const void *base); int MPID_Win_get_info(MPIR_Win *win, MPIR_Info **info_used); int MPID_Win_set_info(MPIR_Win *win, MPIR_Info *info); int MPID_Get_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPIR_Win *win); int MPID_Fetch_and_op(const void *origin_addr, void *result_addr, MPI_Datatype datatype, int target_rank, MPI_Aint target_disp, MPI_Op op, MPIR_Win *win); int MPID_Compare_and_swap(const void *origin_addr, const void *compare_addr, void *result_addr, MPI_Datatype datatype, int target_rank, MPI_Aint target_disp, MPIR_Win *win); int MPID_Rput(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPIR_Win *win, MPIR_Request **request); int MPID_Rget(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPIR_Win *win, MPIR_Request **request); int MPID_Raccumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPIR_Win *win, MPIR_Request **request); int MPID_Rget_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPIR_Win *win, MPIR_Request **request); int MPID_Win_lock_all(int assert, MPIR_Win *win); int MPID_Win_unlock_all(MPIR_Win *win); int MPID_Win_flush(int rank, MPIR_Win *win); int MPID_Win_flush_all(MPIR_Win *win); int MPID_Win_flush_local(int rank, MPIR_Win *win); int MPID_Win_flush_local_all(MPIR_Win *win); int MPID_Win_sync(MPIR_Win *win); void MPID_Progress_start(MPID_Progress_state * state); int MPID_Progress_wait(MPID_Progress_state * state); void MPID_Progress_end(MPID_Progress_state * stae); int MPID_Progress_test(void); int MPID_Progress_poke(void); int MPID_Get_processor_name( char *name, int namelen, int *resultlen); int MPID_Get_universe_size(int * universe_size); int MPID_Comm_get_lpid(MPIR_Comm *comm_ptr, int idx, int * lpid_ptr, MPL_bool is_remote); void MPID_Request_init(MPIR_Request *); void MPID_Request_finalize(MPIR_Request *); int MPID_Request_complete(MPIR_Request *); void *MPID_Alloc_mem( size_t size, MPIR_Info *info ); int MPID_Free_mem( void *ptr ); /* Prototypes and definitions for the node ID code. This is used to support hierarchical collectives in a (mostly) device-independent way. */ #if defined(MPID_USE_NODE_IDS) /* MPID_Node_id_t is a signed integer type defined by the device in mpidpre.h. */ int MPID_Get_node_id(MPIR_Comm *comm, int rank, MPID_Node_id_t *id_p); int MPID_Get_max_node_id(MPIR_Comm *comm, MPID_Node_id_t *max_id_p); #endif # 710 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" #endif /* !defined(MPIDPRE_H_INCLUDED) */ # 712 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpre.h" # 207 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 /*****************************************************************************/ /********************* PART 5: DEVICE DEPENDENT HEADERS **********************/ /*****************************************************************************/ #if 0 /* expanded by -frewrite-includes */ #include "mpir_thread.h" #endif /* expanded by -frewrite-includes */ # 213 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_thread.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPIR_THREAD_H_INCLUDED #define MPIR_THREAD_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpichconfconst.h" #endif /* expanded by -frewrite-includes */ # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_thread.h" # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_thread.h" #if 0 /* expanded by -frewrite-includes */ #include "mpichconf.h" #endif /* expanded by -frewrite-includes */ # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_thread.h" # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_thread.h" typedef struct { int thread_provided; /* Provided level of thread support */ /* This is a special case for is_thread_main, which must be * implemented even if MPICH itself is single threaded. */ #if MPICH_THREAD_LEVEL >= MPI_THREAD_SERIALIZED MPID_Thread_id_t master_thread; /* Thread that started MPI */ #endif # 22 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_thread.h" #if defined MPICH_IS_THREADED int isThreaded; /* Set to true if user requested * THREAD_MULTIPLE */ #endif /* MPICH_IS_THREADED */ # 27 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_thread.h" } MPIR_Thread_info_t; extern MPIR_Thread_info_t MPIR_ThreadInfo; /* ------------------------------------------------------------------------- */ /* thread-local storage macros */ /* arbitrary, just needed to avoid cleaning up heap allocated memory at thread * destruction time */ #define MPIR_STRERROR_BUF_SIZE (1024) /* This structure contains all thread-local variables and will be zeroed at * allocation time. * * Note that any pointers to dynamically allocated memory stored in this * structure must be externally cleaned up. * */ typedef struct { int op_errno; /* For errors in predefined MPI_Ops */ /* error string storage for MPIR_Strerror */ char strerrbuf[MPIR_STRERROR_BUF_SIZE]; #if (MPICH_THREAD_LEVEL == MPI_THREAD_MULTIPLE) int lock_depth; #endif # 51 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_thread.h" } MPIR_Per_thread_t; #if defined(MPICH_IS_THREADED) && defined(MPL_TLS_SPECIFIER) extern MPL_TLS_SPECIFIER MPIR_Per_thread_t MPIR_Per_thread; #else # 56 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_thread.h" extern MPIR_Per_thread_t MPIR_Per_thread; #endif # 58 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_thread.h" extern MPID_Thread_tls_t MPIR_Per_thread_key; #if defined(MPICH_IS_THREADED) #define MPIR_THREAD_CHECK_BEGIN if (MPIR_ThreadInfo.isThreaded) { #define MPIR_THREAD_CHECK_END } #else # 65 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_thread.h" #define MPIR_THREAD_CHECK_BEGIN #define MPIR_THREAD_CHECK_END #endif /* MPICH_IS_THREADED */ # 68 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_thread.h" #if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__GLOBAL || \ MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__POBJ extern MPID_Thread_mutex_t MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX; #endif # 73 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_thread.h" #if MPICH_THREAD_GRANULARITY == MPICH_THREAD_GRANULARITY__POBJ extern MPID_Thread_mutex_t MPIR_THREAD_POBJ_HANDLE_MUTEX; extern MPID_Thread_mutex_t MPIR_THREAD_POBJ_MSGQ_MUTEX; extern MPID_Thread_mutex_t MPIR_THREAD_POBJ_COMPLETION_MUTEX; extern MPID_Thread_mutex_t MPIR_THREAD_POBJ_CTX_MUTEX; extern MPID_Thread_mutex_t MPIR_THREAD_POBJ_PMI_MUTEX; #define MPIR_THREAD_POBJ_COMM_MUTEX(_comm_ptr) _comm_ptr->mutex #define MPIR_THREAD_POBJ_WIN_MUTEX(_win_ptr) _win_ptr->mutex #endif # 84 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_thread.h" #endif /* MPIR_THREAD_H_INCLUDED */ # 86 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_thread.h" # 214 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_attr.h" #endif /* expanded by -frewrite-includes */ # 214 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_attr.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPIR_ATTR_H_INCLUDED #define MPIR_ATTR_H_INCLUDED /* Because Comm, Datatype, and File handles are all ints, and because attributes are otherwise identical between the three types, we only store generic copy and delete functions. This allows us to use common code for the attribute set, delete, and dup functions */ /*E copy_function - MPID Structure to hold an attribute copy function Notes: The appropriate element of this union is selected by using the language field of the 'keyval'. Because 'MPI_Comm', 'MPI_Win', and 'MPI_Datatype' are all 'int's in MPICH, we use a single C copy function rather than have separate ones for the Communicator, Window, and Datatype attributes. There are no corresponding typedefs for the Fortran functions. The F77 function corresponds to the Fortran 77 binding used in MPI-1 and the F90 function corresponds to the Fortran 90 binding used in MPI-2. Module: Attribute-DS E*/ int MPII_Attr_copy_c_proxy( MPI_Comm_copy_attr_function* user_function, int handle, int keyval, void* extra_state, MPIR_Attr_type attrib_type, void* attrib, void** attrib_copy, int* flag ); typedef struct copy_function { int (*C_CopyFunction)( int, int, void *, void *, void *, int * ); void (*F77_CopyFunction) ( MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint * ); void (*F90_CopyFunction) ( MPI_Fint *, MPI_Fint *, MPI_Aint *, MPI_Aint *, MPI_Aint *, MPI_Fint *, MPI_Fint * ); /* The generic lang-independent user_function and proxy will * replace the lang dependent copy funcs above * Currently the lang-indpendent funcs are used only for keyvals */ MPI_Comm_copy_attr_function *user_function; MPII_Attr_copy_proxy *proxy; /* The C++ function is the same as the C function */ } copy_function; /*E delete_function - MPID Structure to hold an attribute delete function Notes: The appropriate element of this union is selected by using the language field of the 'keyval'. Because 'MPI_Comm', 'MPI_Win', and 'MPI_Datatype' are all 'int's in MPICH, we use a single C delete function rather than have separate ones for the Communicator, Window, and Datatype attributes. There are no corresponding typedefs for the Fortran functions. The F77 function corresponds to the Fortran 77 binding used in MPI-1 and the F90 function corresponds to the Fortran 90 binding used in MPI-2. Module: Attribute-DS E*/ int MPII_Attr_delete_c_proxy( MPI_Comm_delete_attr_function* user_function, int handle, int keyval, MPIR_Attr_type attrib_type, void* attrib, void* extra_state ); typedef struct delete_function { int (*C_DeleteFunction) ( int, int, void *, void * ); void (*F77_DeleteFunction)( MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint * ); void (*F90_DeleteFunction)( MPI_Fint *, MPI_Fint *, MPI_Aint *, MPI_Aint *, MPI_Fint * ); /* The generic lang-independent user_function and proxy will * replace the lang dependent copy funcs above * Currently the lang-indpendent funcs are used only for keyvals */ MPI_Comm_delete_attr_function *user_function; MPII_Attr_delete_proxy *proxy; } delete_function; /*S MPII_Keyval - Structure of an MPID keyval Module: Attribute-DS S*/ typedef struct MPII_Keyval { MPIR_OBJECT_HEADER; /* adds handle and ref_count fields */ MPII_Object_kind kind; int was_freed; void *extra_state; copy_function copyfn; delete_function delfn; /* other, device-specific information */ #ifdef MPID_DEV_KEYVAL_DECL MPID_DEV_KEYVAL_DECL #endif # 122 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_attr.h" } MPII_Keyval; #define MPII_Keyval_add_ref( _keyval ) \ do { \ MPIR_Object_add_ref( _keyval ); \ } while(0) #define MPII_Keyval_release_ref( _keyval, _inuse ) \ do { \ MPIR_Object_release_ref( _keyval, _inuse ); \ } while(0) /* Attribute values in C/C++ are void * and in Fortran are ADDRESS_SIZED integers. Normally, these are the same size, but in at least one case, the address-sized integers was selected as longer than void * to work with the datatype code used in the I/O library. While this is really a limitation in the current Datatype implementation. */ #ifdef USE_AINT_FOR_ATTRVAL typedef MPI_Aint MPII_Attr_val_t; #else # 143 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_attr.h" typedef void * MPII_Attr_val_t; #endif # 145 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_attr.h" /* Attributes need no ref count or handle, but since we want to use the common block allocator for them, we must provide those elements */ /*S MPIR_Attribute - Structure of an MPID attribute Notes: Attributes don''t have 'ref_count's because they don''t have reference count semantics. That is, there are no shallow copies or duplicates of an attibute. An attribute is copied when the communicator that it is attached to is duplicated. Subsequent operations, such as 'MPI_Comm_attr_free', can change the attribute list for one of the communicators but not the other, making it impractical to keep the same list. (We could defer making the copy until the list is changed, but even then, there would be no reference count on the individual attributes.) A pointer to the keyval, rather than the (integer) keyval itself is used since there is no need within the attribute structure to make it any harder to find the keyval structure. The attribute value is a 'void *'. If 'sizeof(MPI_Fint)' > 'sizeof(void*)', then this must be changed (no such system has been encountered yet). For the Fortran 77 routines in the case where 'sizeof(MPI_Fint)' < 'sizeof(void*)', the high end of the 'void *' value is used. That is, we cast it to 'MPI_Fint *' and use that value. MPI defines three kinds of attributes (see MPI 2.1, Section 16.3, pages 487-488 (the standard says two, but there are really three, as discussed below). These are pointer-valued attributes and two types of integer-valued attributes. Pointer-valued attributes are used in C. Integer-valued attributes are used in Fortran. These are of type either INTEGER or INTEGER(KIND=MPI_ADDRESS_KIND). The predefined attributes are a combination of INTEGER and pointers. Module: Attribute-DS S*/ typedef struct MPIR_Attribute { MPIR_OBJECT_HEADER; /* adds handle and ref_count fields */ MPII_Keyval *keyval; /* Keyval structure for this attribute */ struct MPIR_Attribute *next; /* Pointer to next in the list */ MPIR_Attr_type attrType; /* Type of the attribute */ long pre_sentinal; /* Used to detect user errors in accessing the value */ MPII_Attr_val_t value; /* Stored value. An Aint must be at least as large as an address - some builds may make an Aint larger than a void * */ long post_sentinal; /* Like pre_sentinal */ /* other, device-specific information */ #ifdef MPID_DEV_ATTR_DECL MPID_DEV_ATTR_DECL #endif # 203 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_attr.h" } MPIR_Attribute; #endif /* MPIR_ATTR_H_INCLUDED */ # 206 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_attr.h" # 215 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_group.h" #endif /* expanded by -frewrite-includes */ # 215 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_group.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPIR_GROUP_H_INCLUDED #define MPIR_GROUP_H_INCLUDED /*--------------------------------------------------------------------------- * Groups are *not* a major data structure in MPICH-2. They are provided * only because they are required for the group operations (e.g., * MPI_Group_intersection) and for the scalable RMA synchronization *---------------------------------------------------------------------------*/ /* This structure is used to implement the group operations such as MPI_Group_translate_ranks */ typedef struct MPII_Group_pmap_t { int lpid; /* local process id, from VCONN */ int next_lpid; /* Index of next lpid (in lpid order) */ int flag; /* marker, used to implement group operations */ } MPII_Group_pmap_t; /* Any changes in the MPIR_Group structure must be made to the predefined value in MPIR_Group_builtin for MPI_GROUP_EMPTY in src/mpi/group/grouputil.c */ /*S MPIR_Group - Description of the Group data structure The processes in the group of 'MPI_COMM_WORLD' have lpid values 0 to 'size'-1, where 'size' is the size of 'MPI_COMM_WORLD'. Processes created by 'MPI_Comm_spawn' or 'MPI_Comm_spawn_multiple' or added by 'MPI_Comm_attach' or 'MPI_Comm_connect' are numbered greater than 'size - 1' (on the calling process). See the discussion of LocalPID values. Note that when dynamic process creation is used, the pids are `not` unique across the universe of connected MPI processes. This is ok, as long as pids are interpreted `only` on the process that owns them. Only for MPI-1 are the lpid''s equal to the `global` pids. The local pids can be thought of as a reference not to the remote process itself, but how the remote process can be reached from this process. We may want to have a structure 'MPID_Lpid_t' that contains information on the remote process, such as (for TCP) the hostname, ip address (it may be different if multiple interfaces are supported; we may even want plural ip addresses for stripping communication), and port (or ports). For shared memory connected processes, it might have the address of a remote queue. The lpid number is an index into a table of 'MPID_Lpid_t'''s that contain this (device- and method-specific) information. Module: Group-DS S*/ struct MPIR_Group { MPIR_OBJECT_HEADER; /* adds handle and ref_count fields */ int size; /* Size of a group */ int rank; /* rank of this process relative to this group */ int idx_of_first_lpid; MPII_Group_pmap_t *lrank_to_lpid; /* Array mapping a local rank to local process number */ int is_local_dense_monotonic; /* see NOTE-G1 */ /* We may want some additional data for the RMA syncrhonization calls */ /* Other, device-specific information */ #ifdef MPID_DEV_GROUP_DECL MPID_DEV_GROUP_DECL #endif # 72 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_group.h" }; /* NOTE-G1: is_local_dense_monotonic will be true iff the group meets the * following criteria: * 1) the lpids are all in the range [0,size-1], i.e. a subset of comm world * 2) the pids are sequentially numbered in increasing order, without any gaps, * stride, or repetitions * * This additional information allows us to handle the common case (insofar as * group ops are common) for MPI_Group_translate_ranks where group2 is * group_of(MPI_COMM_WORLD), or some simple subset. This is an important use * case for many MPI tool libraries, such as Scalasca. */ extern MPIR_Object_alloc_t MPIR_Group_mem; /* Preallocated group objects */ #define MPIR_GROUP_N_BUILTIN 1 extern MPIR_Group MPIR_Group_builtin[MPIR_GROUP_N_BUILTIN]; extern MPIR_Group MPIR_Group_direct[]; /* Object for empty group */ extern MPIR_Group * const MPIR_Group_empty; #define MPIR_Group_add_ref( _group ) \ do { MPIR_Object_add_ref( _group ); } while (0) #define MPIR_Group_release_ref( _group, _inuse ) \ do { MPIR_Object_release_ref( _group, _inuse ); } while (0) int MPIR_Group_create( int, MPIR_Group ** ); int MPIR_Group_release(MPIR_Group *group_ptr); int MPIR_Group_compare_impl(MPIR_Group *group_ptr1, MPIR_Group *group_ptr2, int *result); int MPIR_Group_difference_impl(MPIR_Group *group_ptr1, MPIR_Group *group_ptr2, MPIR_Group **new_group_ptr); int MPIR_Group_excl_impl(MPIR_Group *group_ptr, int n, const int *ranks, MPIR_Group **new_group_ptr); int MPIR_Group_free_impl(MPIR_Group *group_ptr); int MPIR_Group_incl_impl(MPIR_Group *group_ptr, int n, const int *ranks, MPIR_Group **new_group_ptr); int MPIR_Group_intersection_impl(MPIR_Group *group_ptr1, MPIR_Group *group_ptr2, MPIR_Group **new_group_ptr); int MPIR_Group_range_excl_impl(MPIR_Group *group_ptr, int n, int ranges[][3], MPIR_Group **new_group_ptr); int MPIR_Group_range_incl_impl(MPIR_Group *group_ptr, int n, int ranges[][3], MPIR_Group **new_group_ptr); int MPIR_Group_translate_ranks_impl(MPIR_Group *group_ptr1, int n, const int *ranks1, MPIR_Group *group_ptr2, int *ranks2); int MPIR_Group_union_impl(MPIR_Group *group_ptr1, MPIR_Group *group_ptr2, MPIR_Group **new_group_ptr); int MPIR_Group_check_subset(MPIR_Group * group_ptr, MPIR_Comm * comm_ptr); int MPIR_Group_init(void); /* internal functions */ void MPII_Group_setup_lpid_list( MPIR_Group * ); #endif /* MPIR_GROUP_H_INCLUDED */ # 122 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_group.h" # 216 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_comm.h" #endif /* expanded by -frewrite-includes */ # 216 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_comm.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPIR_COMM_H_INCLUDED #define MPIR_COMM_H_INCLUDED #if defined HAVE_LIBHCOLL #if 0 /* expanded by -frewrite-includes */ #include "../mpid/common/hcoll/hcollpre.h" #endif /* expanded by -frewrite-includes */ # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_comm.h" # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_comm.h" #endif # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_comm.h" /*E MPIR_Comm_kind_t - Name the two types of communicators E*/ typedef enum MPIR_Comm_kind_t { MPIR_COMM_KIND__INTRACOMM = 0, MPIR_COMM_KIND__INTERCOMM = 1 } MPIR_Comm_kind_t; /* ideally we could add these to MPIR_Comm_kind_t, but there's too much existing * code that assumes that the only valid values are INTRACOMM or INTERCOMM */ typedef enum MPIR_Comm_hierarchy_kind_t { MPIR_COMM_HIERARCHY_KIND__FLAT = 0, /* no hierarchy */ MPIR_COMM_HIERARCHY_KIND__PARENT = 1, /* has subcommunicators */ MPIR_COMM_HIERARCHY_KIND__NODE_ROOTS = 2, /* is the subcomm for node roots */ MPIR_COMM_HIERARCHY_KIND__NODE = 3, /* is the subcomm for a node */ MPIR_COMM_HIERARCHY_KIND__SIZE /* cardinality of this enum */ } MPIR_Comm_hierarchy_kind_t; typedef enum { MPIR_COMM_MAP_TYPE__DUP, MPIR_COMM_MAP_TYPE__IRREGULAR } MPIR_Comm_map_type_t; /* direction of mapping: local to local, local to remote, remote to * local, remote to remote */ typedef enum { MPIR_COMM_MAP_DIR__L2L, MPIR_COMM_MAP_DIR__L2R, MPIR_COMM_MAP_DIR__R2L, MPIR_COMM_MAP_DIR__R2R } MPIR_Comm_map_dir_t; typedef struct MPIR_Comm_map { MPIR_Comm_map_type_t type; struct MPIR_Comm *src_comm; /* mapping direction for intercomms, which contain local and * remote groups */ MPIR_Comm_map_dir_t dir; /* only valid for irregular map type */ int src_mapping_size; int *src_mapping; int free_mapping; /* we allocated the mapping */ struct MPIR_Comm_map *next; } MPIR_Comm_map_t; int MPIR_Comm_map_irregular(struct MPIR_Comm *newcomm, struct MPIR_Comm *src_comm, int *src_mapping, int src_mapping_size, MPIR_Comm_map_dir_t dir, MPIR_Comm_map_t **map); int MPIR_Comm_map_dup(struct MPIR_Comm *newcomm, struct MPIR_Comm *src_comm, MPIR_Comm_map_dir_t dir); int MPIR_Comm_map_free(struct MPIR_Comm *comm); /*S MPIR_Comm - Description of the Communicator data structure Notes: Note that the size and rank duplicate data in the groups that make up this communicator. These are used often enough that this optimization is valuable. This definition provides only a 16-bit integer for context id''s . This should be sufficient for most applications. However, extending this to a 32-bit (or longer) integer should be easy. There are two context ids. One is used for sending and one for receiving. In the case of an Intracommunicator, they are the same context id. They differ in the case of intercommunicators, where they may come from processes in different comm worlds (in the case of MPI-2 dynamic process intercomms). The virtual connection table is an explicit member of this structure. This contains the information used to contact a particular process, indexed by the rank relative to this communicator. Groups are allocated lazily. That is, the group pointers may be null, created only when needed by a routine such as 'MPI_Comm_group'. The local process ids needed to form the group are available within the virtual connection table. For intercommunicators, we may want to always have the groups. If not, we either need the 'local_group' or we need a virtual connection table corresponding to the 'local_group' (we may want this anyway to simplify the implementation of the intercommunicator collective routines). The pointer to the structure 'MPIR_Collops' containing pointers to the collective routines allows an implementation to replace each routine on a routine-by-routine basis. By default, this pointer is null, as are the pointers within the structure. If either pointer is null, the implementation uses the generic provided implementation. This choice, rather than initializing the table with pointers to all of the collective routines, is made to reduce the space used in the communicators and to eliminate the need to include the implementation of all collective routines in all MPI executables, even if the routines are not used. The macro 'MPID_HAS_HETERO' may be defined by a device to indicate that the device supports MPI programs that must communicate between processes with different data representations (e.g., different sized integers or different byte orderings). If the device does need to define this value, it should be defined in the file 'mpidpre.h'. Please note that the local_size and remote_size fields can be confusing. For intracommunicators both fields are always equal to the size of the communicator. For intercommunicators local_size is equal to the size of local_group while remote_size is equal to the size of remote_group. Module: Communicator-DS Question: For fault tolerance, do we want to have a standard field for communicator health? For example, ok, failure detected, all (live) members of failed communicator have acked. S*/ struct MPIR_Comm { MPIR_OBJECT_HEADER; /* adds handle and ref_count fields */ MPID_Thread_mutex_t mutex; MPIR_Context_id_t context_id; /* Send context id. See notes */ MPIR_Context_id_t recvcontext_id; /* Send context id. See notes */ int remote_size; /* Value of MPI_Comm_(remote)_size */ int rank; /* Value of MPI_Comm_rank */ MPIR_Attribute *attributes; /* List of attributes */ int local_size; /* Value of MPI_Comm_size for local group */ MPIR_Group *local_group, /* Groups in communicator. */ *remote_group; /* The local and remote groups are the same for intra communicators */ MPIR_Comm_kind_t comm_kind; /* MPIR_COMM_KIND__INTRACOMM or MPIR_COMM_KIND__INTERCOMM */ char name[MPI_MAX_OBJECT_NAME]; /* Required for MPI-2 */ MPIR_Errhandler *errhandler; /* Pointer to the error handler structure */ struct MPIR_Comm *local_comm; /* Defined only for intercomms, holds an intracomm for the local group */ MPIR_Comm_hierarchy_kind_t hierarchy_kind; /* flat, parent, node, or node_roots */ struct MPIR_Comm *node_comm; /* Comm of processes in this comm that are on the same node as this process. */ struct MPIR_Comm *node_roots_comm; /* Comm of root processes for other nodes. */ int *intranode_table; /* intranode_table[i] gives the rank in node_comm of rank i in this comm or -1 if i is not in this process' node_comm. It is of size 'local_size'. */ int *internode_table; /* internode_table[i] gives the rank in node_roots_comm of rank i in this comm. It is of size 'local_size'. */ int is_low_group; /* For intercomms only, this boolean is set for all members of one of the two groups of processes and clear for the other. It enables certain intercommunicator collective operations that wish to use half-duplex operations to implement a full-duplex operation */ struct MPIR_Comm *comm_next;/* Provides a chain through all active communicators */ struct MPIR_Collops *coll_fns; /* Pointer to a table of functions implementing the collective routines */ struct MPII_Topo_ops *topo_fns; /* Pointer to a table of functions implementting the topology routines */ int next_sched_tag; /* used by the NBC schedule code to allocate tags */ int revoked; /* Flag to track whether the communicator * has been revoked */ MPIR_Info *info; /* Hints to the communicator */ #ifdef MPID_HAS_HETERO int is_hetero; #endif # 186 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_comm.h" #if defined HAVE_LIBHCOLL hcoll_comm_priv_t hcoll_priv; #endif /* HAVE_LIBHCOLL */ # 190 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_comm.h" /* the mapper is temporarily filled out in order to allow the * device to setup its network addresses. it will be freed after * the device has initialized the comm. */ MPIR_Comm_map_t *mapper_head; MPIR_Comm_map_t *mapper_tail; /* Other, device-specific information */ #ifdef MPID_DEV_COMM_DECL MPID_DEV_COMM_DECL #endif # 201 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_comm.h" }; extern MPIR_Object_alloc_t MPIR_Comm_mem; typedef struct MPIR_Gpid { #ifdef MPID_DEV_GPID_DECL MPID_DEV_GPID_DECL #else # 208 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_comm.h" int dummy; /* don't create an empty structure */ #endif # 210 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_comm.h" }MPIR_Gpid; /* this function should not be called by normal code! */ int MPIR_Comm_delete_internal(MPIR_Comm * comm_ptr); #define MPIR_Comm_add_ref(_comm) \ do { MPIR_Object_add_ref((_comm)); } while (0) #define MPIR_Comm_release_ref( _comm, _inuse ) \ do { MPIR_Object_release_ref( _comm, _inuse ); } while (0) /* Release a reference to a communicator. If there are no pending references, delete the communicator and recover all storage and context ids. This routine has been inlined because keeping it as a separate routine results in a >5% performance hit for the SQMR benchmark. */ #undef FUNCNAME #define FUNCNAME MPIR_Comm_release #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPIR_Comm_release(MPIR_Comm * comm_ptr) { int mpi_errno = MPI_SUCCESS; int in_use; MPIR_Comm_release_ref(comm_ptr, &in_use); if (unlikely(!in_use)) { /* the following routine should only be called by this function and its * "_always" variant. */ mpi_errno = MPIR_Comm_delete_internal(comm_ptr); /* not ERR_POPing here to permit simpler inlining. Our caller will * still report the error from the comm_delete level. */ } return mpi_errno; } #undef FUNCNAME #undef FCNAME /* MPIR_Comm_release_always is the same as MPIR_Comm_release except it uses MPIR_Comm_release_ref_always instead. */ int MPIR_Comm_release_always(MPIR_Comm *comm_ptr); int MPIR_Comm_create( MPIR_Comm ** ); int MPIR_Comm_create_group(MPIR_Comm * comm_ptr, MPIR_Group * group_ptr, int tag, MPIR_Comm ** newcomm); /* implements the logic for MPI_Comm_create for intracommunicators only */ int MPIR_Comm_create_intra(MPIR_Comm *comm_ptr, MPIR_Group *group_ptr, MPIR_Comm **newcomm_ptr); int MPIR_Comm_commit( MPIR_Comm * ); int MPIR_Comm_is_node_aware( MPIR_Comm * ); int MPIR_Comm_idup_impl(MPIR_Comm *comm_ptr, MPIR_Comm **newcomm, MPIR_Request **reqp); int MPIR_Comm_shrink(MPIR_Comm *comm_ptr, MPIR_Comm **newcomm_ptr); int MPIR_Comm_agree(MPIR_Comm *comm_ptr, int *flag); #if defined(HAVE_ROMIO) int MPIR_Comm_split_filesystem(MPI_Comm comm, int key, const char *dirname, MPI_Comm *newcomm); #endif # 277 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_comm.h" #define MPIR_Comm_rank(comm_ptr) ((comm_ptr)->rank) #define MPIR_Comm_size(comm_ptr) ((comm_ptr)->local_size) /* Communicator info hint functions */ typedef int (*MPIR_Comm_hint_fn_t)(MPIR_Comm *, MPIR_Info *, void *); int MPIR_Comm_register_hint(const char *hint_key, MPIR_Comm_hint_fn_t fn, void *state); int MPIR_Comm_delete_attr_impl(MPIR_Comm *comm_ptr, MPII_Keyval *keyval_ptr); int MPIR_Comm_create_keyval_impl(MPI_Comm_copy_attr_function *comm_copy_attr_fn, MPI_Comm_delete_attr_function *comm_delete_attr_fn, int *comm_keyval, void *extra_state); int MPIR_Comm_accept_impl(const char * port_name, MPIR_Info * info_ptr, int root, MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm_ptr); int MPIR_Comm_connect_impl(const char * port_name, MPIR_Info * info_ptr, int root, MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm_ptr); int MPIR_Comm_create_errhandler_impl(MPI_Comm_errhandler_function *function, MPI_Errhandler *errhandler); int MPIR_Comm_dup_impl(MPIR_Comm *comm_ptr, MPIR_Comm **newcomm_ptr); int MPIR_Comm_dup_with_info_impl(MPIR_Comm *comm_ptr, MPIR_Info *info_ptr, MPIR_Comm **newcomm_ptr); int MPIR_Comm_get_info_impl(MPIR_Comm *comm_ptr, MPIR_Info **info_ptr); int MPIR_Comm_set_info_impl(MPIR_Comm *comm_ptr, MPIR_Info *info_ptr); int MPIR_Comm_free_impl(MPIR_Comm * comm_ptr); void MPIR_Comm_free_keyval_impl(int keyval); void MPIR_Comm_get_errhandler_impl(MPIR_Comm *comm_ptr, MPIR_Errhandler **errhandler_ptr); void MPIR_Comm_set_errhandler_impl(MPIR_Comm *comm_ptr, MPIR_Errhandler *errhandler_ptr); void MPIR_Comm_get_name_impl(MPIR_Comm *comm, char *comm_name, int *resultlen); int MPIR_Intercomm_merge_impl(MPIR_Comm *comm_ptr, int high, MPIR_Comm **new_intracomm_ptr); int MPIR_Intercomm_create_impl(MPIR_Comm *local_comm_ptr, int local_leader, MPIR_Comm *peer_comm_ptr, int remote_leader, int tag, MPIR_Comm **new_intercomm_ptr); int MPIR_Comm_group_impl(MPIR_Comm *comm_ptr, MPIR_Group **group_ptr); int MPIR_Comm_remote_group_impl(MPIR_Comm *comm_ptr, MPIR_Group **group_ptr); int MPIR_Comm_group_failed_impl(MPIR_Comm *comm, MPIR_Group **failed_group_ptr); int MPIR_Comm_remote_group_failed_impl(MPIR_Comm *comm, MPIR_Group **failed_group_ptr); int MPIR_Comm_split_impl(MPIR_Comm *comm_ptr, int color, int key, MPIR_Comm **newcomm_ptr); int MPIR_Comm_split_type_impl(MPIR_Comm *comm_ptr, int split_type, int key, MPIR_Info *info_ptr, MPIR_Comm **newcomm_ptr); int MPIR_Comm_set_attr_impl(MPIR_Comm *comm_ptr, int comm_keyval, void *attribute_val, MPIR_Attr_type attrType); /* Preallocated comm objects. There are 3: comm_world, comm_self, and a private (non-user accessible) dup of comm world that is provided if needed in MPI_Finalize. Having a separate version of comm_world avoids possible interference with User code */ #define MPIR_COMM_N_BUILTIN 3 extern MPIR_Comm MPIR_Comm_builtin[MPIR_COMM_N_BUILTIN]; extern MPIR_Comm MPIR_Comm_direct[]; /* This is the handle for the internal MPI_COMM_WORLD . The "2" at the end of the handle is 3-1 (e.g., the index in the builtin array) */ #define MPIR_ICOMM_WORLD ((MPI_Comm)0x44000002) typedef struct MPIR_Commops { int (*split_type)(MPIR_Comm *, int, int, MPIR_Info *, MPIR_Comm **); } MPIR_Commops; extern struct MPIR_Commops *MPIR_Comm_fns; /* Communicator creation functions */ /* internal functions */ int MPII_Comm_init(MPIR_Comm *); int MPII_Comm_is_node_consecutive( MPIR_Comm *); /* applies the specified info chain to the specified communicator */ int MPII_Comm_apply_hints(MPIR_Comm *comm_ptr, MPIR_Info *info_ptr); int MPII_Comm_copy( MPIR_Comm *, int, MPIR_Comm ** ); int MPII_Comm_copy_data(MPIR_Comm *comm_ptr, MPIR_Comm **outcomm_ptr); int MPII_Setup_intercomm_localcomm( MPIR_Comm * ); /* comm_create helper functions, used by both comm_create and comm_create_group */ int MPII_Comm_create_calculate_mapping(MPIR_Group *group_ptr, MPIR_Comm *comm_ptr, int **mapping_out, MPIR_Comm **mapping_comm); int MPII_Comm_create_map(int local_n, int remote_n, int *local_mapping, int *remote_mapping, MPIR_Comm *mapping_comm, MPIR_Comm *newcomm); #endif /* MPIR_COMM_H_INCLUDED */ # 364 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_comm.h" # 217 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_request.h" #endif /* expanded by -frewrite-includes */ # 217 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_request.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPIR_REQUEST_H_INCLUDED #define MPIR_REQUEST_H_INCLUDED /* NOTE-R1: MPIR_REQUEST_KIND__MPROBE signifies that this is a request created by * MPI_Mprobe or MPI_Improbe. Since we use MPI_Request objects as our * MPI_Message objects, we use this separate kind in order to provide stronger * error checking. Once a message (backed by a request) is promoted to a real * request by calling MPI_Mrecv/MPI_Imrecv, we actually modify the kind to be * MPIR_REQUEST_KIND__RECV in order to keep completion logic as simple as possible. */ /*E MPIR_Request_kind - Kinds of MPI Requests Module: Request-DS E*/ typedef enum MPIR_Request_kind_t { MPIR_REQUEST_KIND__UNDEFINED, MPIR_REQUEST_KIND__SEND, MPIR_REQUEST_KIND__RECV, MPIR_REQUEST_KIND__PREQUEST_SEND, MPIR_REQUEST_KIND__PREQUEST_RECV, MPIR_REQUEST_KIND__GREQUEST, MPIR_REQUEST_KIND__COLL, MPIR_REQUEST_KIND__MPROBE, /* see NOTE-R1 */ MPIR_REQUEST_KIND__RMA, MPIR_REQUEST_KIND__LAST #ifdef MPID_REQUEST_KIND_DECL , MPID_REQUEST_KIND_DECL #endif # 38 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_request.h" } MPIR_Request_kind_t; /* This currently defines a single structure type for all requests. Eventually, we may want a union type, as used in MPICH-1 */ /* Typedefs for Fortran generalized requests */ typedef void (MPIR_Grequest_f77_cancel_function)(void *, MPI_Fint*, MPI_Fint *); typedef void (MPIR_Grequest_f77_free_function)(void *, MPI_Fint *); typedef void (MPIR_Grequest_f77_query_function)(void *, MPI_Fint *, MPI_Fint *); /* vtable-ish structure holding generalized request function pointers and other * state. Saves ~48 bytes in pt2pt requests on many platforms. */ struct MPIR_Grequest_fns { MPI_Grequest_cancel_function *cancel_fn; MPI_Grequest_free_function *free_fn; MPI_Grequest_query_function *query_fn; MPIX_Grequest_poll_function *poll_fn; MPIX_Grequest_wait_function *wait_fn; void *grequest_extra_state; MPIX_Grequest_class greq_class; MPIR_Lang_t greq_lang; /* language that defined the generalize req */ }; typedef struct MPIR_Grequest_class { MPIR_OBJECT_HEADER; /* adds handle and ref_count fields */ MPI_Grequest_query_function *query_fn; MPI_Grequest_free_function *free_fn; MPI_Grequest_cancel_function *cancel_fn; MPIX_Grequest_poll_function *poll_fn; MPIX_Grequest_wait_function *wait_fn; struct MPIR_Grequest_class *next; } MPIR_Grequest_class; #define MPIR_Request_extract_status(request_ptr_, status_) \ { \ if ((status_) != MPI_STATUS_IGNORE) \ { \ int error__; \ \ /* According to the MPI 1.1 standard page 22 lines 9-12, \ * the MPI_ERROR field may not be modified except by the \ * functions in section 3.7.5 which return \ * MPI_ERR_IN_STATUSES (MPI_Wait{all,some} and \ * MPI_Test{all,some}). */ \ error__ = (status_)->MPI_ERROR; \ *(status_) = (request_ptr_)->status; \ (status_)->MPI_ERROR = error__; \ } \ } #define MPIR_Request_is_complete(req_) (MPIR_cc_is_complete((req_)->cc_ptr)) /*S MPIR_Request - Description of the Request data structure Module: Request-DS Notes: If it is necessary to remember the MPI datatype, this information is saved within the device-specific fields provided by 'MPID_DEV_REQUEST_DECL'. Requests come in many flavors, as stored in the 'kind' field. It is expected that each kind of request will have its own structure type (e.g., 'MPIR_Request_send_t') that extends the 'MPIR_Request'. S*/ struct MPIR_Request { MPIR_OBJECT_HEADER; /* adds handle and ref_count fields */ MPIR_Request_kind_t kind; /* pointer to the completion counter. This is necessary for the * case when an operation is described by a list of requests */ MPIR_cc_t *cc_ptr; /* the actual completion counter. Ensure cc and status are in the * same cache line, assuming the cache line size is a multiple of * 32 bytes and 32-bit integers */ MPIR_cc_t cc; /* A comm is needed to find the proper error handler */ MPIR_Comm *comm; /* Status is needed for wait/test/recv */ MPI_Status status; union { struct { struct MPIR_Grequest_fns *greq_fns; } ureq; /* kind : MPIR_REQUEST_KIND__GREQUEST */ struct { MPIR_Errflag_t errflag; } nbc; /* kind : MPIR_REQUEST_KIND__COLL */ #if defined HAVE_DEBUGGER_SUPPORT struct { struct MPIR_Sendq *dbg_next; } send; /* kind : MPID_REQUEST_SEND */ #endif /* HAVE_DEBUGGER_SUPPORT */ # 135 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_request.h" struct { #if defined HAVE_DEBUGGER_SUPPORT struct MPIR_Sendq *dbg_next; #endif /* HAVE_DEBUGGER_SUPPORT */ # 139 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_request.h" /* Persistent requests have their own "real" requests */ struct MPIR_Request *real_request; } persist; /* kind : MPID_PREQUEST_SEND or MPID_PREQUEST_RECV */ } u; /* Notes about request_completed_cb: * * 1. The callback function is triggered when this requests * completion count reaches 0. * * 2. The callback function should be nonblocking. * * 3. The callback function should not poke the progress engine, * or call any function that pokes the progress engine. * * 4. The callback function can complete other requests, thus * calling those requests' callback functions. However, the * recursion depth of request completion function is limited. * If we ever need deeper recurisve calls, we need to change * to an iterative design instead of a recursive design for * request completion. * * 5. In multithreaded programs, since the callback function is * nonblocking and never calls the progress engine, it would * never yield the lock to other threads. So the recursion * should be multithreading-safe. */ int (*request_completed_cb)(struct MPIR_Request *); /* Other, device-specific information */ #ifdef MPID_DEV_REQUEST_DECL MPID_DEV_REQUEST_DECL #endif # 172 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_request.h" } ATTRIBUTE((__aligned__(32))); #define MPIR_REQUEST_PREALLOC 8 extern MPIR_Object_alloc_t MPIR_Request_mem; /* Preallocated request objects */ extern MPIR_Request MPIR_Request_direct[]; static inline MPIR_Request *MPIR_Request_create(MPIR_Request_kind_t kind) { MPIR_Request *req; req = MPIR_Handle_obj_alloc(&MPIR_Request_mem); if (req != NULL) { MPL_DBG_MSG_P(MPIR_DBG_REQUEST,VERBOSE, "allocated request, handle=0x%08x", req->handle); #ifdef MPICH_DBG_OUTPUT /*MPIR_Assert(HANDLE_GET_MPI_KIND(req->handle) == MPIR_REQUEST);*/ if (HANDLE_GET_MPI_KIND(req->handle) != MPIR_REQUEST) { int mpi_errno; mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, "**invalid_handle", "**invalid_handle %d", req->handle); MPID_Abort(MPIR_Process.comm_world, mpi_errno, -1, NULL); } #endif # 199 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_request.h" /* FIXME: This makes request creation expensive. We need to * trim this to the basics, with additional setup for * special-purpose requests (think base class and * inheritance). For example, do we really* want to set the * kind to UNDEFINED? And should the RMA values be set only * for RMA requests? */ MPIR_Object_set_ref(req, 1); req->kind = kind; MPIR_cc_set(&req->cc, 1); req->cc_ptr = &req->cc; req->status.MPI_ERROR = MPI_SUCCESS; MPIR_STATUS_SET_CANCEL_BIT(req->status, FALSE); req->comm = NULL; req->request_completed_cb = NULL; switch(kind) { case MPIR_REQUEST_KIND__SEND: MPII_REQUEST_CLEAR_DBG(req); break; case MPIR_REQUEST_KIND__COLL: req->u.nbc.errflag = MPIR_ERR_NONE; break; default: break; } MPID_Request_init(req); } else { /* FIXME: This fails to fail if debugging is turned off */ MPL_DBG_MSG(MPIR_DBG_REQUEST,TYPICAL,"unable to allocate a request"); } return req; } #define MPIR_Request_add_ref( _req ) \ do { MPIR_Object_add_ref( _req ); } while (0) #define MPIR_Request_release_ref( _req, _inuse ) \ do { MPIR_Object_release_ref( _req, _inuse ); } while (0) static inline void MPIR_Request_free(MPIR_Request *req) { int inuse; MPIR_Request_release_ref(req, &inuse); if (inuse == 0) { MPL_DBG_MSG_P(MPIR_DBG_REQUEST,VERBOSE, "freeing request, handle=0x%08x", req->handle); #ifdef MPICH_DBG_OUTPUT if (HANDLE_GET_MPI_KIND(req->handle) != MPIR_REQUEST) { int mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, "**invalid_handle", "**invalid_handle %d", req->handle); MPID_Abort(MPIR_Process.comm_world, mpi_errno, -1, NULL); } if (req->ref_count != 0) { int mpi_errno = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_FATAL, FCNAME, __LINE__, MPI_ERR_OTHER, "**invalid_refcount", "**invalid_refcount %d", req->ref_count); MPID_Abort(MPIR_Process.comm_world, mpi_errno, -1, NULL); } #endif # 270 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_request.h" /* FIXME: We need a better way to handle these so that we do * not always need to initialize these fields and check them * when we destroy a request */ /* FIXME: We need a way to call these routines ONLY when the * related ref count has become zero. */ if (req->comm != NULL) { MPIR_Comm_release(req->comm); } if (req->kind == MPIR_REQUEST_KIND__GREQUEST && req->u.ureq.greq_fns != NULL) { MPL_free(req->u.ureq.greq_fns); } MPID_Request_finalize(req); MPIR_Handle_obj_free(&MPIR_Request_mem, req); } } int MPIR_Request_complete(MPI_Request *, MPIR_Request *, MPI_Status *, int *); int MPIR_Request_get_error(MPIR_Request *); int MPIR_Progress_wait_request(MPIR_Request *req); /* The following routines perform the callouts to the user routines registered as part of a generalized request. They handle any language binding issues that are necessary. They are used when completing, freeing, cancelling or extracting the status from a generalized request. */ int MPIR_Grequest_cancel(MPIR_Request * request_ptr, int complete); int MPIR_Grequest_query(MPIR_Request * request_ptr); int MPIR_Grequest_free(MPIR_Request * request_ptr); /* this routine was added to support our extension relaxing the progress rules * for generalized requests */ int MPIR_Grequest_progress_poke(int count, MPIR_Request **request_ptrs, MPI_Status array_of_statuses[] ); int MPIR_Grequest_waitall(int count, MPIR_Request * const * request_ptrs); void MPIR_Grequest_complete_impl(MPIR_Request *request_ptr); int MPIR_Grequest_start_impl(MPI_Grequest_query_function *query_fn, MPI_Grequest_free_function *free_fn, MPI_Grequest_cancel_function *cancel_fn, void *extra_state, MPIR_Request **request_ptr); int MPIX_Grequest_start_impl(MPI_Grequest_query_function *, MPI_Grequest_free_function *, MPI_Grequest_cancel_function *, MPIX_Grequest_poll_function *, MPIX_Grequest_wait_function *, void *, MPIR_Request **); #endif /* MPIR_REQUEST_H_INCLUDED */ # 321 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_request.h" # 218 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_win.h" #endif /* expanded by -frewrite-includes */ # 218 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_win.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPIR_WIN_H_INCLUDED #define MPIR_WIN_H_INCLUDED /*S MPIR_Win - Description of the Window Object data structure. Module: Win-DS Notes: The following 3 keyvals are defined for attributes on all MPI Window objects\: .vb MPI_WIN_SIZE MPI_WIN_BASE MPI_WIN_DISP_UNIT .ve These correspond to the values in 'length', 'start_address', and 'disp_unit'. The communicator in the window is the same communicator that the user provided to 'MPI_Win_create' (not a dup). However, each intracommunicator has a special context id that may be used if MPI communication is used by the implementation to implement the RMA operations. There is no separate window group; the group of the communicator should be used. Question: Should a 'MPID_Win' be defined after 'MPID_Segment' in case the device wants to store a queue of pending put/get operations, described with 'MPID_Segment' (or 'MPIR_Request')s? S*/ struct MPIR_Win { MPIR_OBJECT_HEADER; /* adds handle and ref_count fields */ MPID_Thread_mutex_t mutex; MPIR_Errhandler *errhandler; /* Pointer to the error handler structure */ void *base; MPI_Aint size; int disp_unit; /* Displacement unit of *local* window */ MPIR_Attribute *attributes; MPIR_Comm *comm_ptr; /* Pointer to comm of window (dup) */ #ifdef USE_THREADED_WINDOW_CODE /* These were causing compilation errors. We need to figure out how to integrate threads into MPICH before including these fields. */ /* FIXME: The test here should be within a test for threaded support */ #ifdef HAVE_PTHREAD_H pthread_t wait_thread_id; /* id of thread handling MPI_Win_wait */ pthread_t passive_target_thread_id; /* thread for passive target RMA */ #elif defined(HAVE_WINTHREADS) # 60 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_win.h" HANDLE wait_thread_id; HANDLE passive_target_thread_id; #endif # 63 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_win.h" #endif # 64 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_win.h" /* These are COPIES of the values so that addresses to them can be returned as attributes. They are initialized by the MPI_Win_get_attr function. These values are constant for the lifetime of the window, so this is thread-safe. */ int copyDispUnit; MPI_Aint copySize; char name[MPI_MAX_OBJECT_NAME]; MPIR_Win_flavor_t create_flavor; MPIR_Win_model_t model; MPIR_Win_flavor_t copyCreateFlavor; MPIR_Win_model_t copyModel; /* Other, device-specific information */ #ifdef MPID_DEV_WIN_DECL MPID_DEV_WIN_DECL #endif # 85 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_win.h" }; extern MPIR_Object_alloc_t MPIR_Win_mem; /* Preallocated win objects */ extern MPIR_Win MPIR_Win_direct[]; int MPIR_Type_is_rma_atomic(MPI_Datatype type); int MPIR_Compare_equal(const void *a, const void *b, MPI_Datatype type); #endif /* MPIR_WIN_H_INCLUDED */ # 94 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_win.h" # 219 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_coll.h" #endif /* expanded by -frewrite-includes */ # 219 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_coll.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPIR_COLL_H_INCLUDED #define MPIR_COLL_H_INCLUDED /* Collective operations */ typedef struct MPIR_Collops { int ref_count; /* Supports lazy copies */ /* Contains pointers to the functions for the MPI collectives */ int (*Barrier) (MPIR_Comm *, MPIR_Errflag_t *); int (*Bcast) (void*, int, MPI_Datatype, int, MPIR_Comm *, MPIR_Errflag_t *); int (*Gather) (const void*, int, MPI_Datatype, void*, int, MPI_Datatype, int, MPIR_Comm *, MPIR_Errflag_t *); int (*Gatherv) (const void*, int, MPI_Datatype, void*, const int *, const int *, MPI_Datatype, int, MPIR_Comm *, MPIR_Errflag_t *); int (*Scatter) (const void*, int, MPI_Datatype, void*, int, MPI_Datatype, int, MPIR_Comm *, MPIR_Errflag_t *); int (*Scatterv) (const void*, const int *, const int *, MPI_Datatype, void*, int, MPI_Datatype, int, MPIR_Comm *, MPIR_Errflag_t *); int (*Allgather) (const void*, int, MPI_Datatype, void*, int, MPI_Datatype, MPIR_Comm *, MPIR_Errflag_t *); int (*Allgatherv) (const void*, int, MPI_Datatype, void*, const int *, const int *, MPI_Datatype, MPIR_Comm *, MPIR_Errflag_t *); int (*Alltoall) (const void*, int, MPI_Datatype, void*, int, MPI_Datatype, MPIR_Comm *, MPIR_Errflag_t *); int (*Alltoallv) (const void*, const int *, const int *, MPI_Datatype, void*, const int *, const int *, MPI_Datatype, MPIR_Comm *, MPIR_Errflag_t *); int (*Alltoallw) (const void*, const int *, const int *, const MPI_Datatype *, void*, const int *, const int *, const MPI_Datatype *, MPIR_Comm *, MPIR_Errflag_t *); int (*Reduce) (const void*, void*, int, MPI_Datatype, MPI_Op, int, MPIR_Comm *, MPIR_Errflag_t *); int (*Allreduce) (const void*, void*, int, MPI_Datatype, MPI_Op, MPIR_Comm *, MPIR_Errflag_t *); int (*Reduce_scatter) (const void*, void*, const int *, MPI_Datatype, MPI_Op, MPIR_Comm *, MPIR_Errflag_t *); int (*Scan) (const void*, void*, int, MPI_Datatype, MPI_Op, MPIR_Comm *, MPIR_Errflag_t * ); int (*Exscan) (const void*, void*, int, MPI_Datatype, MPI_Op, MPIR_Comm *, MPIR_Errflag_t * ); int (*Reduce_scatter_block) (const void*, void*, int, MPI_Datatype, MPI_Op, MPIR_Comm *, MPIR_Errflag_t *); /* MPI-3 nonblocking collectives */ int (*Ibarrier_sched)(MPIR_Comm *comm_ptr, MPIR_Sched_t s); int (*Ibcast_sched)(void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int (*Igather_sched)(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int (*Igatherv_sched)(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int (*Iscatter_sched)(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int (*Iscatterv_sched)(const void *sendbuf, const int *sendcounts, const int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int (*Iallgather_sched)(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int (*Iallgatherv_sched)(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int (*Ialltoall_sched)(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int (*Ialltoallv_sched)(const void *sendbuf, const int *sendcounts, const int *sdispls, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *rdispls, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int (*Ialltoallw_sched)(const void *sendbuf, const int *sendcounts, const int *sdispls, const MPI_Datatype *sendtypes, void *recvbuf, const int *recvcounts, const int *rdispls, const MPI_Datatype *recvtypes, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int (*Ireduce_sched)(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int (*Iallreduce_sched)(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int (*Ireduce_scatter_sched)(const void *sendbuf, void *recvbuf, const int *recvcounts, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int (*Ireduce_scatter_block_sched)(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int (*Iscan_sched)(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int (*Iexscan_sched)(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); struct MPIR_Collops *prev_coll_fns; /* when overriding this table, set this to point to the old table */ /* MPI-3 neighborhood collectives (blocking & nonblocking) */ int (*Neighbor_allgather)(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr); int (*Neighbor_allgatherv)(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPIR_Comm *comm_ptr); int (*Neighbor_alltoall)(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr); int (*Neighbor_alltoallv)(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPIR_Comm *comm_ptr); int (*Neighbor_alltoallw)(const void *sendbuf, const int sendcounts[], const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPIR_Comm *comm_ptr); int (*Ineighbor_allgather)(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int (*Ineighbor_allgatherv)(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int (*Ineighbor_alltoall)(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int (*Ineighbor_alltoallv)(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int (*Ineighbor_alltoallw)(const void *sendbuf, const int sendcounts[], const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPIR_Comm *comm_ptr, MPIR_Sched_t s); } MPIR_Collops; /* Internal point-to-point communication for collectives */ /* These functions are used in the implementation of collective and other internal operations. They are wrappers around MPID send/recv functions. They do sends/receives by setting the context offset to MPIR_CONTEXT_INTRA(INTER)_COLL. */ int MPIC_Wait(MPIR_Request * request_ptr, MPIR_Errflag_t *errflag); int MPIC_Probe(int source, int tag, MPI_Comm comm, MPI_Status *status); int MPIC_Send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIC_Recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, int tag, MPIR_Comm *comm_ptr, MPI_Status *status, MPIR_Errflag_t *errflag); int MPIC_Ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIC_Sendrecv(const void *sendbuf, MPI_Aint sendcount, MPI_Datatype sendtype, int dest, int sendtag, void *recvbuf, MPI_Aint recvcount, MPI_Datatype recvtype, int source, int recvtag, MPIR_Comm *comm_ptr, MPI_Status *status, MPIR_Errflag_t *errflag); int MPIC_Sendrecv_replace(void *buf, int count, MPI_Datatype datatype, int dest, int sendtag, int source, int recvtag, MPIR_Comm *comm_ptr, MPI_Status *status, MPIR_Errflag_t *errflag); int MPIC_Isend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm_ptr, MPIR_Request **request, MPIR_Errflag_t *errflag); int MPIC_Issend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm_ptr, MPIR_Request **request, MPIR_Errflag_t *errflag); int MPIC_Irecv(void *buf, MPI_Aint count, MPI_Datatype datatype, int source, int tag, MPIR_Comm *comm_ptr, MPIR_Request **request); int MPIC_Waitall(int numreq, MPIR_Request *requests[], MPI_Status statuses[], MPIR_Errflag_t *errflag); /* Collective fallback implementations */ int MPIR_Allgather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag ); int MPIR_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag ); int MPIR_Allgather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag ); int MPIR_Allgather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag ); int MPIR_Allgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag ); int MPIR_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag ); int MPIR_Allgatherv_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPIR_Comm *comm_pt, MPIR_Errflag_t *errflag ); int MPIR_Allgatherv_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag ); int MPIR_Allreduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Allreduce_intra(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Allreduce_inter(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Alltoall_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Alltoall_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Alltoall_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Alltoallv_impl(const void *sendbuf, const int *sendcnts, const int *sdispls, MPI_Datatype sendtype, void *recvbuf, const int *recvcnts, const int *rdispls, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Alltoallv(const void *sendbuf, const int *sendcnts, const int *sdispls, MPI_Datatype sendtype, void *recvbuf, const int *recvcnts, const int *rdispls, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Alltoallv_intra(const void *sendbuf, const int *sendcnts, const int *sdispls, MPI_Datatype sendtype, void *recvbuf, const int *recvcnts, const int *rdispls, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Alltoallv_inter(const void *sendbuf, const int *sendcnts, const int *sdispls, MPI_Datatype sendtype, void *recvbuf, const int *recvcnts, const int *rdispls, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Alltoallw_impl(const void *sendbuf, const int *sendcnts, const int *sdispls, const MPI_Datatype *sendtypes, void *recvbuf, const int *recvcnts, const int *rdispls, const MPI_Datatype *recvtypes, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Alltoallw(const void *sendbuf, const int *sendcnts, const int *sdispls, const MPI_Datatype *sendtypes, void *recvbuf, const int *recvcnts, const int *rdispls, const MPI_Datatype *recvtypes, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Alltoallw_intra(const void *sendbuf, const int *sendcnts, const int *sdispls, const MPI_Datatype *sendtypes, void *recvbuf, const int *recvcnts, const int *rdispls, const MPI_Datatype *recvtypes, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Alltoallw_inter(const void *sendbuf, const int *sendcnts, const int *sdispls, const MPI_Datatype *sendtypes, void *recvbuf, const int *recvcnts, const int *rdispls, const MPI_Datatype *recvtypes, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Bcast_inter(void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Bcast_intra (void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Bcast (void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Bcast_impl (void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag ); int MPIR_Exscan_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag ); int MPIR_Gather_impl (const void *sendbuf, int sendcnt, MPI_Datatype sendtype, void *recvbuf, int recvcnt, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Gather (const void *sendbuf, int sendcnt, MPI_Datatype sendtype, void *recvbuf, int recvcnt, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Gather_intra (const void *sendbuf, int sendcnt, MPI_Datatype sendtype, void *recvbuf, int recvcnt, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Gather_inter (const void *sendbuf, int sendcnt, MPI_Datatype sendtype, void *recvbuf, int recvcnt, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag ); int MPIR_Gatherv (const void *sendbuf, int sendcnt, MPI_Datatype sendtype, void *recvbuf, const int *recvcnts, const int *displs, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Gatherv_impl (const void *sendbuf, int sendcnt, MPI_Datatype sendtype, void *recvbuf, const int *recvcnts, const int *displs, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Reduce_scatter_impl(const void *sendbuf, void *recvbuf, const int *recvcnts, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Reduce_scatter(const void *sendbuf, void *recvbuf, const int *recvcnts, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int *recvcnts, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Reduce_scatter_inter(const void *sendbuf, void *recvbuf, const int *recvcnts, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Reduce_scatter_block_impl(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag ); int MPIR_Reduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag ); int MPIR_Reduce_scatter_block_intra(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag ); int MPIR_Reduce_scatter_block_inter(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Reduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag ); int MPIR_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag ); int MPIR_Reduce_intra(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag ); int MPIR_Reduce_inter (const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Scan_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Scan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Scatter_impl(const void *sendbuf, int sendcnt, MPI_Datatype sendtype, void *recvbuf, int recvcnt, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag ); int MPIR_Scatter(const void *sendbuf, int sendcnt, MPI_Datatype sendtype, void *recvbuf, int recvcnt, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag ); int MPIR_Scatter_intra(const void *sendbuf, int sendcnt, MPI_Datatype sendtype, void *recvbuf, int recvcnt, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag ); int MPIR_Scatter_inter(const void *sendbuf, int sendcnt, MPI_Datatype sendtype, void *recvbuf, int recvcnt, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag ); int MPIR_Scatterv_impl (const void *sendbuf, const int *sendcnts, const int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcnt, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Scatterv (const void *sendbuf, const int *sendcnts, const int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcnt, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Barrier_impl( MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Barrier( MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Barrier_intra( MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Barrier_inter( MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag); int MPIR_Reduce_local_impl(const void *inbuf, void *inoutbuf, int count, MPI_Datatype datatype, MPI_Op op); /* group collectives */ int MPIR_Allreduce_group(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Group *group_ptr, int tag, MPIR_Errflag_t *errflag); int MPIR_Allreduce_group_intra(void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Group *group_ptr, int tag, MPIR_Errflag_t *errflag); int MPIR_Barrier_group(MPIR_Comm *comm_ptr, MPIR_Group *group_ptr, int tag, MPIR_Errflag_t *errflag); /* impl functions for NBC */ int MPIR_Ibarrier_impl(MPIR_Comm *comm_ptr, MPI_Request *request); int MPIR_Ibcast_impl(void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Comm *comm_ptr, MPI_Request *request); int MPIR_Igather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPI_Request *request); int MPIR_Igatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPI_Request *request); int MPIR_Iscatter_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPI_Request *request); int MPIR_Iscatterv_impl(const void *sendbuf, const int *sendcounts, const int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPI_Request *request); int MPIR_Iallgather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPI_Request *request); int MPIR_Iallgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPI_Request *request); int MPIR_Ialltoall_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPI_Request *request); int MPIR_Ialltoallv_impl(const void *sendbuf, const int *sendcounts, const int *sdispls, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *rdispls, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPI_Request *request); int MPIR_Ialltoallw_impl(const void *sendbuf, const int *sendcounts, const int *sdispls, const MPI_Datatype *sendtypes, void *recvbuf, const int *recvcounts, const int *rdispls, const MPI_Datatype *recvtypes, MPIR_Comm *comm_ptr, MPI_Request *request); int MPIR_Ireduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm *comm_ptr, MPI_Request *request); int MPIR_Iallreduce_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPI_Request *request); int MPIR_Ireduce_scatter_impl(const void *sendbuf, void *recvbuf, const int *recvcounts, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPI_Request *request); int MPIR_Ireduce_scatter_block_impl(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPI_Request *request); int MPIR_Iscan_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPI_Request *request); int MPIR_Iexscan_impl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPI_Request *request); /* impl functions for neighborhood collectives */ int MPIR_Ineighbor_allgather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPI_Request *request); int MPIR_Ineighbor_allgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPI_Request *request); int MPIR_Ineighbor_alltoall_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPI_Request *request); int MPIR_Ineighbor_alltoallv_impl(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPI_Request *request); int MPIR_Ineighbor_alltoallw_impl(const void *sendbuf, const int sendcounts[], const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPIR_Comm *comm_ptr, MPI_Request *request); int MPIR_Neighbor_allgather_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr); int MPIR_Neighbor_allgatherv_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPIR_Comm *comm_ptr); int MPIR_Neighbor_alltoall_impl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr); int MPIR_Neighbor_alltoallv_impl(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPIR_Comm *comm_ptr); int MPIR_Neighbor_alltoallw_impl(const void *sendbuf, const int sendcounts[], const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPIR_Comm *comm_ptr); /* neighborhood collective default algorithms */ int MPIR_Neighbor_allgather_default(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr); int MPIR_Neighbor_allgatherv_default(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPIR_Comm *comm_ptr); int MPIR_Neighbor_alltoall_default(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr); int MPIR_Neighbor_alltoallv_default(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPIR_Comm *comm_ptr); int MPIR_Neighbor_alltoallw_default(const void *sendbuf, const int sendcounts[], const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPIR_Comm *comm_ptr); int MPIR_Ineighbor_allgather_default(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ineighbor_allgatherv_default(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ineighbor_alltoall_default(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ineighbor_alltoallv_default(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ineighbor_alltoallw_default(const void *sendbuf, const int sendcounts[], const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPIR_Comm *comm_ptr, MPIR_Sched_t s); /* nonblocking collective default algorithms */ int MPIR_Ibcast_intra(void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ibcast_inter(void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ibcast_binomial(void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ibcast_SMP(void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Iscatter_for_bcast(void *tmp_buf, int root, MPIR_Comm *comm_ptr, int nbytes, MPIR_Sched_t s); int MPIR_Ibcast_scatter_rec_dbl_allgather(void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ibcast_scatter_ring_allgather(void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ibarrier_intra(MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ibarrier_inter(MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ireduce_intra(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ireduce_inter(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ireduce_binomial(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ireduce_redscat_gather(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ireduce_SMP(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ialltoallv_intra(const void *sendbuf, const int *sendcounts, const int *sdispls, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *rdispls, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ialltoallv_inter(const void *sendbuf, const int *sendcounts, const int *sdispls, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *rdispls, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Iallreduce_intra(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Iallreduce_inter(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Iallreduce_naive(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Iallreduce_SMP(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Iallreduce_redscat_allgather(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Iallreduce_rec_dbl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Igather_binomial(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Igather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Igather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Iscatter_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Iscatter_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Iscatterv(const void *sendbuf, const int *sendcounts, const int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ireduce_scatter_intra(const void *sendbuf, void *recvbuf, const int *recvcnts, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ireduce_scatter_inter(const void *sendbuf, void *recvbuf, const int *recvcnts, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ireduce_scatter_rec_dbl(const void *sendbuf, void *recvbuf, const int *recvcnts, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ireduce_scatter_rec_hlv(const void *sendbuf, void *recvbuf, const int *recvcnts, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ireduce_scatter_pairwise(const void *sendbuf, void *recvbuf, const int *recvcnts, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, int root, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ireduce_scatter_block_intra(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ireduce_scatter_block_inter(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ireduce_scatter_block_rec_hlv(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ireduce_scatter_block_pairwise(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ireduce_scatter_block_rec_dbl(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ireduce_scatter_block_noncomm(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ialltoall_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ialltoall_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ialltoall_inplace(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ialltoall_bruck(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ialltoall_perm_sr(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ialltoall_pairwise(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Iallgather_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Iallgather_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Iallgather_rec_dbl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Iallgather_bruck(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Iallgather_ring(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Iallgatherv_rec_dbl(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Iallgatherv_bruck(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Iallgatherv_ring(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Iallgatherv_intra(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Iallgatherv_inter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Iscan_rec_dbl(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Iscan_SMP(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Iexscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ialltoallw_intra(const void *sendbuf, const int *sendcounts, const int *sdispls, const MPI_Datatype *sendtypes, void *recvbuf, const int *recvcounts, const int *rdispls, const MPI_Datatype *recvtypes, MPIR_Comm *comm_ptr, MPIR_Sched_t s); int MPIR_Ialltoallw_inter(const void *sendbuf, const int *sendcounts, const int *sdispls, const MPI_Datatype *sendtypes, void *recvbuf, const int *recvcounts, const int *rdispls, const MPI_Datatype *recvtypes, MPIR_Comm *comm_ptr, MPIR_Sched_t s); #endif /* MPIR_COLL_H_INCLUDED */ # 452 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_coll.h" # 220 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_func.h" #endif /* expanded by -frewrite-includes */ # 220 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_func.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2008 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPIR_FUNC_H_INCLUDED #define MPIR_FUNC_H_INCLUDED /* In MPICH, each function has an "enter" and "exit" macro. These can be * used to add various features to each function at compile time, or they * can be set to empty to provide the fastest possible production version. * * There are at this time three choices of features (beyond the empty choice) * 1. timing * These collect data on when each function began and finished; the * resulting data can be displayed using special programs * 2. Debug logging (selected with --enable-g=log) * Invokes MPL_DBG_MSG at the entry and exit for each routine * 3. Additional memory validation of the memory arena (--enable-g=memarena) */ /* function enter and exit macros */ #if defined(MPL_USE_DBG_LOGGING) #define MPIR_FUNC_ENTER(a) MPL_DBG_MSG(MPL_DBG_ROUTINE_ENTER,TYPICAL,"Entering "#a) #elif defined(MPICH_DEBUG_MEMARENA) # 27 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_func.h" #define MPIR_FUNC_ENTER(a) MPL_trvalid("Entering " #a) #endif # 29 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_func.h" #if defined(MPL_USE_DBG_LOGGING) #define MPIR_FUNC_EXIT(a) MPL_DBG_MSG(MPL_DBG_ROUTINE_EXIT,TYPICAL,"Leaving "#a) #elif defined(MPICH_DEBUG_MEMARENA) # 33 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_func.h" #define MPIR_FUNC_EXIT(a) MPL_trvalid("Leaving " #a) #endif # 35 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_func.h" /* state declaration macros */ #if defined(MPL_USE_DBG_LOGGING) || defined(MPICH_DEBUG_MEMARENA) #define MPIR_FUNC_TERSE_STATE_DECL(a) #define MPIR_FUNC_TERSE_INIT_STATE_DECL(a) #define MPIR_FUNC_TERSE_FINALIZE_STATE_DECL(a) #define MPIR_FUNC_TERSE_ENTER(a) MPIR_FUNC_ENTER(a) #define MPIR_FUNC_TERSE_EXIT(a) MPIR_FUNC_EXIT(a) #define MPIR_FUNC_TERSE_PT2PT_ENTER(a) MPIR_FUNC_ENTER(a) #define MPIR_FUNC_TERSE_PT2PT_EXIT(a) MPIR_FUNC_EXIT(a) #define MPIR_FUNC_TERSE_PT2PT_ENTER_FRONT(a) MPIR_FUNC_ENTER(a) #define MPIR_FUNC_TERSE_PT2PT_EXIT_FRONT(a) MPIR_FUNC_EXIT(a) #define MPIR_FUNC_TERSE_PT2PT_ENTER_BACK(a) MPIR_FUNC_ENTER(a) #define MPIR_FUNC_TERSE_PT2PT_ENTER_BOTH(a) MPIR_FUNC_ENTER(a) #define MPIR_FUNC_TERSE_PT2PT_EXIT_BACK(a) MPIR_FUNC_EXIT(a) #define MPIR_FUNC_TERSE_PT2PT_EXIT_BOTH(a) MPIR_FUNC_EXIT(a) #define MPIR_FUNC_TERSE_COLL_ENTER(a) MPIR_FUNC_ENTER(a) #define MPIR_FUNC_TERSE_COLL_EXIT(a) MPIR_FUNC_EXIT(a) #define MPIR_FUNC_TERSE_RMA_ENTER(a) MPIR_FUNC_ENTER(a) #define MPIR_FUNC_TERSE_RMA_EXIT(a) MPIR_FUNC_EXIT(a) #define MPIR_FUNC_TERSE_INIT_ENTER(a) MPIR_FUNC_ENTER(a) #define MPIR_FUNC_TERSE_INIT_EXIT(a) MPIR_FUNC_EXIT(a) #define MPIR_FUNC_TERSE_FINALIZE_ENTER(a) MPIR_FUNC_ENTER(a) #define MPIR_FUNC_TERSE_FINALIZE_EXIT(a) MPIR_FUNC_EXIT(a) #define MPIR_FUNC_VERBOSE_STATE_DECL(a) #define MPIR_FUNC_VERBOSE_ENTER(a) MPIR_FUNC_ENTER(a) #define MPIR_FUNC_VERBOSE_EXIT(a) MPIR_FUNC_EXIT(a) #define MPIR_FUNC_VERBOSE_PT2PT_ENTER(a) MPIR_FUNC_ENTER(a) #define MPIR_FUNC_VERBOSE_PT2PT_EXIT(a) MPIR_FUNC_EXIT(a) #define MPIR_FUNC_VERBOSE_RMA_ENTER(a) MPIR_FUNC_ENTER(a) #define MPIR_FUNC_VERBOSE_RMA_EXIT(a) MPIR_FUNC_EXIT(a) #define MPII_Timer_init(rank, size) #define MPII_Timer_finalize() #else /* ! defined(MPL_USE_DBG_LOGGING) && ! defined(MPICH_DEBUG_MEMARENA) */ # 73 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_func.h" /* Routine tracing (see --enable-timing for control of this) */ #if defined(HAVE_TIMING) && (HAVE_TIMING == MPICH_TIMING_KIND__LOG || \ HAVE_TIMING == MPICH_TIMING_KIND__LOG_DETAILED || \ HAVE_TIMING == MPICH_TIMING_KIND__ALL || \ HAVE_TIMING == MPICH_TIMING_KIND__RUNTIME) #if 0 /* expanded by -frewrite-includes */ #include "mpiallstates.h" #endif /* expanded by -frewrite-includes */ # 80 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_func.h" # 81 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_func.h" #if (USE_LOGGING == MPICH_LOGGING__RLOG) #if 0 /* expanded by -frewrite-includes */ #include "rlog_macros.h" #endif /* expanded by -frewrite-includes */ # 83 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_func.h" # 84 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_func.h" #elif (USE_LOGGING == MPICH_LOGGING__EXTERNAL) # 85 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_func.h" #if 0 /* expanded by -frewrite-includes */ #include "mpilogging.h" #endif /* expanded by -frewrite-includes */ # 85 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_func.h" # 86 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_func.h" #else # 87 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_func.h" #error You must select a logging library if timing is enabled #endif # 89 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_func.h" #else /* HAVE_TIMING and doing logging */ # 91 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_func.h" #define MPII_Timer_init(rank, size) #define MPII_Timer_finalize() #define MPIR_FUNC_TERSE_STATE_DECL(a) #define MPIR_FUNC_TERSE_INIT_STATE_DECL(a) #define MPIR_FUNC_TERSE_FINALIZE_STATE_DECL(a) #define MPIR_FUNC_TERSE_EXIT(a) #define MPIR_FUNC_TERSE_ENTER(a) #define MPIR_FUNC_TERSE_PT2PT_ENTER(a) #define MPIR_FUNC_TERSE_PT2PT_ENTER_FRONT(a) #define MPIR_FUNC_TERSE_PT2PT_EXIT_FRONT(a) #define MPIR_FUNC_TERSE_PT2PT_ENTER_BACK(a) #define MPIR_FUNC_TERSE_PT2PT_ENTER_BOTH(a) #define MPIR_FUNC_TERSE_PT2PT_EXIT(a) #define MPIR_FUNC_TERSE_PT2PT_EXIT_BACK(a) #define MPIR_FUNC_TERSE_PT2PT_EXIT_BOTH(a) #define MPIR_FUNC_TERSE_COLL_ENTER(a) #define MPIR_FUNC_TERSE_COLL_EXIT(a) #define MPIR_FUNC_TERSE_RMA_ENTER(a) #define MPIR_FUNC_TERSE_RMA_EXIT(a) #define MPIR_FUNC_TERSE_INIT_ENTER(a) #define MPIR_FUNC_TERSE_INIT_EXIT(a) #define MPIR_FUNC_TERSE_FINALIZE_ENTER(a) #define MPIR_FUNC_TERSE_FINALIZE_EXIT(a) #define MPIR_FUNC_VERBOSE_STATE_DECL(a) #define MPIR_FUNC_VERBOSE_ENTER(a) #define MPIR_FUNC_VERBOSE_EXIT(a) #define MPIR_FUNC_VERBOSE_PT2PT_ENTER(a) #define MPIR_FUNC_VERBOSE_PT2PT_EXIT(a) #define MPIR_FUNC_VERBOSE_RMA_ENTER(a) #define MPIR_FUNC_VERBOSE_RMA_EXIT(a) #endif /* HAVE_TIMING */ # 126 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_func.h" #endif /* ! defined(MPL_USE_DBG_LOGGING) && ! defined(MPICH_DEBUG_MEMARENA) */ # 128 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_func.h" #endif /* MPIR_FUNC_H_INCLUDED */ # 130 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_func.h" # 221 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_err.h" #endif /* expanded by -frewrite-includes */ # 221 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_err.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPIR_ERR_H_INCLUDED #define MPIR_ERR_H_INCLUDED /* Error severity */ #define MPIR_ERR_FATAL 1 #define MPIR_ERR_RECOVERABLE 0 struct MPIR_Comm; struct MPIR_Win; /* Bindings for internal routines */ int MPIR_Err_return_comm( struct MPIR_Comm *, const char [], int ); int MPIR_Err_return_win( struct MPIR_Win *, const char [], int ); #ifdef MPI__FILE_DEFINED /* Only define if we have MPI_File */ int MPIR_Err_return_file( MPI_File, const char [], int ); /* Romio version */ #endif # 24 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_err.h" /* FIXME: * Update this description to match the current version of the routine, * in particular, the pseudo-format types (even better, fix it so that * the pseudo format types can work with the format attribute check). */ /*@ MPIR_Err_create_code - Create an error code and associated message to report an error Input Parameters: + lastcode - Previous error code (see notes) . severity - Indicates severity of error . fcname - Name of the function in which the error has occurred. . line - Line number (usually '__LINE__') . class - Error class . generic_msg - A generic message to be used if not instance-specific message is available . instance_msg - A message containing printf-style formatting commands that, when combined with the instance_parameters, specify an error message containing instance-specific data. - instance_parameters - The remaining parameters. These must match the formatting commands in 'instance_msg'. Notes: A typical use is\: .vb mpi_errno = MPIR_Err_create_code( mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_RANK, "Invalid Rank", "Invalid rank %d", rank ); .ve Predefined message may also be used. Any message that uses the prefix '"**"' will be looked up in a table. This allows standardized messages to be used for a message that is used in several different locations in the code. For example, the name '"**rank"' might be used instead of '"Invalid Rank"'; this would also allow the message to be made more specific and useful, such as .vb Invalid rank provided. The rank must be between 0 and the 1 less than the size of the communicator in this call. .ve This interface is compatible with the 'gettext' interface for internationalization, in the sense that the 'generic_msg' and 'instance_msg' may be used as arguments to 'gettext' to return a string in the appropriate language; the implementation of 'MPID_Err_create_code' can then convert this text into the appropriate code value. The current set of formatting commands is undocumented and will change. You may safely use '%d' and '%s' (though only use '%s' for names of objects, not text messages, as using '%s' for a message breaks support for internationalization. This interface allows error messages to be chained together. The first argument is the last error code; if there is no previous error code, use 'MPI_SUCCESS'. Extended Format Specifiers: In addition to the standard format specifies (e.g., %d for an int value), MPIR_Err_create_code accepts some additional values that correspond to various MPI types: + i - an MPI rank; recognizes 'MPI_ANY_SOURCE', 'MPI_PROC_NULL', and 'MPI_ROOT' . t - an MPI tag; recognizes 'MPI_ANY_TAG'. . A - an MPI assert value. . C - an MPI communicator. . D - an MPI datatype. . E - an MPI Errhandler. . F - an MPI File object. . G - an MPI Group. . I - an MPI info object. . O - an MPI Op. . R - an MPI Request. - W - an MPI Window object. Module: Error @*/ int MPIR_Err_create_code( int, int, const char [], int, int, const char [], const char [], ... ); #ifdef USE_ERR_CODE_VALIST int MPIR_Err_create_code_valist( int, int, const char [], int, int, const char [], const char [], va_list ); #endif # 108 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_err.h" /*@ MPIR_Err_combine_codes - Combine two error codes, or more importantly two lists of error messages. The list associated with the second error code is appended to the list associated with the first error code. If the list associated with the first error code has a dangling tail, which is possible if the ring has wrapped and overwritten entries that were once part of the list, then the append operation is not performed and the error code for the first list is returned. Input Parameter: + errorcode1 - the error code associated with the first list - errorcode2 - the error code associated with the second list Return value: An error code which resolves to the combined list of error messages Notes: If errorcode1 is equal to MPI_SUCCESS, then errorcode2 is returned. Likewise, if errorcode2 is equal to MPI_SUCCESS, then errorcode1 is returned. Module: Error @*/ int MPIR_Err_combine_codes(int, int); int MPIR_Err_is_fatal(int); void MPIR_Err_init(void); void MPIR_Err_preOrPostInit( void ); int MPIR_Err_set_msg( int code, const char *msg_string ); /* This routine is called when there is a fatal error. Now public because file * error handling is defined in a separate file from comm and win, but all * three need to call it */ void MPIR_Handle_fatal_error(struct MPIR_Comm *comm_ptr, const char fcname[], int errcode); #define MPIR_ERR_CLASS_MASK 0x0000007f #define MPIR_ERR_CLASS_SIZE 128 #define MPIR_ERR_GET_CLASS(mpi_errno_) (mpi_errno_ & MPIR_ERR_CLASS_MASK) /* ------------------------------------------------------------------------- */ /* mpir_err.h */ /* ------------------------------------------------------------------------- */ /* === BEGIN_MPI_T_CVAR_INFO_BLOCK === cvars: - name : MPIR_CVAR_COLL_ALIAS_CHECK category : COLLECTIVE type : int default : 1 class : device verbosity : MPI_T_VERBOSITY_USER_BASIC scope : MPI_T_SCOPE_ALL_EQ description : >- Enable checking of aliasing in collective operations === END_MPI_T_CVAR_INFO_BLOCK === */ /* Error checking (see --enable-error-checking for control of this) */ #ifdef HAVE_ERROR_CHECKING #define MPID_ERROR_LEVEL_ALL 1 #define MPID_ERROR_LEVEL_RUNTIME 2 /* Use MPID_ERROR_DECL to wrap declarations that are needed only when error checking is turned on */ #define MPID_ERROR_DECL(a) a #if HAVE_ERROR_CHECKING == MPID_ERROR_LEVEL_ALL #define MPID_BEGIN_ERROR_CHECKS #define MPID_END_ERROR_CHECKS #define MPID_ELSE_ERROR_CHECKS #elif HAVE_ERROR_CHECKING == MPID_ERROR_LEVEL_RUNTIME # 187 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_err.h" #define MPID_BEGIN_ERROR_CHECKS if (MPIR_Process.do_error_checks) { #define MPID_ELSE_ERROR_CHECKS }else{ #define MPID_END_ERROR_CHECKS } #else # 191 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_err.h" #error "Unknown value for error checking" #endif # 193 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_err.h" #else # 195 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_err.h" #define MPID_BEGIN_ERROR_CHECKS #define MPID_END_ERROR_CHECKS #define MPID_ERROR_DECL(a) #endif /* HAVE_ERROR_CHECKING */ # 199 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_err.h" /* * Standardized error checking macros. These provide the correct tests for * common tests. These set err with the encoded error value. */ #define MPIR_ERRTEST_SEND_TAG(tag,err) \ if ((tag) < 0 || (tag) > MPIR_Process.attrs.tag_ub) { \ err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ MPI_ERR_TAG, "**tag", "**tag %d", tag); \ goto fn_fail; \ } #define MPIR_ERRTEST_RECV_TAG(tag,err) \ if ((tag) < MPI_ANY_TAG || (tag) > MPIR_Process.attrs.tag_ub) { \ err = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ MPI_ERR_TAG, "**tag", "**tag %d", tag ); \ goto fn_fail; \ } #define MPIR_ERRTEST_RANK(comm_ptr,rank,err) \ if ((rank) < 0 || (rank) >= (comm_ptr)->remote_size) { \ err = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ MPI_ERR_RANK, "**rank", "**rank %d %d", rank, \ (comm_ptr)->remote_size ); \ goto fn_fail; \ } #define MPIR_ERRTEST_SEND_RANK(comm_ptr,rank,err) \ if ((rank) < MPI_PROC_NULL || (rank) >= (comm_ptr)->remote_size) { \ err = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ MPI_ERR_RANK, "**rank", "**rank %d %d", rank, \ (comm_ptr)->remote_size ); \ goto fn_fail; \ } #define MPIR_ERRTEST_RECV_RANK(comm_ptr,rank,err) \ if ((rank) < MPI_ANY_SOURCE || (rank) >= (comm_ptr)->remote_size) { \ err = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ MPI_ERR_RANK, "**rank", "**rank %d %d", rank, \ (comm_ptr)->remote_size ); \ goto fn_fail; \ } #define MPIR_ERRTEST_COUNT(count,err) \ if ((count) < 0) { \ err = MPIR_Err_create_code(MPI_SUCCESS, \ MPIR_ERR_RECOVERABLE, \ FCNAME, __LINE__, \ MPI_ERR_COUNT, \ "**countneg", \ "**countneg %d", \ count ); \ goto fn_fail; \ } #define MPIR_ERRTEST_DISP(disp,err) \ if ((disp) < 0) { \ err = MPIR_Err_create_code(MPI_SUCCESS, \ MPIR_ERR_RECOVERABLE, \ FCNAME, __LINE__, \ MPI_ERR_DISP, \ "**rmadisp", 0 ); \ goto fn_fail; \ } #define MPIR_ERRTEST_ALIAS(ptr1,ptr2,err) \ if ((ptr1)==(ptr2) && (ptr1) != MPI_BOTTOM) { \ err = MPIR_Err_create_code(MPI_SUCCESS, \ MPIR_ERR_RECOVERABLE, \ FCNAME, __LINE__, \ MPI_ERR_BUFFER, \ "**bufalias", 0 ); \ goto fn_fail; \ } /* FIXME this test is probably too broad. Comparing the (buffer,type,count) * tuples is really what is needed to check for aliasing. */ #define MPIR_ERRTEST_ALIAS_COLL(ptr1,ptr2,err) \ if (MPIR_CVAR_COLL_ALIAS_CHECK && (ptr1)==(ptr2)) { \ err = MPIR_Err_create_code(MPI_SUCCESS, \ MPIR_ERR_RECOVERABLE, \ FCNAME, __LINE__, \ MPI_ERR_BUFFER, \ "**bufalias", 0 ); \ goto fn_fail; \ } #define MPIR_ERRTEST_ARGNULL(arg,arg_name,err) \ if (!(arg)) { \ err = MPIR_Err_create_code(MPI_SUCCESS, \ MPIR_ERR_RECOVERABLE, \ FCNAME, __LINE__, \ MPI_ERR_ARG, \ "**nullptr", \ "**nullptr %s", \ arg_name ); \ goto fn_fail; \ } #define MPIR_ERRTEST_ARGNEG(arg,arg_name,err) \ if ((arg) < 0) { \ err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, \ FCNAME, __LINE__, MPI_ERR_ARG, \ "**argneg", \ "**argneg %s %d", arg_name, arg ); \ goto fn_fail; \ } #define MPIR_ERRTEST_ARGNONPOS(arg,arg_name,err,errclass) \ if ((arg) <= 0) { \ err = MPIR_Err_create_code(MPI_SUCCESS, \ MPIR_ERR_RECOVERABLE, \ FCNAME, __LINE__, \ errclass, \ "**argnonpos", \ "**argnonpos %s %d", \ arg_name, arg ); \ goto fn_fail; \ } /* An intracommunicator must have a root between 0 and local_size-1. */ /* intercomm can be between MPI_PROC_NULL (or MPI_ROOT) and remote_size-1 */ #define MPIR_ERRTEST_INTRA_ROOT(comm_ptr,root,err) \ if ((root) < 0 || (root) >= (comm_ptr)->local_size) { \ err = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ MPI_ERR_ROOT, "**root", "**root %d", root ); \ goto fn_fail; \ } /* We use -2 (MPI_PROC_NULL and MPI_ROOT are negative) for the intercomm test */ #define MPIR_ERRTEST_INTER_ROOT(comm_ptr,root,err) \ if ((root) < -3 || (root) >= (comm_ptr)->remote_size) { \ err = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ MPI_ERR_ROOT, "**root", "**root %d", root ); \ goto fn_fail; \ } #define MPIR_ERRTEST_PERSISTENT(reqp,err) \ if ((reqp)->kind != MPIR_REQUEST_KIND__PREQUEST_SEND && reqp->kind != MPIR_REQUEST_KIND__PREQUEST_RECV) { \ err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ MPI_ERR_REQUEST, "**requestnotpersist", 0 ); \ goto fn_fail; \ } #define MPIR_ERRTEST_PERSISTENT_ACTIVE(reqp,err) \ if (((reqp)->kind == MPIR_REQUEST_KIND__PREQUEST_SEND || \ reqp->kind == MPIR_REQUEST_KIND__PREQUEST_RECV) && reqp->u.persist.real_request != NULL) { \ err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ MPI_ERR_REQUEST, "**requestpersistactive", 0 ); \ goto fn_fail; \ } #define MPIR_ERRTEST_COMM_INTRA(comm_ptr, err ) \ if ((comm_ptr)->comm_kind != MPIR_COMM_KIND__INTRACOMM) { \ err = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ MPI_ERR_COMM,"**commnotintra",0); \ goto fn_fail; \ } #define MPIR_ERRTEST_COMM_TAG(tag,err) \ if ((tag) < 0 || (tag) > MPIR_Process.attrs.tag_ub) { \ err = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ MPI_ERR_TAG, "**tag", "**tag %d", tag); \ goto fn_fail; \ } /* Tests for totally meaningless datatypes first, then for * MPI_DATATYPE_NULL as a separate case. */ #define MPIR_ERRTEST_DATATYPE(datatype, name_, err_) \ { \ if (HANDLE_GET_MPI_KIND(datatype) != MPIR_DATATYPE || \ (HANDLE_GET_KIND(datatype) == HANDLE_KIND_INVALID && \ datatype != MPI_DATATYPE_NULL)) \ { \ err_ = MPIR_Err_create_code(MPI_SUCCESS, \ MPIR_ERR_RECOVERABLE, \ FCNAME, __LINE__, \ MPI_ERR_TYPE, \ "**dtype", 0 ); \ goto fn_fail; \ } \ if (datatype == MPI_DATATYPE_NULL) \ { \ err_ = MPIR_Err_create_code(MPI_SUCCESS, \ MPIR_ERR_RECOVERABLE, \ FCNAME, __LINE__, \ MPI_ERR_TYPE, \ "**dtypenull", \ "**dtypenull %s", \ name_); \ goto fn_fail; \ } \ } #define MPIR_ERRTEST_TYPE_RMA_ATOMIC(datatype_, err_) \ do { \ if (!MPIR_Type_is_rma_atomic(datatype_)) { \ err_ = MPIR_Err_create_code(MPI_SUCCESS, \ MPIR_ERR_RECOVERABLE, \ FCNAME, __LINE__, \ MPI_ERR_TYPE, \ "**rmatypenotatomic", \ "**rmatypenotatomic %D", \ datatype); \ goto fn_fail; \ } \ } while (0) #define MPIR_ERRTEST_WIN_FLAVOR(win_, flavor_, err_) \ do { \ if ((win_)->create_flavor != (flavor_)) { \ MPIR_ERR_SETANDSTMT1((err_), MPI_ERR_RMA_FLAVOR, \ goto fn_fail, "**winflavor", \ "**winflavor %s", #flavor_); \ } \ } while (0) #define MPIR_ERRTEST_SENDBUF_INPLACE(sendbuf,count,err) \ if (count > 0 && sendbuf == MPI_IN_PLACE) { \ err = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ MPI_ERR_BUFFER, "**sendbuf_inplace", 0 ); \ goto fn_fail; \ } #define MPIR_ERRTEST_RECVBUF_INPLACE(recvbuf,count,err) \ if (count > 0 && recvbuf == MPI_IN_PLACE) { \ err = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ MPI_ERR_BUFFER, "**recvbuf_inplace", 0 ); \ goto fn_fail; \ } #define MPIR_ERRTEST_BUF_INPLACE(buf,count,err) \ if (count > 0 && buf == MPI_IN_PLACE) { \ err = MPIR_Err_create_code( MPI_SUCCESS, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, \ MPI_ERR_BUFFER, "**buf_inplace", 0 ); \ goto fn_fail; \ } #define MPIR_ERRTEST_NAMED_BUF_INPLACE(buf, bufname, count, err) \ do { \ if (count > 0 && buf == MPI_IN_PLACE) { \ MPIR_ERR_SETANDJUMP1(err, MPI_ERR_BUFFER, "**buf_inplace", \ "**buf_inplace %s", bufname); \ } \ } while (0) /* * Check that the triple (buf,count,datatype) does not specify a null * buffer. This does not guarantee that the buffer is valid but does * catch the most common problems. * Question: * Should this be an (inlineable) routine? * Since it involves extracting the datatype pointer for non-builtin * datatypes, should it take a dtypeptr argument (valid only if not * builtin)? */ #define MPIR_ERRTEST_USERBUFFER(buf,count,dtype,err) \ if (count > 0 && buf == 0) { \ int ferr = 0; \ if (HANDLE_GET_KIND(dtype) == HANDLE_KIND_BUILTIN) { ferr=1; } \ else { \ MPI_Aint errsize; \ MPIR_Datatype *errdtypeptr; \ MPID_Datatype_get_ptr(dtype,errdtypeptr); \ MPID_Datatype_get_size_macro(dtype,errsize); \ if (errdtypeptr && errdtypeptr->true_lb == 0 && \ errsize > 0) { ferr=1; } \ } \ if (ferr) { \ err = MPIR_Err_create_code(MPI_SUCCESS, \ MPIR_ERR_RECOVERABLE, \ FCNAME, __LINE__, \ MPI_ERR_BUFFER, \ "**bufnull", 0 ); \ goto fn_fail; \ } \ } /* The following are placeholders. We haven't decided yet whether these should take a handle or pointer, or if they should take a handle and return a pointer if the handle is valid. These need to be rationalized with the MPID_xxx_valid_ptr and MPID_xxx_get_ptr. [BRT] They should not take a handle and return a pointer if they will be placed inside of a #ifdef HAVE_ERROR_CHECKING block. Personally, I think the macros should take handles. We already have macros for validating pointers to various objects. */ /* --BEGIN ERROR MACROS-- */ #define MPIR_ERRTEST_VALID_HANDLE(handle_,kind_,err_,errclass_,gmsg_) { \ if (HANDLE_GET_MPI_KIND(handle_) != kind_ || \ HANDLE_GET_KIND(handle_) == HANDLE_KIND_INVALID) { \ MPIR_ERR_SETANDSTMT(err_,errclass_,goto fn_fail,gmsg_); \ } \ } /* --END ERROR MACROS-- */ #define MPIR_ERRTEST_OP(op,err) \ do { \ if (op == MPI_OP_NULL) { \ MPIR_ERR_SETANDSTMT(err,MPI_ERR_OP,goto fn_fail,"**opnull"); \ } \ else if (op == MPI_NO_OP || op == MPI_REPLACE) { \ MPIR_ERR_SETANDSTMT(err,MPI_ERR_OP,goto fn_fail,"**opnotallowed"); \ } \ else { \ MPIR_ERRTEST_VALID_HANDLE(op,MPIR_OP,err,MPI_ERR_OP,"**op"); \ } \ } while (0) #define MPIR_ERRTEST_OP_ACC(op,err) \ do { \ if (op == MPI_OP_NULL) { \ MPIR_ERR_SETANDSTMT(err,MPI_ERR_OP,goto fn_fail,"**opnull"); \ } \ else if (op == MPI_NO_OP) { \ MPIR_ERR_SETANDSTMT(err,MPI_ERR_OP,goto fn_fail,"**opnotallowed"); \ } \ else { \ MPIR_ERRTEST_VALID_HANDLE(op,MPIR_OP,err,MPI_ERR_OP,"**op"); \ } \ if (HANDLE_GET_KIND(op) != HANDLE_KIND_BUILTIN) { \ MPIR_ERR_SETANDSTMT(err,MPI_ERR_OP,goto fn_fail,"**opnotpredefined"); \ } \ } while (0) #define MPIR_ERRTEST_OP_GACC(op,err) \ do { \ if (op == MPI_OP_NULL) { \ MPIR_ERR_SETANDSTMT(err,MPI_ERR_OP,goto fn_fail,"**opnull"); \ } \ else { \ MPIR_ERRTEST_VALID_HANDLE(op,MPIR_OP,err,MPI_ERR_OP,"**op"); \ } \ if (HANDLE_GET_KIND(op) != HANDLE_KIND_BUILTIN) { \ MPIR_ERR_SETANDSTMT(err,MPI_ERR_OP,goto fn_fail,"**opnotpredefined"); \ } \ } while (0) #define MPIR_ERRTEST_GROUP(group,err) \ if (group == MPI_GROUP_NULL) { \ MPIR_ERR_SETANDSTMT(err,MPI_ERR_GROUP,goto fn_fail,"**groupnull"); \ } \ else { \ MPIR_ERRTEST_VALID_HANDLE(group,MPIR_GROUP,err,MPI_ERR_GROUP,"**group"); \ } #define MPIR_ERRTEST_COMM(comm_, err_) \ { \ if ((comm_) == MPI_COMM_NULL) \ { \ MPIR_ERR_SETANDSTMT((err_), MPI_ERR_COMM,goto fn_fail,"**commnull"); \ } \ else \ { \ MPIR_ERRTEST_VALID_HANDLE((comm_), MPIR_COMM, (err_), MPI_ERR_COMM, "**comm"); \ } \ } #define MPIR_ERRTEST_WIN(win_, err_) \ { \ if ((win_) == MPI_WIN_NULL) \ { \ MPIR_ERR_SETANDSTMT((err_), MPI_ERR_WIN,goto fn_fail, "**winnull"); \ } \ else \ { \ MPIR_ERRTEST_VALID_HANDLE((win_), MPIR_WIN, (err_), MPI_ERR_WIN, "**win"); \ } \ } #define MPIR_ERRTEST_REQUEST(request_, err_) \ { \ if ((request_) == MPI_REQUEST_NULL) \ { \ MPIR_ERR_SETANDSTMT((err_), MPI_ERR_REQUEST,goto fn_fail, "**requestnull"); \ } \ else \ { \ MPIR_ERRTEST_VALID_HANDLE((request_), MPIR_REQUEST, (err_), MPI_ERR_REQUEST, "**request"); \ } \ } #define MPIR_ERRTEST_REQUEST_OR_NULL(request_, err_) \ { \ if ((request_) != MPI_REQUEST_NULL) \ { \ MPIR_ERRTEST_VALID_HANDLE((request_), MPIR_REQUEST, (err_), MPI_ERR_REQUEST, "**request"); \ } \ } /* This macro does *NOT* jump to fn_fail - all uses check mpi_errno */ #define MPIR_ERRTEST_ARRAYREQUEST_OR_NULL(request_, i_, err_) \ { \ if ((request_) != MPI_REQUEST_NULL) \ { \ if (HANDLE_GET_MPI_KIND(request_) != MPIR_REQUEST) { \ MPIR_ERR_SETANDSTMT2(err_,MPI_ERR_REQUEST,goto fn_fail, \ "**request_invalid_kind","**request_invalid_kind %d %d", \ i_, HANDLE_GET_MPI_KIND(request_)); \ } \ else if (HANDLE_GET_KIND(request_) == HANDLE_KIND_INVALID) { \ MPIR_ERR_SETANDSTMT1(err_,MPI_ERR_REQUEST,goto fn_fail, \ "**request","**request %d", i_ ); \ } \ } \ } #define MPIR_ERRTEST_ERRHANDLER(errhandler_,err_) \ if (errhandler_ == MPI_ERRHANDLER_NULL) { \ MPIR_ERR_SETANDSTMT(err_,MPI_ERR_ARG,goto fn_fail,"**errhandlernull"); \ } \ else { \ MPIR_ERRTEST_VALID_HANDLE(errhandler_,MPIR_ERRHANDLER, \ err_,MPI_ERR_ARG,"**errhandler"); \ } #define MPIR_ERRTEST_INFO(info_, err_) \ { \ if ((info_) == MPI_INFO_NULL) \ { \ MPIR_ERR_SETANDSTMT(err_, MPI_ERR_ARG,goto fn_fail, "**infonull"); \ } \ else \ { \ MPIR_ERRTEST_VALID_HANDLE((info_), MPIR_INFO, (err_), MPI_ERR_ARG, "**info"); \ } \ } #define MPIR_ERRTEST_INFO_OR_NULL(info_, err_) \ { \ if ((info_) != MPI_INFO_NULL) \ { \ MPIR_ERRTEST_VALID_HANDLE((info_), MPIR_INFO, (err_), MPI_ERR_ARG, "**info"); \ } \ } #define MPIR_ERRTEST_KEYVAL(keyval_, object_, objectdesc_, err_) \ { \ if ((keyval_) == MPI_KEYVAL_INVALID) \ { \ MPIR_ERR_SETANDSTMT(err_, MPI_ERR_KEYVAL,goto fn_fail, "**keyvalinvalid"); \ } \ else if (HANDLE_GET_MPI_KIND(keyval_) != MPIR_KEYVAL) \ { \ MPIR_ERR_SETANDSTMT(err_, MPI_ERR_KEYVAL,goto fn_fail, "**keyval"); \ } \ else if ((((keyval_) & 0x03c00000) >> 22) != (object_)) \ { \ MPIR_ERR_SETANDSTMT1(err_, MPI_ERR_KEYVAL,goto fn_fail, "**keyvalobj", \ "**keyvalobj %s", (objectdesc_)); \ } \ } #define MPIR_ERRTEST_KEYVAL_PERM(keyval_, err_) \ { \ if (HANDLE_GET_MPI_KIND(keyval_) == MPIR_KEYVAL && \ HANDLE_GET_KIND(keyval_) == HANDLE_KIND_BUILTIN) \ { \ MPIR_ERR_SETANDSTMT(err_, MPI_ERR_KEYVAL,goto fn_fail, "**permattr"); \ } \ } #ifdef HAVE_ERROR_CHECKING #define MPIR_ERRTEST_MPIT_INITIALIZED(err_) \ do { \ if (!MPIR_T_is_initialized()) { \ MPIR_ERR_SETANDSTMT(err_, MPI_T_ERR_NOT_INITIALIZED, goto fn_fail, "**mpitinit"); \ } \ } while (0) #else # 672 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_err.h" #define MPIR_ERRTEST_MPIT_INITIALIZED(err_) #endif # 674 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_err.h" #define MPIR_ERRTEST_CAT_INDEX(index_,err_) \ do { \ if ((index_) < 0 || (index_) >= utarray_len(cat_table)) \ { \ MPIR_ERR_SETANDSTMT(err_, MPI_T_ERR_INVALID_INDEX, goto fn_fail, "**catindex"); \ } \ } while (0) #define MPIR_ERRTEST_ENUM_HANDLE(handle_, err_) \ do { \ if ((handle_) == MPI_T_ENUM_NULL) \ { \ MPIR_ERR_SETANDSTMT(err_, MPI_T_ERR_INVALID_HANDLE, goto fn_fail, "**enumhandlenull"); \ } \ else if ((handle_)->kind != MPIR_T_ENUM_HANDLE) \ { \ MPIR_ERR_SETANDSTMT(err_, MPI_T_ERR_INVALID_HANDLE, goto fn_fail, "**enumhandle"); \ } \ } while (0) #define MPIR_ERRTEST_ENUM_ITEM(enum_, index_, err_) \ do { \ if ((index_) < 0 || (index_) >= utarray_len((enum_)->items)) \ { \ MPIR_ERR_SETANDSTMT(err_, MPI_T_ERR_INVALID_ITEM, goto fn_fail, "**itemindex"); \ } \ } while (0) #define MPIR_ERRTEST_CVAR_INDEX(index_,err_) \ do { \ if ((index_) < 0 || (index_) >= utarray_len(cvar_table)) \ { \ MPIR_ERR_SETANDSTMT(err_, MPI_T_ERR_INVALID_INDEX, goto fn_fail, "**cvarindex"); \ } \ } while (0) #define MPIR_ERRTEST_CVAR_HANDLE(handle_, err_) \ do { \ if ((handle_) == MPI_T_CVAR_HANDLE_NULL) \ { \ MPIR_ERR_SETANDSTMT(err_, MPI_T_ERR_INVALID_HANDLE, goto fn_fail, "**cvarhandlenull"); \ } \ else if ((handle_)->kind != MPIR_T_CVAR_HANDLE) \ { \ MPIR_ERR_SETANDSTMT(err_, MPI_T_ERR_INVALID_HANDLE, goto fn_fail, "**cvarhandle"); \ } \ } while (0) #define MPIR_ERRTEST_PVAR_INDEX(index_,err_) \ do { \ if ((index_) < 0 || (index_) >= utarray_len(pvar_table)) \ { \ MPIR_ERR_SETANDSTMT(err_, MPI_T_ERR_INVALID_INDEX, goto fn_fail, "**pvarindex"); \ } \ } while (0) #define MPIR_ERRTEST_PVAR_HANDLE(handle_, err_) \ do { \ if (handle_ == MPI_T_PVAR_HANDLE_NULL) \ { \ MPIR_ERR_SETANDSTMT(err_,MPI_T_ERR_INVALID_HANDLE, goto fn_fail,"**pvarhandlenull"); \ } \ else if ((handle_)->kind != MPIR_T_PVAR_HANDLE) \ { \ MPIR_ERR_SETANDSTMT(err_, MPI_T_ERR_INVALID_HANDLE, goto fn_fail, "**pvarhandle"); \ } \ } while (0) #define MPIR_ERRTEST_PVAR_SESSION(session_,err_) \ do { \ if ((session_) == MPI_T_PVAR_SESSION_NULL) \ { \ MPIR_ERR_SETANDSTMT(err_,MPI_T_ERR_INVALID_SESSION, goto fn_fail,"**pvarsessionnull"); \ } \ else if ((session_)->kind != MPIR_T_PVAR_SESSION) \ { \ MPIR_ERR_SETANDSTMT(err_, MPI_T_ERR_INVALID_SESSION, goto fn_fail, "**pvarsession"); \ } \ } while (0) /* some simple memcpy aliasing checks */ #define MPIR_ERR_CHKMEMCPYANDSTMT(err_,stmt_,src_,dst_,len_) \ MPIR_ERR_CHKANDSTMT3(MPIR_MEM_RANGES_OVERLAP((dst_),(len_),(src_),(len_)),err_,MPI_ERR_INTERN,stmt_,"**memcpyalias","**memcpyalias %p %p %L",(src_),(dst_),(long long)(len_)) #define MPIR_ERR_CHKMEMCPYANDJUMP(err_,src_,dst_,len_) \ MPIR_ERR_CHKMEMCPYANDSTMT((err_),goto fn_fail,(src_),(dst_),(len_)) /* Special MPI error "class/code" for out of memory */ /* FIXME: not yet done */ #define MPIR_ERR_MEMALLOCFAILED MPI_ERR_INTERN /* * Standardized error setting and checking macros * These are intended to simplify the insertion of standardized error * checks * */ /* --BEGIN ERROR MACROS-- */ #ifdef HAVE_ERROR_CHECKING #define MPIR_ERR_POP(err_) \ MPIR_ERR_SETANDSTMT(err_,MPI_ERR_OTHER,goto fn_fail,"**fail") #define MPIR_ERR_POP_LABEL(err_, label_) \ MPIR_ERR_SETANDSTMT(err_,MPI_ERR_OTHER,goto label_,"**fail") #define MPIR_ERR_POPFATAL(err_) \ MPIR_ERR_SETFATALANDSTMT(err_,MPI_ERR_OTHER,goto fn_fail,"**fail") #define MPIR_ERR_POPFATAL_LABEL(err_, label_) \ MPIR_ERR_SETFATALANDSTMT(err_,MPI_ERR_OTHER,goto label_,"**fail") #else # 782 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_err.h" #define MPIR_ERR_POP(err_) goto fn_fail #define MPIR_ERR_POP_LABEL(err_, label_) goto label_ #define MPIR_ERR_POPFATAL(err_) goto fn_fail #define MPIR_ERR_POPFATAL_LABEL(err_, label_) goto label_ #endif # 787 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_err.h" /* If you add any macros to this list, make sure that you update maint/extracterrmsgs to handle the additional macros (see the hash KnownErrRoutines in that script) ERR_SETSIMPLE is like ERR_SET except that it just sets the error, it doesn't add it to an existing error. This is appropriate in cases where there can be no pre-existing error, and MPI_SUCCESS is needed for the first argument to MPIR_Err_create_code . */ #ifdef HAVE_ERROR_CHECKING #define MPIR_ERR_SETSIMPLE(err_,class_,msg_) \ err_ = MPIR_Err_create_code( MPI_SUCCESS,MPIR_ERR_RECOVERABLE,FCNAME,\ __LINE__, class_, msg_, 0 ) #define MPIR_ERR_SET(err_,class_,msg_) \ err_ = MPIR_Err_create_code( err_,MPIR_ERR_RECOVERABLE,FCNAME,\ __LINE__, class_, msg_, 0 ) #define MPIR_ERR_SET1(err_,class_,gmsg_,smsg_,arg1_) \ err_ = MPIR_Err_create_code( err_,MPIR_ERR_RECOVERABLE,FCNAME,\ __LINE__, class_, gmsg_, smsg_, arg1_ ) #define MPIR_ERR_SET2(err_,class_,gmsg_,smsg_,arg1_,arg2_) \ err_ = MPIR_Err_create_code( err_,MPIR_ERR_RECOVERABLE,FCNAME,\ __LINE__, class_, gmsg_, smsg_, arg1_, arg2_ ) #define MPIR_ERR_SETANDSTMT(err_,class_,stmt_,msg_) \ do {err_ = MPIR_Err_create_code( err_,MPIR_ERR_RECOVERABLE,FCNAME,\ __LINE__, class_, msg_, 0 ); stmt_ ;} while (0) #define MPIR_ERR_SETANDSTMT1(err_,class_,stmt_,gmsg_,smsg_,arg1_) \ do {err_ = MPIR_Err_create_code( err_,MPIR_ERR_RECOVERABLE,FCNAME,\ __LINE__, class_, gmsg_, smsg_, arg1_ ); stmt_ ;} while (0) #define MPIR_ERR_SETANDSTMT2(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_) \ do {err_ = MPIR_Err_create_code( err_,MPIR_ERR_RECOVERABLE,FCNAME,\ __LINE__, class_, gmsg_, smsg_, arg1_, arg2_ ); stmt_ ;} while (0) #define MPIR_ERR_SETANDSTMT3(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_, arg3_) \ do {err_ = MPIR_Err_create_code( err_,MPIR_ERR_RECOVERABLE,FCNAME,\ __LINE__, class_, gmsg_, smsg_, arg1_, arg2_, arg3_ ); stmt_ ;} while (0) #define MPIR_ERR_SETANDSTMT4(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_, arg3_, arg4_) \ do {err_ = MPIR_Err_create_code( err_,MPIR_ERR_RECOVERABLE,FCNAME,\ __LINE__, class_, gmsg_, smsg_, arg1_, arg2_, arg3_, arg4_ ); stmt_ ;} while (0) #define MPIR_ERR_SETFATALSIMPLE(err_,class_,msg_) \ err_ = MPIR_Err_create_code( MPI_SUCCESS,MPIR_ERR_FATAL,FCNAME, \ __LINE__, class_, msg_, 0 ) #define MPIR_ERR_SETFATAL(err_,class_,msg_) \ err_ = MPIR_Err_create_code( err_,MPIR_ERR_FATAL,FCNAME,\ __LINE__, class_, msg_, 0 ) #define MPIR_ERR_SETFATAL1(err_,class_,gmsg_,smsg_,arg1_) \ err_ = MPIR_Err_create_code( err_,MPIR_ERR_FATAL,FCNAME,\ __LINE__, class_, gmsg_, smsg_, arg1_ ) #define MPIR_ERR_SETFATAL2(err_,class_,gmsg_,smsg_,arg1_,arg2_) \ err_ = MPIR_Err_create_code( err_,MPIR_ERR_FATAL,FCNAME,\ __LINE__, class_, gmsg_, smsg_, arg1_, arg2_ ) #define MPIR_ERR_SETFATALANDSTMT(err_,class_,stmt_,msg_) \ do {err_ = MPIR_Err_create_code( err_,MPIR_ERR_FATAL,FCNAME,\ __LINE__, class_, msg_, 0 ); stmt_ ;} while (0) #define MPIR_ERR_SETFATALANDSTMT1(err_,class_,stmt_,gmsg_,smsg_,arg1_) \ do {err_ = MPIR_Err_create_code( err_,MPIR_ERR_FATAL,FCNAME,\ __LINE__, class_, gmsg_, smsg_, arg1_ ); stmt_ ;} while (0) #define MPIR_ERR_SETFATALANDSTMT2(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_) \ do {err_ = MPIR_Err_create_code( err_,MPIR_ERR_FATAL,FCNAME,\ __LINE__, class_, gmsg_, smsg_, arg1_, arg2_ ); stmt_ ;} while (0) #define MPIR_ERR_SETFATALANDSTMT3(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_, arg3_) \ do {err_ = MPIR_Err_create_code( err_,MPIR_ERR_FATAL,FCNAME,\ __LINE__, class_, gmsg_, smsg_, arg1_, arg2_, arg3_ ); stmt_ ;} while (0) #define MPIR_ERR_SETFATALANDSTMT4(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_, arg3_, arg4_) \ do {err_ = MPIR_Err_create_code( err_,MPIR_ERR_FATAL,FCNAME,\ __LINE__, class_, gmsg_, smsg_, arg1_, arg2_, arg3_, arg4_ ); stmt_ ;} while (0) #define MPIR_ERR_ADD(err_, newerr_) \ do {(err_) = MPIR_Err_combine_codes((err_), (newerr_));} while (0) #else # 855 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_err.h" /* Simply set the class, being careful not to override a previously set class. */ #define MPIR_ERR_SETSIMPLE(err_,class_,msg_) \ do {err_ = class_;} while (0) #define MPIR_ERR_SET(err_,class_,msg_) \ do {if (!err_){err_=class_;}} while (0) #define MPIR_ERR_SET1(err_,class_,gmsg_,smsg_,arg1_) \ MPIR_ERR_SET(err_,class_,msg_) #define MPIR_ERR_SET2(err_,class_,gmsg_,smsg_,arg1_,arg2_) \ MPIR_ERR_SET(err_,class_,msg_) #define MPIR_ERR_SETANDSTMT(err_,class_,stmt_,msg_) \ do {if (!err_){err_=class_;} stmt_;} while (0) #define MPIR_ERR_SETANDSTMT1(err_,class_,stmt_,gmsg_,smsg_,arg1_) \ MPIR_ERR_SETANDSTMT(err_,class_,stmt_,gmsg_) #define MPIR_ERR_SETANDSTMT2(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_) \ MPIR_ERR_SETANDSTMT(err_,class_,stmt_,gmsg_) #define MPIR_ERR_SETANDSTMT3(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_,arg3_) \ MPIR_ERR_SETANDSTMT(err_,class_,stmt_,gmsg_) #define MPIR_ERR_SETANDSTMT4(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_,arg3_,arg4_) \ MPIR_ERR_SETANDSTMT(err_,class_,stmt_,gmsg_) #define MPIR_ERR_SETFATALSIMPLE(err_,class_,msg_) \ do {err_ = class_;} while (0) #define MPIR_ERR_SETFATAL(err_,class_,msg_) \ do {if (!err_){err_=class_;}} while (0) #define MPIR_ERR_SETFATAL1(err_,class_,gmsg_,smsg_,arg1_) \ MPIR_ERR_SET(err_,class_,msg_) #define MPIR_ERR_SETFATAL2(err_,class_,gmsg_,smsg_,arg1_,arg2_) \ MPIR_ERR_SET(err_,class_,msg_) #define MPIR_ERR_SETFATALANDSTMT(err_,class_,stmt_,msg_) \ MPIR_ERR_SETANDSTMT(err_,class_,stmt_,msg_) #define MPIR_ERR_SETFATALANDSTMT1(err_,class_,stmt_,gmsg_,smsg_,arg1_) \ MPIR_ERR_SETANDSTMT(err_,class_,stmt_,gmsg_) #define MPIR_ERR_SETFATALANDSTMT2(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_) \ MPIR_ERR_SETANDSTMT(err_,class_,stmt_,gmsg_) #define MPIR_ERR_SETFATALANDSTMT3(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_,arg3_) \ MPIR_ERR_SETANDSTMT(err_,class_,stmt_,gmsg_) #define MPIR_ERR_SETFATALANDSTMT4(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_,arg3_,arg4_) \ MPIR_ERR_SETANDSTMT(err_,class_,stmt_,gmsg_) /* No-op - use original error class; discard newerr_ unless err is MPI_SUCCESS*/ #define MPIR_ERR_ADD(err_, newerr_) \ do {if (!err_) err_ = newerr_;} while (0) #endif # 899 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_err.h" /* The following definitions are the same independent of the choice of HAVE_ERROR_CHECKING */ #define MPIR_ERR_SETANDJUMP(err_,class_,msg_) \ MPIR_ERR_SETANDSTMT(err_,class_,goto fn_fail,msg_) #define MPIR_ERR_SETFATALANDJUMP(err_,class_,msg_) \ MPIR_ERR_SETFATALANDSTMT(err_,class_,goto fn_fail,msg_) #define MPIR_ERR_CHKANDSTMT(cond_,err_,class_,stmt_,msg_) \ do {if (cond_) { MPIR_ERR_SETANDSTMT(err_,class_,stmt_,msg_); }} while (0) #define MPIR_ERR_CHKFATALANDSTMT(cond_,err_,class_,stmt_,msg_) \ do {if (cond_) { MPIR_ERR_SETFATALANDSTMT(err_,class_,stmt_,msg_); }} while (0) #define MPIR_ERR_CHKANDJUMP(cond_,err_,class_,msg_) \ MPIR_ERR_CHKANDSTMT(cond_,err_,class_,goto fn_fail,msg_) #define MPIR_ERR_CHKFATALANDJUMP(cond_,err_,class_,msg_) \ MPIR_ERR_CHKFATALANDSTMT(cond_,err_,class_,goto fn_fail,msg_) #define MPIR_ERR_SETANDJUMP1(err_,class_,gmsg_,smsg_,arg1_) \ MPIR_ERR_SETANDSTMT1(err_,class_,goto fn_fail,gmsg_,smsg_,arg1_) #define MPIR_ERR_SETFATALANDJUMP1(err_,class_,gmsg_,smsg_,arg1_) \ MPIR_ERR_SETFATALANDSTMT1(err_,class_,goto fn_fail,gmsg_,smsg_,arg1_) #define MPIR_ERR_CHKANDSTMT1(cond_,err_,class_,stmt_,gmsg_,smsg_,arg1_) \ do {if (cond_) { MPIR_ERR_SETANDSTMT1(err_,class_,stmt_,gmsg_,smsg_,arg1_); }} while (0) #define MPIR_ERR_CHKFATALANDSTMT1(cond_,err_,class_,stmt_,gmsg_,smsg_,arg1_) \ do {if (cond_) { MPIR_ERR_SETFATALANDSTMT1(err_,class_,stmt_,gmsg_,smsg_,arg1_); }} while (0) #define MPIR_ERR_CHKANDJUMP1(cond_,err_,class_,gmsg_,smsg_,arg1_) \ MPIR_ERR_CHKANDSTMT1(cond_,err_,class_,goto fn_fail,gmsg_,smsg_,arg1_) #define MPIR_ERR_CHKFATALANDJUMP1(cond_,err_,class_,gmsg_,smsg_,arg1_) \ MPIR_ERR_CHKFATALANDSTMT1(cond_,err_,class_,goto fn_fail,gmsg_,smsg_,arg1_) #define MPIR_ERR_SETANDJUMP2(err_,class_,gmsg_,smsg_,arg1_,arg2_) \ MPIR_ERR_SETANDSTMT2(err_,class_,goto fn_fail,gmsg_,smsg_,arg1_,arg2_) #define MPIR_ERR_SETFATALANDJUMP2(err_,class_,gmsg_,smsg_,arg1_,arg2_) \ MPIR_ERR_SETFATALANDSTMT2(err_,class_,goto fn_fail,gmsg_,smsg_,arg1_,arg2_) #define MPIR_ERR_CHKANDSTMT2(cond_,err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_) \ do {if (cond_) { MPIR_ERR_SETANDSTMT2(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_); }} while (0) #define MPIR_ERR_CHKFATALANDSTMT2(cond_,err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_) \ do {if (cond_) { MPIR_ERR_SETFATALANDSTMT2(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_); }} while (0) #define MPIR_ERR_CHKANDJUMP2(cond_,err_,class_,gmsg_,smsg_,arg1_,arg2_) \ MPIR_ERR_CHKANDSTMT2(cond_,err_,class_,goto fn_fail,gmsg_,smsg_,arg1_,arg2_) #define MPIR_ERR_CHKFATALANDJUMP2(cond_,err_,class_,gmsg_,smsg_,arg1_,arg2_) \ MPIR_ERR_CHKFATALANDSTMT2(cond_,err_,class_,goto fn_fail,gmsg_,smsg_,arg1_,arg2_) #define MPIR_ERR_SETANDJUMP3(err_,class_,gmsg_,smsg_,arg1_,arg2_,arg3_) \ MPIR_ERR_SETANDSTMT3(err_,class_,goto fn_fail,gmsg_,smsg_,arg1_,arg2_,arg3_) #define MPIR_ERR_SETFATALANDJUMP3(err_,class_,gmsg_,smsg_,arg1_,arg2_,arg3_) \ MPIR_ERR_SETFATALANDSTMT3(err_,class_,goto fn_fail,gmsg_,smsg_,arg1_,arg2_,arg3_) #define MPIR_ERR_CHKANDSTMT3(cond_,err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_,arg3_) \ do {if (cond_) { MPIR_ERR_SETANDSTMT3(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_,arg3_); }} while (0) #define MPIR_ERR_CHKFATALANDSTMT3(cond_,err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_,arg3_) \ do {if (cond_) { MPIR_ERR_SETFATALANDSTMT3(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_,arg3_); }} while (0) #define MPIR_ERR_CHKANDJUMP3(cond_,err_,class_,gmsg_,smsg_,arg1_,arg2_,arg3_) \ MPIR_ERR_CHKANDSTMT3(cond_,err_,class_,goto fn_fail,gmsg_,smsg_,arg1_,arg2_,arg3_) #define MPIR_ERR_CHKFATALANDJUMP3(cond_,err_,class_,gmsg_,smsg_,arg1_,arg2_,arg3_) \ MPIR_ERR_CHKFATALANDSTMT3(cond_,err_,class_,goto fn_fail,gmsg_,smsg_,arg1_,arg2_,arg3_) #define MPIR_ERR_SETANDJUMP4(err_,class_,gmsg_,smsg_,arg1_,arg2_,arg3_,arg4_) \ MPIR_ERR_SETANDSTMT4(err_,class_,goto fn_fail,gmsg_,smsg_,arg1_,arg2_,arg3_,arg4_) #define MPIR_ERR_SETFATALANDJUMP4(err_,class_,gmsg_,smsg_,arg1_,arg2_,arg3_,arg4_) \ MPIR_ERR_SETFATALANDSTMT4(err_,class_,goto fn_fail,gmsg_,smsg_,arg1_,arg2_,arg3_,arg4_) #define MPIR_ERR_CHKANDSTMT4(cond_,err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_,arg3_, arg4_) \ do {if (cond_) { MPIR_ERR_SETANDSTMT4(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_,arg3_,arg4_); }} while (0) #define MPIR_ERR_CHKFATALANDSTMT4(cond_,err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_,arg3_, arg4_) \ do {if (cond_) { MPIR_ERR_SETFATALANDSTMT4(err_,class_,stmt_,gmsg_,smsg_,arg1_,arg2_,arg3_,arg4_); }} while (0) #define MPIR_ERR_CHKANDJUMP4(cond_,err_,class_,gmsg_,smsg_,arg1_,arg2_,arg3_,arg4_) \ MPIR_ERR_CHKANDSTMT4(cond_,err_,class_,goto fn_fail,gmsg_,smsg_,arg1_,arg2_,arg3_,arg4_) #define MPIR_ERR_CHKFATALANDJUMP4(cond_,err_,class_,gmsg_,smsg_,arg1_,arg2_,arg3_,arg4_) \ MPIR_ERR_CHKFATALANDSTMT4(cond_,err_,class_,goto fn_fail,gmsg_,smsg_,arg1_,arg2_,arg3_,arg4_) #define MPIR_ERR_INTERNAL(err_, msg_) \ MPIR_ERR_SETFATAL1(err_, MPI_ERR_INTERN, "**intern", "**intern %s", msg_) #define MPIR_ERR_INTERNALANDSTMT(err_, msg_, stmt_) \ MPIR_ERR_SETANDSTMT1(err_, MPI_ERR_INTERN, stmt_, "**intern", "**intern %s", msg_) #define MPIR_ERR_INTERNALANDJUMP(err_, msg_) \ MPIR_ERR_INTERNALANDSTMT(err_, msg_, goto fn_fail) #define MPIR_ERR_CHKINTERNAL(cond_, err_, msg_) \ do {if (cond_) MPIR_ERR_INTERNALANDJUMP(err_, msg_);} while(0) /* --END ERROR MACROS-- */ /* * Special case for "is initialized". * This should be used in cases where there is no * additional error checking */ #ifdef HAVE_ERROR_CHECKING #define MPIR_ERRTEST_INITIALIZED_ORDIE() \ do { \ if (OPA_load_int(&MPIR_Process.mpich_state) == MPICH_MPI_STATE__PRE_INIT || \ OPA_load_int(&MPIR_Process.mpich_state) == MPICH_MPI_STATE__POST_FINALIZED) \ { \ MPIR_Err_preOrPostInit(); \ } \ } while (0) #else # 993 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_err.h" #define MPIR_ERRTEST_INITIALIZED_ORDIE() do {} while (0) #endif # 995 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_err.h" /* ------------------------------------------------------------------------- */ /* end of mpir_err.h */ /* ------------------------------------------------------------------------- */ #endif /* MPIR_ERR_H_INCLUDED */ # 1001 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_err.h" # 222 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_datatype.h" #endif /* expanded by -frewrite-includes */ # 222 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_datatype.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPIR_DATATYPE_H_INCLUDED #define MPIR_DATATYPE_H_INCLUDED /* This routine is used to install an attribute free routine for datatypes at finalize-time */ void MPII_Datatype_attr_finalize( void ); #define MPIR_DATATYPE_IS_PREDEFINED(type) \ ((HANDLE_GET_KIND(type) == HANDLE_KIND_BUILTIN) || \ (type == MPI_FLOAT_INT) || (type == MPI_DOUBLE_INT) || \ (type == MPI_LONG_INT) || (type == MPI_SHORT_INT) || \ (type == MPI_LONG_DOUBLE_INT)) int MPIR_Get_elements_x_impl(const MPI_Status *status, MPI_Datatype datatype, MPI_Count *elements); int MPIR_Status_set_elements_x_impl(MPI_Status *status, MPI_Datatype datatype, MPI_Count count); void MPIR_Type_get_extent_x_impl(MPI_Datatype datatype, MPI_Count *lb, MPI_Count *extent); void MPIR_Type_get_true_extent_x_impl(MPI_Datatype datatype, MPI_Count *true_lb, MPI_Count *true_extent); int MPIR_Type_size_x_impl(MPI_Datatype datatype, MPI_Count *size); void MPIR_Get_count_impl(const MPI_Status *status, MPI_Datatype datatype, int *count); int MPIR_Type_commit_impl(MPI_Datatype *datatype); int MPIR_Type_create_struct_impl(int count, const int array_of_blocklengths[], const MPI_Aint array_of_displacements[], const MPI_Datatype array_of_types[], MPI_Datatype *newtype); int MPIR_Type_create_indexed_block_impl(int count, int blocklength, const int array_of_displacements[], MPI_Datatype oldtype, MPI_Datatype *newtype); int MPIR_Type_create_hindexed_block_impl(int count, int blocklength, const MPI_Aint array_of_displacements[], MPI_Datatype oldtype, MPI_Datatype *newtype); int MPIR_Type_contiguous_impl(int count, MPI_Datatype old_type, MPI_Datatype *new_type_p); int MPIR_Type_contiguous_x_impl(MPI_Count count, MPI_Datatype old_type, MPI_Datatype *new_type_p); void MPIR_Type_get_extent_impl(MPI_Datatype datatype, MPI_Aint *lb, MPI_Aint *extent); void MPIR_Type_get_true_extent_impl(MPI_Datatype datatype, MPI_Aint *true_lb, MPI_Aint *true_extent); void MPIR_Type_get_envelope_impl(MPI_Datatype datatype, int *num_integers, int *num_addresses, int *num_datatypes, int *combiner); int MPIR_Type_hvector_impl(int count, int blocklen, MPI_Aint stride, MPI_Datatype old_type, MPI_Datatype *newtype_p); int MPIR_Type_indexed_impl(int count, const int blocklens[], const int indices[], MPI_Datatype old_type, MPI_Datatype *newtype); void MPIR_Type_free_impl(MPI_Datatype *datatype); int MPIR_Type_vector_impl(int count, int blocklength, int stride, MPI_Datatype old_type, MPI_Datatype *newtype_p); int MPIR_Type_struct_impl(int count, const int blocklens[], const MPI_Aint indices[], const MPI_Datatype old_types[], MPI_Datatype *newtype); int MPIR_Pack_impl(const void *inbuf, MPI_Aint incount, MPI_Datatype datatype, void *outbuf, MPI_Aint outcount, MPI_Aint *position); void MPIR_Pack_size_impl(int incount, MPI_Datatype datatype, MPI_Aint *size); int MPIR_Unpack_impl(const void *inbuf, MPI_Aint insize, MPI_Aint *position, void *outbuf, int outcount, MPI_Datatype datatype); void MPIR_Type_lb_impl(MPI_Datatype datatype, MPI_Aint *displacement); #endif /* MPIR_DATATYPE_H_INCLUDED */ # 65 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_datatype.h" # 223 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_nbc.h" #endif /* expanded by -frewrite-includes */ # 223 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_nbc.h" 1 /* -*- Mode: c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2011 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPIR_NBC_H_INCLUDED #define MPIR_NBC_H_INCLUDED /* This specifies the interface that must be exposed by the ADI in order to * support MPI-3 non-blocking collectives. MPIR_Sched_ routines are all * permitted to be inlines. They are not permitted to be macros. * * Most (currently all) devices will just use the default implementation that * lives in "src/mpid/common/sched" */ /* The device must supply a typedef for MPIR_Sched_t. MPIR_Sched_t is a handle * to the schedule (often a pointer under the hood), not the actual schedule. * This makes it easy to cheaply pass the schedule between functions. Many * * The device must also define a constant (possibly a macro) for an invalid * schedule: MPIR_SCHED_NULL */ /* Context/tag strategy for send/recv ops: * ------------------------------- * * Blocking collectives were able to more or less safely separate all * communication between different collectives by using a fixed tag per * operation. This prevents some potentially very surprising message matching * patterns when two different collectives are posted on the same communicator * in rapid succession. But this strategy probably won't work for NBC because * multiple operations of any combination of types can be outstanding at the * same time. * * The MPI-3 draft standard says that all collective ops must be collectively * posted in a consistent order w.r.t. other collective operations, including * nonblocking collectives. This means that we can just use a counter to assign * tag values that is incremented at each collective start. We can jump through * some hoops to make sure that the blocking collective code is left * undisturbed, but it's cleaner to just update them to use the new counter * mechanism as well. */ #define MPIR_SCHED_NULL (NULL) /* Open question: should tag allocation be rolled into Sched_start? Keeping it * separate potentially allows more parallelism in the future, but it also * pushes more work onto the clients of this interface. */ int MPIR_Sched_next_tag(MPIR_Comm *comm_ptr, int *tag); /* the device must provide a typedef for MPIR_Sched_t in mpidpre.h */ /* creates a new opaque schedule object and returns a handle to it in (*sp) */ int MPIR_Sched_create(MPIR_Sched_t *sp); /* clones orig and returns a handle to the new schedule in (*cloned) */ int MPIR_Sched_clone(MPIR_Sched_t orig, MPIR_Sched_t *cloned); /* sets (*sp) to MPIR_SCHED_NULL and gives you back a request pointer in (*req). * The caller is giving up ownership of the opaque schedule object. * * comm should be the primary (user) communicator with which this collective is * associated, even if other hidden communicators are used for a subset of the * operations. It will be used for error handling and similar operations. */ int MPIR_Sched_start(MPIR_Sched_t *sp, MPIR_Comm *comm, int tag, MPIR_Request **req); /* send and recv take a comm ptr to enable hierarchical collectives */ int MPIR_Sched_send(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, MPIR_Comm *comm, MPIR_Sched_t s); int MPIR_Sched_recv(void *buf, MPI_Aint count, MPI_Datatype datatype, int src, MPIR_Comm *comm, MPIR_Sched_t s); /* just like MPI_Issend, can't complete until the matching recv is posted */ int MPIR_Sched_ssend(const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, MPIR_Comm *comm, MPIR_Sched_t s); int MPIR_Sched_reduce(const void *inbuf, void *inoutbuf, MPI_Aint count, MPI_Datatype datatype, MPI_Op op, MPIR_Sched_t s); /* packing/unpacking can be accomplished by passing MPI_PACKED as either intype * or outtype */ int MPIR_Sched_copy(const void *inbuf, MPI_Aint incount, MPI_Datatype intype, void *outbuf, MPI_Aint outcount, MPI_Datatype outtype, MPIR_Sched_t s); /* require that all previously added ops are complete before subsequent ops * may begin to execute */ int MPIR_Sched_barrier(MPIR_Sched_t s); /* A convenience macro for the extremely common case that "mpi_errno" is the * variable used for tracking error state and MPIR_ERR_POP is needed. This * declutters the NBC code substantially. */ #define MPIR_SCHED_BARRIER(sched_) \ do { \ mpi_errno = MPIR_Sched_barrier(sched_); \ if (mpi_errno) MPIR_ERR_POP(mpi_errno); \ } while (0) /* Defers evaluating (*count) until the entry actually begins to execute. This * permits algorithms that accumulate/dissipate bytes as rounds progress without * excessive (re)calculation of counts for/from other processes. * * A corresponding _recv_defer function is not currently provided because there * is no known use case. The recv count is just an upper bound, not an exact * amount to be received, so an oversized recv is used instead of deferral. */ int MPIR_Sched_send_defer(const void *buf, const MPI_Aint *count, MPI_Datatype datatype, int dest, MPIR_Comm *comm, MPIR_Sched_t s); /* Just like MPIR_Sched_recv except it populates the given status object with * the received count and error information, much like a normal recv. Often * useful in conjunction with MPIR_Sched_send_defer. */ int MPIR_Sched_recv_status(void *buf, MPI_Aint count, MPI_Datatype datatype, int src, MPIR_Comm *comm, MPI_Status *status, MPIR_Sched_t s); /* buffer management, fancy reductions, etc */ int MPIR_Sched_cb(MPIR_Sched_cb_t *cb_p, void *cb_state, MPIR_Sched_t s); int MPIR_Sched_cb2(MPIR_Sched_cb2_t *cb_p, void *cb_state, void *cb_state2, MPIR_Sched_t s); /* TODO: develop a caching infrastructure for use by the upper level as well, * hopefully s.t. uthash can be used somehow */ /* common callback utility functions */ int MPIR_Sched_cb_free_buf(MPIR_Comm *comm, int tag, void *state); /* an upgraded version of MPIR_CHKPMEM_MALLOC/_DECL/_REAP/_COMMIT that adds * corresponding cleanup callbacks to the given schedule at _COMMIT time */ #define MPIR_SCHED_CHKPMEM_DECL(n_) \ void *(mpir_sched_chkpmem_stk_[n_]) = { NULL }; \ int mpir_sched_chkpmem_stk_sp_=0; \ MPIR_AssertDeclValue(const int mpir_sched_chkpmem_stk_sz_,n_) #define MPIR_SCHED_CHKPMEM_MALLOC_ORSTMT(pointer_,type_,nbytes_,rc_,name_,stmt_) \ do { \ (pointer_) = (type_)MPL_malloc(nbytes_); \ if (pointer_) { \ MPIR_Assert(mpir_sched_chkpmem_stk_sp_ < mpir_sched_chkpmem_stk_sz_); \ mpir_sched_chkpmem_stk_[mpir_sched_chkpmem_stk_sp_++] = (pointer_); \ } else if ((nbytes_) > 0) { \ MPIR_CHKMEM_SETERR((rc_),(nbytes_),(name_)); \ stmt_; \ } \ } while (0) #define MPIR_SCHED_CHKPMEM_MALLOC(pointer_,type_,nbytes_,rc_,name_) \ MPIR_SCHED_CHKPMEM_MALLOC_ORSTMT(pointer_,type_,nbytes_,rc_,name_,goto fn_fail) /* just cleanup, don't add anything to the schedule */ #define MPIR_SCHED_CHKPMEM_REAP(sched_) \ do { \ while (mpir_sched_chkpmem_stk_sp_ > 0) { \ MPL_free(mpir_sched_chkpmem_stk_[--mpir_sched_chkpmem_stk_sp_]); \ } \ } while (0) #define MPIR_SCHED_CHKPMEM_COMMIT(sched_) \ do { \ MPIR_SCHED_BARRIER(s); \ while (mpir_sched_chkpmem_stk_sp_ > 0) { \ mpi_errno = MPIR_Sched_cb(&MPIR_Sched_cb_free_buf, \ (mpir_sched_chkpmem_stk_[--mpir_sched_chkpmem_stk_sp_]), \ (sched_)); \ if (mpi_errno) MPIR_ERR_POP(mpi_errno); \ } \ } while (0) #endif /* !defined(MPIR_NBC_H_INCLUDED) */ # 155 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_nbc.h" # 224 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_process.h" #endif /* expanded by -frewrite-includes */ # 224 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_process.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPIR_PROCESS_H_INCLUDED #define MPIR_PROCESS_H_INCLUDED /* Per process data */ typedef struct PreDefined_attrs { int appnum; /* Application number provided by mpiexec (MPI-2) */ int host; /* host */ int io; /* standard io allowed */ int lastusedcode; /* last used error code (MPI-2) */ int tag_ub; /* Maximum message tag */ int universe; /* Universe size from mpiexec (MPI-2) */ int wtime_is_global; /* Wtime is global over processes in COMM_WORLD */ } PreDefined_attrs; typedef struct MPIR_Process_t { OPA_int_t mpich_state; /* State of MPICH. Use OPA_int_t to make MPI_Initialized() etc. thread-safe per MPI-3.1. See MPI-Forum ticket 357 */ int do_error_checks; /* runtime error check control */ struct MPIR_Comm *comm_world; /* Easy access to comm_world for error handler */ struct MPIR_Comm *comm_self; /* Easy access to comm_self */ struct MPIR_Comm *comm_parent; /* Easy access to comm_parent */ struct MPIR_Comm *icomm_world; /* An internal version of comm_world that is separate from user's versions */ PreDefined_attrs attrs; /* Predefined attribute values */ int tagged_coll_mask; /* Tag space mask for tagged collectives */ /* The topology routines dimsCreate is independent of any communicator. If this pointer is null, the default routine is used */ int (*dimsCreate)( int, int, int *); /* Attribute dup functions. Here for lazy initialization */ int (*attr_dup)( int, MPIR_Attribute *, MPIR_Attribute ** ); int (*attr_free)( int, MPIR_Attribute ** ); /* There is no win_attr_dup function because there can be no MPI_Win_dup function */ /* Routine to get the messages corresponding to dynamically created error messages */ const char *(*errcode_to_string)( int ); #ifdef HAVE_CXX_BINDING /* Routines to call C++ functions from the C implementation of the MPI reduction and attribute routines */ void (*cxx_call_op_fn)(const void *, void *, int, MPI_Datatype, MPI_User_function * ); /* Error handling functions. As for the attribute functions, we pass the integer file/comm/win, the address of the error code, and the C function to call (itself a function defined by the C++ interface and exported to C). The first argument is used to specify the kind (comm,file,win) */ void (*cxx_call_errfn) ( int, int *, int *, void (*)(void) ); #endif /* HAVE_CXX_BINDING */ # 60 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_process.h" } MPIR_Process_t; extern MPIR_Process_t MPIR_Process; #endif /* MPIR_PROCESS_H_INCLUDED */ # 64 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_process.h" # 225 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_cvars.h" #endif /* expanded by -frewrite-includes */ # 225 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_cvars.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2010 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ /* Automatically generated * by: ./maint/extractcvars * on: Thu Sep 22 02:52:42 2016 * * DO NOT EDIT!!! */ #if !defined(MPIR_CVARS_H_INCLUDED) #define MPIR_CVARS_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpitimpl.h" /* for MPIR_T_cvar_range_value_t */ #endif /* expanded by -frewrite-includes */ # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_cvars.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2013 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ /* Types and interfaces in this file are internally used by MPIR_T itself. * Other modules should call higher level interfaces in mpit.h instead. */ #ifndef MPITIMPL_H_INCLUDED #define MPITIMPL_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpi.h" #endif /* expanded by -frewrite-includes */ # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_strerror.h" #endif /* expanded by -frewrite-includes */ # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_type_defs.h" #endif /* expanded by -frewrite-includes */ # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_assert.h" #endif /* expanded by -frewrite-includes */ # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_pointers.h" #endif /* expanded by -frewrite-includes */ # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_utarray.h" #endif /* expanded by -frewrite-includes */ # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_utarray.h" 1 /* MPICH notes: * - The file name has been changed to avoid conflicts with any system-installed * "utlist.h" header files. * - malloc/free/realloc usages have been substituted with utarray_malloc_ * (etc.) indirection macros and then changed to use MPL_malloc and friends * - add a ut_ptr_icd for the common case of dynamic tables of pointers * - intentionally omitted from "mpiimpl.h" in order to require using code to * opt-in * [goodell@ 2011-10-04] */ /* Copyright (c) 2008-2011, Troy D. Hanson http://uthash.sourceforge.net All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* a dynamic array implementation using macros * see http://uthash.sourceforge.net/utarray */ #ifndef MPIR_UTARRAY_H_INCLUDED #define MPIR_UTARRAY_H_INCLUDED #define UTARRAY_VERSION 1.9.4 #ifdef __GNUC__ #define _UNUSED_ __attribute__ ((__unused__)) #else # 44 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_utarray.h" #define _UNUSED_ #endif # 46 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_utarray.h" #if 0 /* expanded by -frewrite-includes */ #include /* size_t */ #endif /* expanded by -frewrite-includes */ # 47 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_utarray.h" # 1 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 1 3 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) /* Always define miscellaneous pieces when modules are available. */ #if !__has_feature(modules) #define __STDDEF_H #endif # 37 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 44 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_ptrdiff_t) #if !defined(_PTRDIFF_T) || __has_feature(modules) /* Always define ptrdiff_t when modules are available. */ #if !__has_feature(modules) #define _PTRDIFF_T #endif # 51 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 53 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 55 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_size_t) #if !defined(_SIZE_T) || __has_feature(modules) /* Always define size_t when modules are available. */ #if !__has_feature(modules) #define _SIZE_T #endif # 62 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ size_t; #endif # 64 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_size_t #endif /*defined(__need_size_t) */ # 66 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) /* Always define rsize_t when modules are available. */ #if !__has_feature(modules) #define _RSIZE_T #endif # 76 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ rsize_t; #endif # 78 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif /* defined(__need_STDDEF_H_misc) */ # 79 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_wchar_t) #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if !defined(_WCHAR_T) || __has_feature(modules) #if !__has_feature(modules) #define _WCHAR_T #if defined(_MSC_EXTENSIONS) #define _WCHAR_T_DEFINED #endif # 89 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 90 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WCHAR_TYPE__ wchar_t; #endif # 92 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 93 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 95 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_NULL) #undef NULL #ifdef __cplusplus # if !defined(__MINGW32__) && !defined(_MSC_VER) # define NULL __null # else # 102 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL 0 # endif # 104 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #else # 105 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL ((void*)0) #endif # 107 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #ifdef __cplusplus #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 112 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 113 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_NULL #endif /* defined(__need_NULL) */ # 115 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 118 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 1 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/__stddef_max_align_t.h" 1 3 /*===---- __stddef_max_align_t.h - Definition of max_align_t for modules ---=== * * Copyright (c) 2014 Chandler Carruth * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #ifndef __CLANG_MAX_ALIGN_T_DEFINED #define __CLANG_MAX_ALIGN_T_DEFINED #if defined(_MSC_VER) typedef double max_align_t; #elif defined(__APPLE__) # 32 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/__stddef_max_align_t.h" 3 typedef long double max_align_t; #else # 34 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/__stddef_max_align_t.h" 3 // Define 'max_align_t' to match the GCC definition. typedef struct { long long __clang_max_align_nonce1 __attribute__((__aligned__(__alignof__(long long)))); long double __clang_max_align_nonce2 __attribute__((__aligned__(__alignof__(long double)))); } max_align_t; #endif # 42 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/__stddef_max_align_t.h" 3 #endif # 44 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/__stddef_max_align_t.h" 3 # 119 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 2 3 #endif # 120 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 123 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if defined(__need_wint_t) /* Always define wint_t when modules are available. */ #if !defined(_WINT_T) || __has_feature(modules) #if !__has_feature(modules) #define _WINT_T #endif # 132 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WINT_TYPE__ wint_t; #endif # 134 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wint_t #endif /* __need_wint_t */ # 136 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 138 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 48 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_utarray.h" 2 #if 0 /* expanded by -frewrite-includes */ #include /* memset, etc */ #endif /* expanded by -frewrite-includes */ # 48 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_utarray.h" # 49 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_utarray.h" #if 0 /* expanded by -frewrite-includes */ #include /* exit */ #endif /* expanded by -frewrite-includes */ # 49 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_utarray.h" # 50 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_utarray.h" /* MPICH modification: override these to change what malloc/free/realloc * routines are used by the utarray code */ #define utarray_malloc_(x_) MPL_malloc(x_) #define utarray_free_(x_) MPL_free(x_) #define utarray_realloc_(x_,y_) MPL_realloc(x_,y_) #define utarray_strdup_(x_) MPL_strdup(x_) #ifndef utarray_oom #define utarray_oom() exit(-1) #endif # 61 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_utarray.h" typedef void (ctor_f)(void *dst, const void *src); typedef void (dtor_f)(void *elt); typedef void (init_f)(void *elt); typedef struct { size_t sz; init_f *init; ctor_f *copy; dtor_f *dtor; } UT_icd; typedef struct { unsigned i,n;/* i: index of next available slot, n: num slots */ const UT_icd *icd; /* initializer, copy and destructor functions */ char *d; /* n slots of size icd->sz*/ } UT_array; #define utarray_init(a,_icd) do { \ memset(a,0,sizeof(UT_array)); \ (a)->icd=_icd; \ } while(0) #define utarray_done(a) do { \ if ((a)->n) { \ if ((a)->icd->dtor) { \ size_t _ut_i; \ for(_ut_i=0; _ut_i < (a)->i; _ut_i++) { \ (a)->icd->dtor(utarray_eltptr(a,_ut_i)); \ } \ } \ utarray_free_((a)->d); \ } \ (a)->n=0; \ } while(0) #define utarray_new(a,_icd) do { \ a=(UT_array*)utarray_malloc_(sizeof(UT_array)); \ if (a == NULL) utarray_oom(); \ utarray_init(a,_icd); \ } while(0) #define utarray_free(a) do { \ utarray_done(a); \ utarray_free_(a); \ } while(0) #define utarray_reserve(a,by) do { \ if (((a)->i+by) > ((a)->n)) { \ void * d_; \ while(((a)->i+by) > ((a)->n)) { (a)->n = ((a)->n ? (2*(a)->n) : 8); } \ d_=(char*)utarray_realloc_((a)->d, (a)->n*(a)->icd->sz); \ if (d_ == NULL) utarray_oom(); \ (a)->d = d_; \ } \ } while(0) #define utarray_push_back(a,p) do { \ utarray_reserve(a,1); \ if ((a)->icd->copy) { (a)->icd->copy( _utarray_eltptr(a,(a)->i++), p); } \ else { memcpy(_utarray_eltptr(a,(a)->i++), p, (a)->icd->sz); }; \ } while(0) #define utarray_pop_back(a) do { \ if ((a)->icd->dtor) { (a)->icd->dtor( _utarray_eltptr(a,--((a)->i))); } \ else { (a)->i--; } \ } while(0) #define utarray_extend_back(a) do { \ utarray_reserve(a,1); \ if ((a)->icd->init) { (a)->icd->init(_utarray_eltptr(a,(a)->i)); } \ else { memset(_utarray_eltptr(a,(a)->i),0,(a)->icd->sz); } \ (a)->i++; \ } while(0) #define utarray_len(a) ((a)->i) #define utarray_eltptr(a,j) (((j) < (a)->i) ? _utarray_eltptr(a,j) : NULL) #define _utarray_eltptr(a,j) ((char*)((a)->d + ((a)->icd->sz*(j) ))) #define utarray_insert(a,p,j) do { \ utarray_reserve(a,1); \ if (j > (a)->i) break; \ if ((j) < (a)->i) { \ memmove( _utarray_eltptr(a,(j)+1), _utarray_eltptr(a,j), \ ((a)->i - (j))*((a)->icd->sz)); \ } \ if ((a)->icd->copy) { (a)->icd->copy( _utarray_eltptr(a,j), p); } \ else { memcpy(_utarray_eltptr(a,j), p, (a)->icd->sz); }; \ (a)->i++; \ } while(0) #define utarray_inserta(a,w,j) do { \ if (utarray_len(w) == 0) break; \ if (j > (a)->i) break; \ utarray_reserve(a,utarray_len(w)); \ if ((j) < (a)->i) { \ memmove(_utarray_eltptr(a,(j)+utarray_len(w)), \ _utarray_eltptr(a,j), \ ((a)->i - (j))*((a)->icd->sz)); \ } \ if ((a)->icd->copy) { \ size_t _ut_i; \ for(_ut_i=0;_ut_i<(w)->i;_ut_i++) { \ (a)->icd->copy(_utarray_eltptr(a,j+_ut_i), _utarray_eltptr(w,_ut_i)); \ } \ } else { \ memcpy(_utarray_eltptr(a,j), _utarray_eltptr(w,0), \ utarray_len(w)*((a)->icd->sz)); \ } \ (a)->i += utarray_len(w); \ } while(0) #define utarray_resize(dst,num) do { \ size_t _ut_i; \ if (dst->i > (size_t)(num)) { \ if ((dst)->icd->dtor) { \ for(_ut_i=num; _ut_i < dst->i; _ut_i++) { \ (dst)->icd->dtor(utarray_eltptr(dst,_ut_i)); \ } \ } \ } else if (dst->i < (size_t)(num)) { \ utarray_reserve(dst,num-dst->i); \ if ((dst)->icd->init) { \ for(_ut_i=dst->i; _ut_i < num; _ut_i++) { \ (dst)->icd->init(utarray_eltptr(dst,_ut_i)); \ } \ } else { \ memset(_utarray_eltptr(dst,dst->i),0,(dst)->icd->sz*(num-dst->i)); \ } \ } \ dst->i = num; \ } while(0) #define utarray_concat(dst,src) do { \ utarray_inserta((dst),(src),utarray_len(dst)); \ } while(0) #define utarray_erase(a,pos,len) do { \ if ((a)->icd->dtor) { \ size_t _ut_i; \ for(_ut_i=0; _ut_i < len; _ut_i++) { \ (a)->icd->dtor(utarray_eltptr(a,pos+_ut_i)); \ } \ } \ if ((a)->i > (pos+len)) { \ memmove( _utarray_eltptr(a,pos), _utarray_eltptr(a,pos+len), \ ((a->i)-(pos+len))*((a)->icd->sz)); \ } \ (a)->i -= (len); \ } while(0) #define utarray_clear(a) do { \ if ((a)->i > 0) { \ if ((a)->icd->dtor) { \ size_t _ut_i; \ for(_ut_i=0; _ut_i < (a)->i; _ut_i++) { \ (a)->icd->dtor(utarray_eltptr(a,_ut_i)); \ } \ } \ (a)->i = 0; \ } \ } while(0) #define utarray_sort(a,cmp) do { \ qsort((a)->d, (a)->i, (a)->icd->sz, cmp); \ } while(0) #define utarray_find(a,v,cmp) bsearch((v),(a)->d,(a)->i,(a)->icd->sz,cmp) #define utarray_front(a) (((a)->i) ? (_utarray_eltptr(a,0)) : NULL) #define utarray_next(a,e) (((e)==NULL) ? utarray_front(a) : ((((a)->i) > (utarray_eltidx(a,e)+1)) ? _utarray_eltptr(a,utarray_eltidx(a,e)+1) : NULL)) #define utarray_back(a) (((a)->i) ? (_utarray_eltptr(a,(a)->i-1)) : NULL) #define utarray_eltidx(a,e) (((char*)(e) >= (char*)((a)->d)) ? (((char*)(e) - (char*)((a)->d))/(a)->icd->sz) : -1) /* last we pre-define a few icd for common utarrays of ints and strings */ static void utarray_str_cpy(void *dst, const void *src) { char **_src = (char**)src, **_dst = (char**)dst; *_dst = (*_src == NULL) ? NULL : (char*)utarray_strdup_(*_src); } static void utarray_str_dtor(void *elt) { char **eltc = (char**)elt; if (*eltc) utarray_free_(*eltc); } static const UT_icd ut_str_icd _UNUSED_ = {sizeof(char*),NULL,utarray_str_cpy,utarray_str_dtor}; static const UT_icd ut_int_icd _UNUSED_ = {sizeof(int),NULL,NULL,NULL}; /* MPICH additions: */ static const UT_icd ut_ptr_icd _UNUSED_ = {sizeof(void*),NULL,NULL,NULL}; /* These are convenience macros for directly accessing the array. Care should be taken when using the returned pointer as the pointer can be invalidated by other utarray operations. */ #define ut_int_array(a) ((int*)(a)->d) #define ut_str_array(a) ((char**)(a)->d) #define ut_ptr_array(a) ((void**)(a)->d) #endif /* MPIR_UTARRAY_H_INCLUDED */ # 259 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_utarray.h" # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpl_uthash.h" #endif /* expanded by -frewrite-includes */ # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" 1 /* MPICH changes: * * - The file name has been changed to avoid conflicts with any system-installed * "uthash.h" header files. * - some configure-time checking for __typeof() support was added * - intentionally omitted from "mpl.h" in order to require using code to opt-in * - override malloc/free/realloc to call MPL routines */ /* Copyright (c) 2003-2014, Troy D. Hanson http://troydhanson.github.com/uthash/ All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef MPL_UTHASH_H #define MPL_UTHASH_H #if 0 /* expanded by -frewrite-includes */ #include /* memcmp,strlen */ #endif /* expanded by -frewrite-includes */ # 35 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" # 36 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #if 0 /* expanded by -frewrite-includes */ #include /* ptrdiff_t */ #endif /* expanded by -frewrite-includes */ # 36 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" # 1 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 1 3 /*===---- stddef.h - Basic type definitions --------------------------------=== * * Copyright (c) 2008 Eli Friedman * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. * *===-----------------------------------------------------------------------=== */ #if !defined(__STDDEF_H) || defined(__need_ptrdiff_t) || \ defined(__need_size_t) || defined(__need_wchar_t) || \ defined(__need_NULL) || defined(__need_wint_t) #if !defined(__need_ptrdiff_t) && !defined(__need_size_t) && \ !defined(__need_wchar_t) && !defined(__need_NULL) && \ !defined(__need_wint_t) /* Always define miscellaneous pieces when modules are available. */ #if !__has_feature(modules) #define __STDDEF_H #endif # 37 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define __need_ptrdiff_t #define __need_size_t #define __need_wchar_t #define __need_NULL #define __need_STDDEF_H_misc /* __need_wint_t is intentionally not defined here. */ #endif # 44 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_ptrdiff_t) #if !defined(_PTRDIFF_T) || __has_feature(modules) /* Always define ptrdiff_t when modules are available. */ #if !__has_feature(modules) #define _PTRDIFF_T #endif # 51 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __PTRDIFF_TYPE__ ptrdiff_t; #endif # 53 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_ptrdiff_t #endif /* defined(__need_ptrdiff_t) */ # 55 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_size_t) #if !defined(_SIZE_T) || __has_feature(modules) /* Always define size_t when modules are available. */ #if !__has_feature(modules) #define _SIZE_T #endif # 62 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ size_t; #endif # 64 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_size_t #endif /*defined(__need_size_t) */ # 66 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) /* ISO9899:2011 7.20 (C11 Annex K): Define rsize_t if __STDC_WANT_LIB_EXT1__ is * enabled. */ #if (defined(__STDC_WANT_LIB_EXT1__) && __STDC_WANT_LIB_EXT1__ >= 1 && \ !defined(_RSIZE_T)) || __has_feature(modules) /* Always define rsize_t when modules are available. */ #if !__has_feature(modules) #define _RSIZE_T #endif # 76 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __SIZE_TYPE__ rsize_t; #endif # 78 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif /* defined(__need_STDDEF_H_misc) */ # 79 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_wchar_t) #ifndef __cplusplus /* Always define wchar_t when modules are available. */ #if !defined(_WCHAR_T) || __has_feature(modules) #if !__has_feature(modules) #define _WCHAR_T #if defined(_MSC_EXTENSIONS) #define _WCHAR_T_DEFINED #endif # 89 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 90 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WCHAR_TYPE__ wchar_t; #endif # 92 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 93 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wchar_t #endif /* defined(__need_wchar_t) */ # 95 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_NULL) #undef NULL #ifdef __cplusplus # if !defined(__MINGW32__) && !defined(_MSC_VER) # define NULL __null # else # 102 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL 0 # endif # 104 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #else # 105 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # define NULL ((void*)0) #endif # 107 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #ifdef __cplusplus #if defined(_MSC_EXTENSIONS) && defined(_NATIVE_NULLPTR_SUPPORTED) namespace std { typedef decltype(nullptr) nullptr_t; } using ::std::nullptr_t; #endif # 112 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 113 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_NULL #endif /* defined(__need_NULL) */ # 115 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #if defined(__need_STDDEF_H_misc) #if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L #if 0 /* expanded by -frewrite-includes */ #include "__stddef_max_align_t.h" #endif /* expanded by -frewrite-includes */ # 118 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 119 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 120 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #define offsetof(t, d) __builtin_offsetof(t, d) #undef __need_STDDEF_H_misc #endif /* defined(__need_STDDEF_H_misc) */ # 123 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 /* Some C libraries expect to see a wint_t here. Others (notably MinGW) will use __WINT_TYPE__ directly; accommodate both by requiring __need_wint_t */ #if defined(__need_wint_t) /* Always define wint_t when modules are available. */ #if !defined(_WINT_T) || __has_feature(modules) #if !__has_feature(modules) #define _WINT_T #endif # 132 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 typedef __WINT_TYPE__ wint_t; #endif # 134 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #undef __need_wint_t #endif /* __need_wint_t */ # 136 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 #endif # 138 "/soft/compilers/bgclang/r266865-stable/bin/../lib/clang/3.9.0/include/stddef.h" 3 # 37 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" 2 #if 0 /* expanded by -frewrite-includes */ #include /* exit() */ #endif /* expanded by -frewrite-includes */ # 37 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" # 38 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #ifdef MPL_HAVE___TYPEOF /* MPICH modification */ /* These macros use decltype or the earlier __typeof GNU extension. As decltype is only available in newer compilers (VS2010 or gcc 4.3+ when compiling c++ source) this code uses whatever method is needed or, for VS2008 where neither is available, uses casting workarounds. */ #if defined(_MSC_VER) /* MS compiler */ #if _MSC_VER >= 1600 && defined(__cplusplus) /* VS2010 or newer in C++ mode */ #define MPL_DECLTYPE(x) (decltype(x)) #else /* VS2008 or older (or VS2010 in C mode) */ # 48 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #define MPL_NO_DECLTYPE #define MPL_DECLTYPE(x) #endif # 51 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #elif defined(__BORLANDC__) || defined(__LCC__) || defined(__WATCOMC__) # 52 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #define MPL_NO_DECLTYPE #define MPL_DECLTYPE(x) #else /* GNU, Sun and other compilers */ # 55 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #define MPL_DECLTYPE(x) (__typeof(x)) #endif # 57 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #else /* !MPL_HAVE___TYPEOF */ # 58 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #define MPL_NO_DECLTYPE #define MPL_DECLTYPE(x) #endif /* !MPL_HAVE__TYPEOF */ # 61 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #ifdef MPL_NO_DECLTYPE #define MPL_DECLTYPE_ASSIGN(dst,src) \ do { \ char **_da_dst = (char**)(&(dst)); \ *_da_dst = (char*)(src); \ } while(0) #else # 70 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #define MPL_DECLTYPE_ASSIGN(dst,src) \ do { \ (dst) = MPL_DECLTYPE(dst)(src); \ } while(0) #endif # 75 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" /* a number of the hash function use uint32_t which isn't defined on Pre VS2010 */ #if defined(_WIN32) #if defined(_MSC_VER) && _MSC_VER >= 1600 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 79 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" # 80 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #elif defined(__WATCOMC__) || defined(__MINGW32__) || defined(__CYGWIN__) # 81 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 81 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" # 82 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #else # 83 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" typedef unsigned int uint32_t; typedef unsigned char uint8_t; #endif # 86 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #elif defined(__GNUC__) && !defined(__VXWORKS__) # 87 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 87 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" # 88 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #else # 89 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" typedef unsigned int uint32_t; typedef unsigned char uint8_t; #endif # 92 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #define MPL_UTHASH_VERSION 1.9.9 #ifndef MPL_uthash_fatal #define MPL_uthash_fatal(msg) exit(-1) /* fatal error (out of memory,etc) */ #endif # 98 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #ifndef MPL_uthash_malloc #define MPL_uthash_malloc(sz) MPL_malloc(sz) /* malloc fcn */ #endif # 101 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #ifndef MPL_uthash_free #define MPL_uthash_free(ptr,sz) MPL_free(ptr) /* free fcn */ #endif # 104 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #ifndef MPL_uthash_noexpand_fyi #define MPL_uthash_noexpand_fyi(tbl) /* can be defined to log noexpand */ #endif # 108 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #ifndef MPL_uthash_expand_fyi #define MPL_uthash_expand_fyi(tbl) /* can be defined to log expands */ #endif # 111 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" /* initial number of buckets */ #define MPL_HASH_INITIAL_NUM_BUCKETS 32U /* initial number of buckets */ #define MPL_HASH_INITIAL_NUM_BUCKETS_LOG2 5U /* lg2 of initial number of buckets */ #define MPL_HASH_BKT_CAPACITY_THRESH 10U /* expand when bucket count reaches */ /* calculate the element whose hash handle address is hhe */ #define MPL_ELMT_FROM_HH(tbl,hhp) ((void*)(((char*)(hhp)) - ((tbl)->hho))) #define MPL_HASH_FIND(hh,head,keyptr,keylen,out) \ do { \ out=NULL; \ if (head != NULL) { \ unsigned _hf_bkt,_hf_hashv; \ MPL_HASH_FCN(keyptr,keylen, (head)->hh.tbl->num_buckets, _hf_hashv, _hf_bkt); \ if (MPL_HASH_BLOOM_TEST((head)->hh.tbl, _hf_hashv) != 0) { \ MPL_HASH_FIND_IN_BKT((head)->hh.tbl, hh, (head)->hh.tbl->buckets[ _hf_bkt ], \ keyptr,keylen,out); \ } \ } \ } while (0) #ifdef MPL_HASH_BLOOM #define MPL_HASH_BLOOM_BITLEN (1UL << MPL_HASH_BLOOM) #define MPL_HASH_BLOOM_BYTELEN (MPL_HASH_BLOOM_BITLEN/8UL) + (((MPL_HASH_BLOOM_BITLEN%8UL)!=0UL) ? 1UL : 0UL) #define MPL_HASH_BLOOM_MAKE(tbl) \ do { \ (tbl)->bloom_nbits = MPL_HASH_BLOOM; \ (tbl)->bloom_bv = (uint8_t*)MPL_uthash_malloc(MPL_HASH_BLOOM_BYTELEN); \ if (!((tbl)->bloom_bv)) { MPL_uthash_fatal( "out of memory"); } \ memset((tbl)->bloom_bv, 0, MPL_HASH_BLOOM_BYTELEN); \ (tbl)->bloom_sig = MPL_HASH_BLOOM_SIGNATURE; \ } while (0) #define MPL_HASH_BLOOM_FREE(tbl) \ do { \ MPL_uthash_free((tbl)->bloom_bv, MPL_HASH_BLOOM_BYTELEN); \ } while (0) #define MPL_HASH_BLOOM_BITSET(bv,idx) (bv[(idx)/8U] |= (1U << ((idx)%8U))) #define MPL_HASH_BLOOM_BITTEST(bv,idx) (bv[(idx)/8U] & (1U << ((idx)%8U))) #define MPL_HASH_BLOOM_ADD(tbl,hashv) \ MPL_HASH_BLOOM_BITSET((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1U))) #define MPL_HASH_BLOOM_TEST(tbl,hashv) \ MPL_HASH_BLOOM_BITTEST((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1U))) #else # 160 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #define MPL_HASH_BLOOM_MAKE(tbl) #define MPL_HASH_BLOOM_FREE(tbl) #define MPL_HASH_BLOOM_ADD(tbl,hashv) #define MPL_HASH_BLOOM_TEST(tbl,hashv) (1) #define MPL_HASH_BLOOM_BYTELEN 0U #endif # 166 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #define MPL_HASH_MAKE_TABLE(hh,head) \ do { \ (head)->hh.tbl = (MPL_UT_hash_table*)MPL_uthash_malloc( \ sizeof(MPL_UT_hash_table)); \ if (!((head)->hh.tbl)) { MPL_uthash_fatal( "out of memory"); } \ memset((head)->hh.tbl, 0, sizeof(MPL_UT_hash_table)); \ (head)->hh.tbl->tail = &((head)->hh); \ (head)->hh.tbl->num_buckets = MPL_HASH_INITIAL_NUM_BUCKETS; \ (head)->hh.tbl->log2_num_buckets = MPL_HASH_INITIAL_NUM_BUCKETS_LOG2; \ (head)->hh.tbl->hho = (char*)(&(head)->hh) - (char*)(head); \ (head)->hh.tbl->buckets = (MPL_UT_hash_bucket*)MPL_uthash_malloc( \ MPL_HASH_INITIAL_NUM_BUCKETS*sizeof(struct MPL_UT_hash_bucket)); \ if (! (head)->hh.tbl->buckets) { MPL_uthash_fatal( "out of memory"); } \ memset((head)->hh.tbl->buckets, 0, \ MPL_HASH_INITIAL_NUM_BUCKETS*sizeof(struct MPL_UT_hash_bucket)); \ MPL_HASH_BLOOM_MAKE((head)->hh.tbl); \ (head)->hh.tbl->signature = MPL_HASH_SIGNATURE; \ } while(0) #define MPL_HASH_ADD(hh,head,fieldname,keylen_in,add) \ MPL_HASH_ADD_KEYPTR(hh,head,&((add)->fieldname),keylen_in,add) #define MPL_HASH_REPLACE(hh,head,fieldname,keylen_in,add,replaced) \ do { \ replaced=NULL; \ MPL_HASH_FIND(hh,head,&((add)->fieldname),keylen_in,replaced); \ if (replaced!=NULL) { \ MPL_HASH_DELETE(hh,head,replaced); \ } \ MPL_HASH_ADD(hh,head,fieldname,keylen_in,add); \ } while(0) #define MPL_HASH_ADD_KEYPTR(hh,head,keyptr,keylen_in,add) \ do { \ unsigned _ha_bkt; \ (add)->hh.next = NULL; \ (add)->hh.key = (char*)(keyptr); \ (add)->hh.keylen = (unsigned)(keylen_in); \ if (!(head)) { \ head = (add); \ (head)->hh.prev = NULL; \ MPL_HASH_MAKE_TABLE(hh,head); \ } else { \ (head)->hh.tbl->tail->next = (add); \ (add)->hh.prev = MPL_ELMT_FROM_HH((head)->hh.tbl, (head)->hh.tbl->tail); \ (head)->hh.tbl->tail = &((add)->hh); \ } \ (head)->hh.tbl->num_items++; \ (add)->hh.tbl = (head)->hh.tbl; \ MPL_HASH_FCN(keyptr,keylen_in, (head)->hh.tbl->num_buckets, \ (add)->hh.hashv, _ha_bkt); \ MPL_HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt],&(add)->hh); \ MPL_HASH_BLOOM_ADD((head)->hh.tbl,(add)->hh.hashv); \ MPL_HASH_EMIT_KEY(hh,head,keyptr,keylen_in); \ MPL_HASH_FSCK(hh,head); \ } while(0) #define MPL_HASH_TO_BKT( hashv, num_bkts, bkt ) \ do { \ bkt = ((hashv) & ((num_bkts) - 1U)); \ } while(0) /* delete "delptr" from the hash table. * "the usual" patch-up process for the app-order doubly-linked-list. * The use of _hd_hh_del below deserves special explanation. * These used to be expressed using (delptr) but that led to a bug * if someone used the same symbol for the head and deletee, like * HASH_DELETE(hh,users,users); * We want that to work, but by changing the head (users) below * we were forfeiting our ability to further refer to the deletee (users) * in the patch-up process. Solution: use scratch space to * copy the deletee pointer, then the latter references are via that * scratch pointer rather than through the repointed (users) symbol. */ #define MPL_HASH_DELETE(hh,head,delptr) \ do { \ struct MPL_UT_hash_handle *_hd_hh_del; \ if ( ((delptr)->hh.prev == NULL) && ((delptr)->hh.next == NULL) ) { \ MPL_uthash_free((head)->hh.tbl->buckets, \ (head)->hh.tbl->num_buckets*sizeof(struct MPL_UT_hash_bucket) ); \ MPL_HASH_BLOOM_FREE((head)->hh.tbl); \ MPL_uthash_free((head)->hh.tbl, sizeof(MPL_UT_hash_table)); \ head = NULL; \ } else { \ unsigned _hd_bkt; \ _hd_hh_del = (MPL_UT_hash_handle*)&((delptr)->hh); \ if ((delptr) == MPL_ELMT_FROM_HH((head)->hh.tbl,(head)->hh.tbl->tail)) { \ (head)->hh.tbl->tail = \ (MPL_UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) + \ (head)->hh.tbl->hho); \ } \ if ((delptr)->hh.prev != NULL) { \ ((MPL_UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) + \ (head)->hh.tbl->hho))->next = (delptr)->hh.next; \ } else { \ MPL_DECLTYPE_ASSIGN(head,(delptr)->hh.next); \ } \ if (_hd_hh_del->next != NULL) { \ ((MPL_UT_hash_handle*)((ptrdiff_t)_hd_hh_del->next + \ (head)->hh.tbl->hho))->prev = \ _hd_hh_del->prev; \ } \ MPL_HASH_TO_BKT( _hd_hh_del->hashv, (head)->hh.tbl->num_buckets, _hd_bkt); \ MPL_HASH_DEL_IN_BKT(hh,(head)->hh.tbl->buckets[_hd_bkt], _hd_hh_del); \ (head)->hh.tbl->num_items--; \ } \ MPL_HASH_FSCK(hh,head); \ } while (0) /* convenience forms of HASH_FIND/HASH_ADD/HASH_DEL */ #define MPL_HASH_FIND_STR(head,findstr,out) \ MPL_HASH_FIND(hh,head,findstr,(unsigned)strlen(findstr),out) #define MPL_HASH_ADD_STR(head,strfield,add) \ MPL_HASH_ADD(hh,head,strfield[0],(unsigned int)strlen(add->strfield),add) #define MPL_HASH_REPLACE_STR(head,strfield,add,replaced) \ MPL_HASH_REPLACE(hh,head,strfield[0],(unsigned)strlen(add->strfield),add,replaced) #define MPL_HASH_FIND_INT(head,findint,out) \ MPL_HASH_FIND(hh,head,findint,sizeof(int),out) #define MPL_HASH_ADD_INT(head,intfield,add) \ MPL_HASH_ADD(hh,head,intfield,sizeof(int),add) #define MPL_HASH_REPLACE_INT(head,intfield,add,replaced) \ MPL_HASH_REPLACE(hh,head,intfield,sizeof(int),add,replaced) #define MPL_HASH_FIND_PTR(head,findptr,out) \ MPL_HASH_FIND(hh,head,findptr,sizeof(void *),out) #define MPL_HASH_ADD_PTR(head,ptrfield,add) \ MPL_HASH_ADD(hh,head,ptrfield,sizeof(void *),add) #define MPL_HASH_REPLACE_PTR(head,ptrfield,add,replaced) \ MPL_HASH_REPLACE(hh,head,ptrfield,sizeof(void *),add,replaced) #define MPL_HASH_DEL(head,delptr) \ MPL_HASH_DELETE(hh,head,delptr) /* HASH_FSCK checks hash integrity on every add/delete when HASH_DEBUG is defined. * This is for uthash developer only; it compiles away if HASH_DEBUG isn't defined. */ #ifdef MPL_HASH_DEBUG #define MPL_HASH_OOPS(...) do { fprintf(stderr,__VA_ARGS__); exit(-1); } while (0) #define MPL_HASH_FSCK(hh,head) \ do { \ struct MPL_UT_hash_handle *_thh; \ if (head) { \ unsigned _bkt_i; \ unsigned _count; \ char *_prev; \ _count = 0; \ for( _bkt_i = 0; _bkt_i < (head)->hh.tbl->num_buckets; _bkt_i++) { \ unsigned _bkt_count = 0; \ _thh = (head)->hh.tbl->buckets[_bkt_i].hh_head; \ _prev = NULL; \ while (_thh) { \ if (_prev != (char*)(_thh->hh_prev)) { \ MPL_HASH_OOPS("invalid hh_prev %p, actual %p\n", \ _thh->hh_prev, _prev ); \ } \ _bkt_count++; \ _prev = (char*)(_thh); \ _thh = _thh->hh_next; \ } \ _count += _bkt_count; \ if ((head)->hh.tbl->buckets[_bkt_i].count != _bkt_count) { \ MPL_HASH_OOPS("invalid bucket count %u, actual %u\n", \ (head)->hh.tbl->buckets[_bkt_i].count, _bkt_count); \ } \ } \ if (_count != (head)->hh.tbl->num_items) { \ MPL_HASH_OOPS("invalid hh item count %u, actual %u\n", \ (head)->hh.tbl->num_items, _count ); \ } \ /* traverse hh in app order; check next/prev integrity, count */ \ _count = 0; \ _prev = NULL; \ _thh = &(head)->hh; \ while (_thh) { \ _count++; \ if (_prev !=(char*)(_thh->prev)) { \ MPL_HASH_OOPS("invalid prev %p, actual %p\n", \ _thh->prev, _prev ); \ } \ _prev = (char*)MPL_ELMT_FROM_HH((head)->hh.tbl, _thh); \ _thh = ( _thh->next ? (MPL_UT_hash_handle*)((char*)(_thh->next) + \ (head)->hh.tbl->hho) : NULL ); \ } \ if (_count != (head)->hh.tbl->num_items) { \ MPL_HASH_OOPS("invalid app item count %u, actual %u\n", \ (head)->hh.tbl->num_items, _count ); \ } \ } \ } while (0) #else # 356 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #define MPL_HASH_FSCK(hh,head) #endif # 358 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" /* When compiled with -DHASH_EMIT_KEYS, length-prefixed keys are emitted to * the descriptor to which this macro is defined for tuning the hash function. * The app can #include to get the prototype for write(2). */ #ifdef MPL_HASH_EMIT_KEYS #define MPL_HASH_EMIT_KEY(hh,head,keyptr,fieldlen) \ do { \ unsigned _klen = fieldlen; \ write(MPL_HASH_EMIT_KEYS, &_klen, sizeof(_klen)); \ write(MPL_HASH_EMIT_KEYS, keyptr, (unsigned long)fieldlen); \ } while (0) #else # 370 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #define MPL_HASH_EMIT_KEY(hh,head,keyptr,fieldlen) #endif # 372 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" /* default to Jenkin's hash unless overridden e.g. DHASH_FUNCTION=HASH_SAX */ #ifdef MPL_HASH_FUNCTION #define MPL_HASH_FCN MPL_HASH_FUNCTION #else # 377 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #define MPL_HASH_FCN MPL_HASH_JEN #endif # 379 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" /* The Bernstein hash function, used in Perl prior to v5.6. Note (x<<5+x)=x*33. */ #define MPL_HASH_BER(key,keylen,num_bkts,hashv,bkt) \ do { \ unsigned _hb_keylen=(unsigned)keylen; \ const unsigned char *_hb_key=(const unsigned char*)(key); \ (hashv) = 0; \ while (_hb_keylen-- != 0U) { \ (hashv) = (((hashv) << 5) + (hashv)) + *_hb_key++; \ } \ bkt = (hashv) & (num_bkts-1U); \ } while (0) /* SAX/FNV/OAT/JEN hash functions are macro variants of those listed at * http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx */ #define MPL_HASH_SAX(key,keylen,num_bkts,hashv,bkt) \ do { \ unsigned _sx_i; \ const unsigned char *_hs_key=(const unsigned char*)(key); \ hashv = 0; \ for(_sx_i=0; _sx_i < keylen; _sx_i++) { \ hashv ^= (hashv << 5) + (hashv >> 2) + _hs_key[_sx_i]; \ } \ bkt = hashv & (num_bkts-1U); \ } while (0) /* FNV-1a variation */ #define MPL_HASH_FNV(key,keylen,num_bkts,hashv,bkt) \ do { \ unsigned _fn_i; \ const unsigned char *_hf_key=(const unsigned char*)(key); \ hashv = 2166136261U; \ for(_fn_i=0; _fn_i < keylen; _fn_i++) { \ hashv = hashv ^ _hf_key[_fn_i]; \ hashv = hashv * 16777619U; \ } \ bkt = hashv & (num_bkts-1U); \ } while(0) #define MPL_HASH_OAT(key,keylen,num_bkts,hashv,bkt) \ do { \ unsigned _ho_i; \ const unsigned char *_ho_key=(const unsigned char*)(key); \ hashv = 0; \ for(_ho_i=0; _ho_i < keylen; _ho_i++) { \ hashv += _ho_key[_ho_i]; \ hashv += (hashv << 10); \ hashv ^= (hashv >> 6); \ } \ hashv += (hashv << 3); \ hashv ^= (hashv >> 11); \ hashv += (hashv << 15); \ bkt = hashv & (num_bkts-1U); \ } while(0) #define MPL_HASH_JEN_MIX(a,b,c) \ do { \ a -= b; a -= c; a ^= ( c >> 13 ); \ b -= c; b -= a; b ^= ( a << 8 ); \ c -= a; c -= b; c ^= ( b >> 13 ); \ a -= b; a -= c; a ^= ( c >> 12 ); \ b -= c; b -= a; b ^= ( a << 16 ); \ c -= a; c -= b; c ^= ( b >> 5 ); \ a -= b; a -= c; a ^= ( c >> 3 ); \ b -= c; b -= a; b ^= ( a << 10 ); \ c -= a; c -= b; c ^= ( b >> 15 ); \ } while (0) #define MPL_HASH_JEN(key,keylen,num_bkts,hashv,bkt) \ do { \ unsigned _hj_i,_hj_j,_hj_k; \ unsigned const char *_hj_key=(unsigned const char*)(key); \ hashv = 0xfeedbeefu; \ _hj_i = _hj_j = 0x9e3779b9u; \ _hj_k = (unsigned)(keylen); \ while (_hj_k >= 12U) { \ _hj_i += (_hj_key[0] + ( (unsigned)_hj_key[1] << 8 ) \ + ( (unsigned)_hj_key[2] << 16 ) \ + ( (unsigned)_hj_key[3] << 24 ) ); \ _hj_j += (_hj_key[4] + ( (unsigned)_hj_key[5] << 8 ) \ + ( (unsigned)_hj_key[6] << 16 ) \ + ( (unsigned)_hj_key[7] << 24 ) ); \ hashv += (_hj_key[8] + ( (unsigned)_hj_key[9] << 8 ) \ + ( (unsigned)_hj_key[10] << 16 ) \ + ( (unsigned)_hj_key[11] << 24 ) ); \ \ MPL_HASH_JEN_MIX(_hj_i, _hj_j, hashv); \ \ _hj_key += 12; \ _hj_k -= 12U; \ } \ hashv += (unsigned)(keylen); \ switch ( _hj_k ) { \ case 11: hashv += ( (unsigned)_hj_key[10] << 24 ); /* FALLTHROUGH */ \ case 10: hashv += ( (unsigned)_hj_key[9] << 16 ); /* FALLTHROUGH */ \ case 9: hashv += ( (unsigned)_hj_key[8] << 8 ); /* FALLTHROUGH */ \ case 8: _hj_j += ( (unsigned)_hj_key[7] << 24 ); /* FALLTHROUGH */ \ case 7: _hj_j += ( (unsigned)_hj_key[6] << 16 ); /* FALLTHROUGH */ \ case 6: _hj_j += ( (unsigned)_hj_key[5] << 8 ); /* FALLTHROUGH */ \ case 5: _hj_j += _hj_key[4]; /* FALLTHROUGH */ \ case 4: _hj_i += ( (unsigned)_hj_key[3] << 24 ); /* FALLTHROUGH */ \ case 3: _hj_i += ( (unsigned)_hj_key[2] << 16 ); /* FALLTHROUGH */ \ case 2: _hj_i += ( (unsigned)_hj_key[1] << 8 ); /* FALLTHROUGH */ \ case 1: _hj_i += _hj_key[0]; \ } \ MPL_HASH_JEN_MIX(_hj_i, _hj_j, hashv); \ bkt = hashv & (num_bkts-1U); \ } while(0) /* The Paul Hsieh hash function */ #undef get16bits #if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \ || defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__) #define get16bits(d) (*((const uint16_t *) (d))) #endif # 494 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #if !defined (get16bits) #define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8) \ +(uint32_t)(((const uint8_t *)(d))[0]) ) #endif # 499 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #define MPL_HASH_SFH(key,keylen,num_bkts,hashv,bkt) \ do { \ unsigned const char *_sfh_key=(unsigned const char*)(key); \ uint32_t _sfh_tmp, _sfh_len = (uint32_t)keylen; \ \ unsigned _sfh_rem = _sfh_len & 3U; \ _sfh_len >>= 2; \ hashv = 0xcafebabeu; \ \ /* Main loop */ \ for (;_sfh_len > 0U; _sfh_len--) { \ hashv += get16bits (_sfh_key); \ _sfh_tmp = ((uint32_t)(get16bits (_sfh_key+2)) << 11) ^ hashv; \ hashv = (hashv << 16) ^ _sfh_tmp; \ _sfh_key += 2U*sizeof (uint16_t); \ hashv += hashv >> 11; \ } \ \ /* Handle end cases */ \ switch (_sfh_rem) { \ case 3: hashv += get16bits (_sfh_key); \ hashv ^= hashv << 16; \ hashv ^= (uint32_t)(_sfh_key[sizeof (uint16_t)]) << 18; \ hashv += hashv >> 11; \ break; \ case 2: hashv += get16bits (_sfh_key); \ hashv ^= hashv << 11; \ hashv += hashv >> 17; \ break; \ case 1: hashv += *_sfh_key; \ hashv ^= hashv << 10; \ hashv += hashv >> 1; \ } \ \ /* Force "avalanching" of final 127 bits */ \ hashv ^= hashv << 3; \ hashv += hashv >> 5; \ hashv ^= hashv << 4; \ hashv += hashv >> 17; \ hashv ^= hashv << 25; \ hashv += hashv >> 6; \ bkt = hashv & (num_bkts-1U); \ } while(0) #ifdef MPL_HASH_USING_NO_STRICT_ALIASING /* The MurmurHash exploits some CPU's (x86,x86_64) tolerance for unaligned reads. * For other types of CPU's (e.g. Sparc) an unaligned read causes a bus error. * MurmurHash uses the faster approach only on CPU's where we know it's safe. * * Note the preprocessor built-in defines can be emitted using: * * gcc -m64 -dM -E - < /dev/null (on gcc) * cc -## a.c (where a.c is a simple test file) (Sun Studio) */ #if (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86)) #define MPL_MUR_GETBLOCK(p,i) p[i] #else /* non intel */ # 556 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #define MPL_MUR_PLUS0_ALIGNED(p) (((unsigned long)p & 3UL) == 0UL) #define MPL_MUR_PLUS1_ALIGNED(p) (((unsigned long)p & 3UL) == 1UL) #define MPL_MUR_PLUS2_ALIGNED(p) (((unsigned long)p & 3UL) == 2UL) #define MPL_MUR_PLUS3_ALIGNED(p) (((unsigned long)p & 3UL) == 3UL) #define MPL_WP(p) ((uint32_t*)((unsigned long)(p) & ~3UL)) #if (defined(__BIG_ENDIAN__) || defined(SPARC) || defined(__ppc__) || defined(__ppc64__)) #define MPL_MUR_THREE_ONE(p) ((((*WP(p))&0x00ffffff) << 8) | (((*(WP(p)+1))&0xff000000) >> 24)) #define MPL_MUR_TWO_TWO(p) ((((*WP(p))&0x0000ffff) <<16) | (((*(WP(p)+1))&0xffff0000) >> 16)) #define MPL_MUR_ONE_THREE(p) ((((*WP(p))&0x000000ff) <<24) | (((*(WP(p)+1))&0xffffff00) >> 8)) #else /* assume little endian non-intel */ # 566 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #define MPL_MUR_THREE_ONE(p) ((((*WP(p))&0xffffff00) >> 8) | (((*(WP(p)+1))&0x000000ff) << 24)) #define MPL_MUR_TWO_TWO(p) ((((*WP(p))&0xffff0000) >>16) | (((*(WP(p)+1))&0x0000ffff) << 16)) #define MPL_MUR_ONE_THREE(p) ((((*WP(p))&0xff000000) >>24) | (((*(WP(p)+1))&0x00ffffff) << 8)) #endif # 570 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #define MPL_MUR_GETBLOCK(p,i) (MPL_MUR_PLUS0_ALIGNED(p) ? ((p)[i]) : \ (MPL_MUR_PLUS1_ALIGNED(p) ? MPL_MUR_THREE_ONE(p) : \ (MPL_MUR_PLUS2_ALIGNED(p) ? MPL_MUR_TWO_TWO(p) : \ MPL_MUR_ONE_THREE(p)))) #endif # 575 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #define MPL_MUR_ROTL32(x,r) (((x) << (r)) | ((x) >> (32 - (r)))) #define MPL_MUR_FMIX(_h) \ do { \ _h ^= _h >> 16; \ _h *= 0x85ebca6bu; \ _h ^= _h >> 13; \ _h *= 0xc2b2ae35u; \ _h ^= _h >> 16; \ } while(0) #define MPL_HASH_MUR(key,keylen,num_bkts,hashv,bkt) \ do { \ const uint8_t *_mur_data = (const uint8_t*)(key); \ const int _mur_nblocks = (int)(keylen) / 4; \ uint32_t _mur_h1 = 0xf88D5353u; \ uint32_t _mur_c1 = 0xcc9e2d51u; \ uint32_t _mur_c2 = 0x1b873593u; \ uint32_t _mur_k1 = 0; \ const uint8_t *_mur_tail; \ const uint32_t *_mur_blocks = (const uint32_t*)(_mur_data+(_mur_nblocks*4)); \ int _mur_i; \ for(_mur_i = -_mur_nblocks; _mur_i!=0; _mur_i++) { \ _mur_k1 = MPL_MUR_GETBLOCK(_mur_blocks,_mur_i); \ _mur_k1 *= _mur_c1; \ _mur_k1 = MPL_MUR_ROTL32(_mur_k1,15); \ _mur_k1 *= _mur_c2; \ \ _mur_h1 ^= _mur_k1; \ _mur_h1 = MPL_MUR_ROTL32(_mur_h1,13); \ _mur_h1 = (_mur_h1*5U) + 0xe6546b64u; \ } \ _mur_tail = (const uint8_t*)(_mur_data + (_mur_nblocks*4)); \ _mur_k1=0; \ switch((keylen) & 3U) { \ case 3: _mur_k1 ^= (uint32_t)_mur_tail[2] << 16; /* FALLTHROUGH */ \ case 2: _mur_k1 ^= (uint32_t)_mur_tail[1] << 8; /* FALLTHROUGH */ \ case 1: _mur_k1 ^= (uint32_t)_mur_tail[0]; \ _mur_k1 *= _mur_c1; \ _mur_k1 = MPL_MUR_ROTL32(_mur_k1,15); \ _mur_k1 *= _mur_c2; \ _mur_h1 ^= _mur_k1; \ } \ _mur_h1 ^= (uint32_t)(keylen); \ MPL_MUR_FMIX(_mur_h1); \ hashv = _mur_h1; \ bkt = hashv & (num_bkts-1U); \ } while(0) #endif /* HASH_USING_NO_STRICT_ALIASING */ # 623 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" /* key comparison function; return 0 if keys equal */ #define MPL_HASH_KEYCMP(a,b,len) memcmp(a,b,(unsigned long)(len)) /* iterate over items in a known bucket to find desired item */ #define MPL_HASH_FIND_IN_BKT(tbl,hh,head,keyptr,keylen_in,out) \ do { \ if (head.hh_head != NULL) { MPL_DECLTYPE_ASSIGN(out,MPL_ELMT_FROM_HH(tbl,head.hh_head)); } \ else { out=NULL; } \ while (out != NULL) { \ if ((out)->hh.keylen == (keylen_in)) { \ if ((MPL_HASH_KEYCMP((out)->hh.key,keyptr,keylen_in)) == 0) { break; } \ } \ if ((out)->hh.hh_next != NULL) { MPL_DECLTYPE_ASSIGN(out,MPL_ELMT_FROM_HH(tbl,(out)->hh.hh_next)); } \ else { out = NULL; } \ } \ } while(0) /* add an item to a bucket */ #define MPL_HASH_ADD_TO_BKT(head,addhh) \ do { \ head.count++; \ (addhh)->hh_next = head.hh_head; \ (addhh)->hh_prev = NULL; \ if (head.hh_head != NULL) { (head).hh_head->hh_prev = (addhh); } \ (head).hh_head=addhh; \ if ((head.count >= ((head.expand_mult+1U) * MPL_HASH_BKT_CAPACITY_THRESH)) \ && ((addhh)->tbl->noexpand != 1U)) { \ MPL_HASH_EXPAND_BUCKETS((addhh)->tbl); \ } \ } while(0) /* remove an item from a given bucket */ #define MPL_HASH_DEL_IN_BKT(hh,head,hh_del) \ (head).count--; \ if ((head).hh_head == (MPL_UT_hash_handle*)hh_del) { \ (head).hh_head = (MPL_UT_hash_handle*)hh_del->hh_next; \ } \ if (hh_del->hh_prev) { \ hh_del->hh_prev->hh_next = hh_del->hh_next; \ } \ if (hh_del->hh_next) { \ hh_del->hh_next->hh_prev = hh_del->hh_prev; \ } /* Bucket expansion has the effect of doubling the number of buckets * and redistributing the items into the new buckets. Ideally the * items will distribute more or less evenly into the new buckets * (the extent to which this is true is a measure of the quality of * the hash function as it applies to the key domain). * * With the items distributed into more buckets, the chain length * (item count) in each bucket is reduced. Thus by expanding buckets * the hash keeps a bound on the chain length. This bounded chain * length is the essence of how a hash provides constant time lookup. * * The calculation of tbl->ideal_chain_maxlen below deserves some * explanation. First, keep in mind that we're calculating the ideal * maximum chain length based on the *new* (doubled) bucket count. * In fractions this is just n/b (n=number of items,b=new num buckets). * Since the ideal chain length is an integer, we want to calculate * ceil(n/b). We don't depend on floating point arithmetic in this * hash, so to calculate ceil(n/b) with integers we could write * * ceil(n/b) = (n/b) + ((n%b)?1:0) * * and in fact a previous version of this hash did just that. * But now we have improved things a bit by recognizing that b is * always a power of two. We keep its base 2 log handy (call it lb), * so now we can write this with a bit shift and logical AND: * * ceil(n/b) = (n>>lb) + ( (n & (b-1)) ? 1:0) * */ #define MPL_HASH_EXPAND_BUCKETS(tbl) \ do { \ unsigned _he_bkt; \ unsigned _he_bkt_i; \ struct MPL_UT_hash_handle *_he_thh, *_he_hh_nxt; \ MPL_UT_hash_bucket *_he_new_buckets, *_he_newbkt; \ _he_new_buckets = (MPL_UT_hash_bucket*)MPL_uthash_malloc( \ 2UL * tbl->num_buckets * sizeof(struct MPL_UT_hash_bucket)); \ if (!_he_new_buckets) { MPL_uthash_fatal( "out of memory"); } \ memset(_he_new_buckets, 0, \ 2UL * tbl->num_buckets * sizeof(struct MPL_UT_hash_bucket)); \ tbl->ideal_chain_maxlen = \ (tbl->num_items >> (tbl->log2_num_buckets+1U)) + \ (((tbl->num_items & ((tbl->num_buckets*2U)-1U)) != 0U) ? 1U : 0U); \ tbl->nonideal_items = 0; \ for(_he_bkt_i = 0; _he_bkt_i < tbl->num_buckets; _he_bkt_i++) \ { \ _he_thh = tbl->buckets[ _he_bkt_i ].hh_head; \ while (_he_thh != NULL) { \ _he_hh_nxt = _he_thh->hh_next; \ MPL_HASH_TO_BKT( _he_thh->hashv, tbl->num_buckets*2U, _he_bkt); \ _he_newbkt = &(_he_new_buckets[ _he_bkt ]); \ if (++(_he_newbkt->count) > tbl->ideal_chain_maxlen) { \ tbl->nonideal_items++; \ _he_newbkt->expand_mult = _he_newbkt->count / \ tbl->ideal_chain_maxlen; \ } \ _he_thh->hh_prev = NULL; \ _he_thh->hh_next = _he_newbkt->hh_head; \ if (_he_newbkt->hh_head != NULL) { _he_newbkt->hh_head->hh_prev = \ _he_thh; } \ _he_newbkt->hh_head = _he_thh; \ _he_thh = _he_hh_nxt; \ } \ } \ MPL_uthash_free( tbl->buckets, tbl->num_buckets*sizeof(struct MPL_UT_hash_bucket) ); \ tbl->num_buckets *= 2U; \ tbl->log2_num_buckets++; \ tbl->buckets = _he_new_buckets; \ tbl->ineff_expands = (tbl->nonideal_items > (tbl->num_items >> 1)) ? \ (tbl->ineff_expands+1U) : 0U; \ if (tbl->ineff_expands > 1U) { \ tbl->noexpand=1; \ MPL_uthash_noexpand_fyi(tbl); \ } \ MPL_uthash_expand_fyi(tbl); \ } while(0) /* This is an adaptation of Simon Tatham's O(n log(n)) mergesort */ /* Note that HASH_SORT assumes the hash handle name to be hh. * HASH_SRT was added to allow the hash handle name to be passed in. */ #define MPL_HASH_SORT(head,cmpfcn) MPL_HASH_SRT(hh,head,cmpfcn) #define MPL_HASH_SRT(hh,head,cmpfcn) \ do { \ unsigned _hs_i; \ unsigned _hs_looping,_hs_nmerges,_hs_insize,_hs_psize,_hs_qsize; \ struct MPL_UT_hash_handle *_hs_p, *_hs_q, *_hs_e, *_hs_list, *_hs_tail; \ if (head != NULL) { \ _hs_insize = 1; \ _hs_looping = 1; \ _hs_list = &((head)->hh); \ while (_hs_looping != 0U) { \ _hs_p = _hs_list; \ _hs_list = NULL; \ _hs_tail = NULL; \ _hs_nmerges = 0; \ while (_hs_p != NULL) { \ _hs_nmerges++; \ _hs_q = _hs_p; \ _hs_psize = 0; \ for ( _hs_i = 0; _hs_i < _hs_insize; _hs_i++ ) { \ _hs_psize++; \ _hs_q = (MPL_UT_hash_handle*)((_hs_q->next != NULL) ? \ ((void*)((char*)(_hs_q->next) + \ (head)->hh.tbl->hho)) : NULL); \ if (! (_hs_q) ) { break; } \ } \ _hs_qsize = _hs_insize; \ while ((_hs_psize > 0U) || ((_hs_qsize > 0U) && (_hs_q != NULL))) {\ if (_hs_psize == 0U) { \ _hs_e = _hs_q; \ _hs_q = (MPL_UT_hash_handle*)((_hs_q->next != NULL) ? \ ((void*)((char*)(_hs_q->next) + \ (head)->hh.tbl->hho)) : NULL); \ _hs_qsize--; \ } else if ( (_hs_qsize == 0U) || (_hs_q == NULL) ) { \ _hs_e = _hs_p; \ if (_hs_p != NULL){ \ _hs_p = (MPL_UT_hash_handle*)((_hs_p->next != NULL) ? \ ((void*)((char*)(_hs_p->next) + \ (head)->hh.tbl->hho)) : NULL); \ } \ _hs_psize--; \ } else if (( \ cmpfcn(MPL_DECLTYPE(head)(MPL_ELMT_FROM_HH((head)->hh.tbl,_hs_p)), \ MPL_DECLTYPE(head)(MPL_ELMT_FROM_HH((head)->hh.tbl,_hs_q))) \ ) <= 0) { \ _hs_e = _hs_p; \ if (_hs_p != NULL){ \ _hs_p = (MPL_UT_hash_handle*)((_hs_p->next != NULL) ? \ ((void*)((char*)(_hs_p->next) + \ (head)->hh.tbl->hho)) : NULL); \ } \ _hs_psize--; \ } else { \ _hs_e = _hs_q; \ _hs_q = (MPL_UT_hash_handle*)((_hs_q->next != NULL) ? \ ((void*)((char*)(_hs_q->next) + \ (head)->hh.tbl->hho)) : NULL); \ _hs_qsize--; \ } \ if ( _hs_tail != NULL ) { \ _hs_tail->next = ((_hs_e != NULL) ? \ MPL_ELMT_FROM_HH((head)->hh.tbl,_hs_e) : NULL); \ } else { \ _hs_list = _hs_e; \ } \ if (_hs_e != NULL) { \ _hs_e->prev = ((_hs_tail != NULL) ? \ MPL_ELMT_FROM_HH((head)->hh.tbl,_hs_tail) : NULL); \ } \ _hs_tail = _hs_e; \ } \ _hs_p = _hs_q; \ } \ if (_hs_tail != NULL){ \ _hs_tail->next = NULL; \ } \ if ( _hs_nmerges <= 1U ) { \ _hs_looping=0; \ (head)->hh.tbl->tail = _hs_tail; \ MPL_DECLTYPE_ASSIGN(head,MPL_ELMT_FROM_HH((head)->hh.tbl, _hs_list)); \ } \ _hs_insize *= 2U; \ } \ MPL_HASH_FSCK(hh,head); \ } \ } while (0) /* This function selects items from one hash into another hash. * The end result is that the selected items have dual presence * in both hashes. There is no copy of the items made; rather * they are added into the new hash through a secondary hash * hash handle that must be present in the structure. */ #define MPL_HASH_SELECT(hh_dst, dst, hh_src, src, cond) \ do { \ unsigned _src_bkt, _dst_bkt; \ void *_last_elt=NULL, *_elt; \ MPL_UT_hash_handle *_src_hh, *_dst_hh, *_last_elt_hh=NULL; \ ptrdiff_t _dst_hho = ((char*)(&(dst)->hh_dst) - (char*)(dst)); \ if (src != NULL) { \ for(_src_bkt=0; _src_bkt < (src)->hh_src.tbl->num_buckets; _src_bkt++) { \ for(_src_hh = (src)->hh_src.tbl->buckets[_src_bkt].hh_head; \ _src_hh != NULL; \ _src_hh = _src_hh->hh_next) { \ _elt = MPL_ELMT_FROM_HH((src)->hh_src.tbl, _src_hh); \ if (cond(_elt)) { \ _dst_hh = (MPL_UT_hash_handle*)(((char*)_elt) + _dst_hho); \ _dst_hh->key = _src_hh->key; \ _dst_hh->keylen = _src_hh->keylen; \ _dst_hh->hashv = _src_hh->hashv; \ _dst_hh->prev = _last_elt; \ _dst_hh->next = NULL; \ if (_last_elt_hh != NULL) { _last_elt_hh->next = _elt; } \ if (dst == NULL) { \ MPL_DECLTYPE_ASSIGN(dst,_elt); \ MPL_HASH_MAKE_TABLE(hh_dst,dst); \ } else { \ _dst_hh->tbl = (dst)->hh_dst.tbl; \ } \ MPL_HASH_TO_BKT(_dst_hh->hashv, _dst_hh->tbl->num_buckets, _dst_bkt); \ MPL_HASH_ADD_TO_BKT(_dst_hh->tbl->buckets[_dst_bkt],_dst_hh); \ (dst)->hh_dst.tbl->num_items++; \ _last_elt = _elt; \ _last_elt_hh = _dst_hh; \ } \ } \ } \ } \ MPL_HASH_FSCK(hh_dst,dst); \ } while (0) #define MPL_HASH_CLEAR(hh,head) \ do { \ if (head != NULL) { \ MPL_uthash_free((head)->hh.tbl->buckets, \ (head)->hh.tbl->num_buckets*sizeof(struct MPL_UT_hash_bucket)); \ MPL_HASH_BLOOM_FREE((head)->hh.tbl); \ MPL_uthash_free((head)->hh.tbl, sizeof(MPL_UT_hash_table)); \ (head)=NULL; \ } \ } while(0) #define MPL_HASH_OVERHEAD(hh,head) \ ((head != NULL) ? ( \ (size_t)(((head)->hh.tbl->num_items * sizeof(MPL_UT_hash_handle)) + \ ((head)->hh.tbl->num_buckets * sizeof(MPL_UT_hash_bucket)) + \ sizeof(MPL_UT_hash_table) + \ (MPL_HASH_BLOOM_BYTELEN))) : 0U) #ifdef MPL_NO_DECLTYPE #define MPL_HASH_ITER(hh,head,el,tmp) \ for(((el)=(head)), ((*(char**)(&(tmp)))=(char*)((head!=NULL)?(head)->hh.next:NULL)); \ (el) != NULL; ((el)=(tmp)), ((*(char**)(&(tmp)))=(char*)((tmp!=NULL)?(tmp)->hh.next:NULL))) #else # 903 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" #define MPL_HASH_ITER(hh,head,el,tmp) \ for(((el)=(head)), ((tmp)=MPL_DECLTYPE(el)((head!=NULL)?(head)->hh.next:NULL)); \ (el) != NULL; ((el)=(tmp)), ((tmp)=MPL_DECLTYPE(el)((tmp!=NULL)?(tmp)->hh.next:NULL))) #endif # 907 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" /* obtain a count of items in the hash */ #define MPL_HASH_COUNT(head) MPL_HASH_CNT(hh,head) #define MPL_HASH_CNT(hh,head) ((head != NULL)?((head)->hh.tbl->num_items):0U) typedef struct MPL_UT_hash_bucket { struct MPL_UT_hash_handle *hh_head; unsigned count; /* expand_mult is normally set to 0. In this situation, the max chain length * threshold is enforced at its default value, HASH_BKT_CAPACITY_THRESH. (If * the bucket's chain exceeds this length, bucket expansion is triggered). * However, setting expand_mult to a non-zero value delays bucket expansion * (that would be triggered by additions to this particular bucket) * until its chain length reaches a *multiple* of HASH_BKT_CAPACITY_THRESH. * (The multiplier is simply expand_mult+1). The whole idea of this * multiplier is to reduce bucket expansions, since they are expensive, in * situations where we know that a particular bucket tends to be overused. * It is better to let its chain length grow to a longer yet-still-bounded * value, than to do an O(n) bucket expansion too often. */ unsigned expand_mult; } MPL_UT_hash_bucket; /* random signature used only to find hash tables in external analysis */ #define MPL_HASH_SIGNATURE 0xa0111fe1u #define MPL_HASH_BLOOM_SIGNATURE 0xb12220f2u typedef struct MPL_UT_hash_table { MPL_UT_hash_bucket *buckets; unsigned num_buckets, log2_num_buckets; unsigned num_items; struct MPL_UT_hash_handle *tail; /* tail hh in app order, for fast append */ ptrdiff_t hho; /* hash handle offset (byte pos of hash handle in element */ /* in an ideal situation (all buckets used equally), no bucket would have * more than ceil(#items/#buckets) items. that's the ideal chain length. */ unsigned ideal_chain_maxlen; /* nonideal_items is the number of items in the hash whose chain position * exceeds the ideal chain maxlen. these items pay the penalty for an uneven * hash distribution; reaching them in a chain traversal takes >ideal steps */ unsigned nonideal_items; /* ineffective expands occur when a bucket doubling was performed, but * afterward, more than half the items in the hash had nonideal chain * positions. If this happens on two consecutive expansions we inhibit any * further expansion, as it's not helping; this happens when the hash * function isn't a good fit for the key domain. When expansion is inhibited * the hash will still work, albeit no longer in constant time. */ unsigned ineff_expands, noexpand; uint32_t signature; /* used only to find hash tables in external analysis */ #ifdef MPL_HASH_BLOOM uint32_t bloom_sig; /* used only to test bloom exists in external analysis */ uint8_t *bloom_bv; uint8_t bloom_nbits; #endif # 966 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" } MPL_UT_hash_table; typedef struct MPL_UT_hash_handle { struct MPL_UT_hash_table *tbl; void *prev; /* prev element in app order */ void *next; /* next element in app order */ struct MPL_UT_hash_handle *hh_prev; /* previous hh in bucket order */ struct MPL_UT_hash_handle *hh_next; /* next hh in bucket order */ void *key; /* ptr to enclosing struct's key */ unsigned keylen; /* enclosing struct's key len */ unsigned hashv; /* result of hash-fcn(key) */ } MPL_UT_hash_handle; #endif /* MPL_UTHASH_H */ # 981 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpl/include/mpl_uthash.h" # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_objects.h" #endif /* expanded by -frewrite-includes */ # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" #ifdef HAVE_ERROR_CHECKING typedef enum { MPIR_T_OBJECT_INVALID = 0, MPIR_T_ENUM_HANDLE, MPIR_T_CVAR_HANDLE, MPIR_T_PVAR_HANDLE, MPIR_T_PVAR_SESSION } MPIR_T_object_kind; #endif # 31 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" /* MPI_T enum */ typedef struct enum_item_s { const char* name; int value; } enum_item_t; typedef struct MPIR_T_enum_s { #ifdef HAVE_ERROR_CHECKING MPIR_T_object_kind kind; #endif # 43 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" const char *name; UT_array *items; } MPIR_T_enum_t; /* MPI_T category (cat) */ typedef struct { const char *name; UT_array *cvar_indices; UT_array *pvar_indices; UT_array *subcat_indices; const char *desc; } cat_table_entry_t; /* Hash names to indices in a table */ typedef struct { const char *name; unsigned idx; MPL_UT_hash_handle hh; /* Makes this structure hashable */ } name2index_hash_t; /* MPI_T control variable (cvar) */ typedef struct MPIR_T_cvar_range_value_s { int low; int high; } MPIR_T_cvar_range_value_t; /* Type used to represent cvar default values */ typedef union MPIR_T_cvar_value_s { int d; unsigned u; unsigned ul; unsigned ull; MPI_Count c; char* str; double f; MPIR_T_cvar_range_value_t range; } MPIR_T_cvar_value_t; typedef int MPIR_T_cvar_get_addr_cb(void *obj_handle, void **addr); typedef int MPIR_T_cvar_get_count_cb(void *obj_handle, int *count); typedef struct cvar_table_entry_s { /* Is the cvar currently in use? False if the cvar is unregistered */ int active; /* cvar name */ const char *name; /* Address of the cvar. May be NULL when get_addr != NULL */ void *addr; /* cvar data type */ MPI_Datatype datatype; /* Num. of elements of the cvar. May be ignored when get_count != NULL */ int count; /* Properties of the cvar */ MPI_T_enum enumtype; MPIR_T_verbosity_t verbosity; MPIR_T_bind_t bind; MPIR_T_scope_t scope; /* Default value */ MPIR_T_cvar_value_t defaultval; /* If not NULL, components provide this callback to get addr of the cvar */ MPIR_T_cvar_get_addr_cb *get_addr; /* If not NULL, components provide this callback to get count */ MPIR_T_cvar_get_count_cb *get_count; /* Description of the cvar */ const char *desc; } cvar_table_entry_t; typedef struct MPIR_T_cvar_handle_s { #ifdef HAVE_ERROR_CHECKING MPIR_T_object_kind kind; #endif # 125 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" /* Address and count of the cvar. Set at handle allocation time */ void *addr; int count; /* Cached value from cvar_table_entry_t to avoid indirection */ MPI_Datatype datatype; MPIR_T_scope_t scope; } MPIR_T_cvar_handle_t; void MPIR_T_CVAR_REGISTER_impl( MPI_Datatype dtype, const char* name, const void *addr, int count, MPIR_T_enum_t *etype, MPIR_T_verbosity_t verb, MPIR_T_bind_t bind, MPIR_T_scope_t scope,MPIR_T_cvar_get_addr_cb get_addr, MPIR_T_cvar_get_count_cb get_count, MPIR_T_cvar_value_t defaultval, const char *cat, const char * desc); /* MPI_T performance variable (pvar) */ /* Forward declaration */ struct MPIR_T_pvar_handle_s; struct MPIR_T_pvar_session_s; typedef void MPIR_T_pvar_get_value_cb(void *addr, void *obj_handle, int count, void *buf); typedef void MPIR_T_pvar_get_count_cb(void *addr, void *obj_handle, int *count); /* Basic pvar flags defined by MPI_T standard */ #define MPIR_T_PVAR_FLAG_READONLY 0x01 #define MPIR_T_PVAR_FLAG_CONTINUOUS 0x02 #define MPIR_T_PVAR_FLAG_ATOMIC 0x04 /* Auxlilary flags used by MPIR_T */ /* pvar is MPI_T_PVAR_CLASS_{COUNTER, TIMER, AGGREGATE} */ #define MPIR_T_PVAR_FLAG_SUM 0x08 /* pvar is MPI_T_PVAR_CLASS_{HIGH, LOW}WATERMARK */ #define MPIR_T_PVAR_FLAG_WATERMARK 0x10 /* pvar is continuous. If not, it has been started at least once */ #define MPIR_T_PVAR_FLAG_ONCESTARTED 0x20 /* pvar is continuous. If not, it is started */ #define MPIR_T_PVAR_FLAG_STARTED 0x40 /* Used only for watermark handles. Set if a pvar handle is the * first handle of an associated watermark. */ #define MPIR_T_PVAR_FLAG_FIRST 0x80 /* MPI_T performance variable (pvar) stuff */ typedef struct { /* Is the pvar in use (i.e., not unregistered)? */ int active; /* pvar name */ const char *name; /* If not NULL, it is address of the pvar */ void *addr; /* pvar data type */ MPI_Datatype datatype; /* Num. of elements of the pvar */ int count; /* Properties of the pvar */ MPIR_T_pvar_class_t varclass; MPIR_T_verbosity_t verbosity; MPIR_T_enum_t *enumtype; MPIR_T_bind_t bind; /* Basic flags of the pvar */ int flags; /* If not NULL, components provide this callback to read the pvar */ MPIR_T_pvar_get_value_cb *get_value; /* If not NULL, components provide this callback to get count */ MPIR_T_pvar_get_count_cb *get_count; /* Description of the pvar */ const char *desc; } pvar_table_entry_t; /* The following two macros do not work since C preprocessor does not support nested ifdefs. So we use another woarkable but a little ugly approach. #define PVAR_GATED_ACTION(MODULE, action_) \ do { \ #ifdef ENABLE_PVAR_##MODULE \ action_; \ #endif \ } while (0) */ /* ENABLE_PVAR_##MODULE must be defined by configure script either to 0 or 1 */ #define PVAR_GATED_ACTION(MODULE, action_) \ do { \ if (ENABLE_PVAR_##MODULE) { \ action_; \ } \ } while (0) /* For some classes of pvars, internally we can not represent them * in basic data types. So come the following typedefs. */ /* Timer type */ typedef struct { /* Accumulated time */ MPID_Time_t total; /* Time when the timer was started recently */ MPID_Time_t curstart; /* A counter recording how many times the timer is started */ unsigned long long count; } MPIR_T_pvar_timer_t; /* An union to represent a watermark value */ typedef union { double f; unsigned u; unsigned long ul; unsigned long long ull; } watermark_value_t; /* Watermark type */ typedef struct { /* current -- current resource utilization level * waterarmk -- cached value for the first pvar handle */ watermark_value_t current, watermark; /* Datatype of the watermark */ MPI_Datatype datatype; /* Is the cached value (i.e, watermark) in use by a pvar handle? */ int first_used; /* Is the first pvar handle started? */ int first_started; /* A double-linked list of handles of the pvar */ struct MPIR_T_pvar_handle_s *hlist; } MPIR_T_pvar_watermark_t; typedef struct MPIR_T_pvar_handle_s { #ifdef HAVE_ERROR_CHECKING MPIR_T_object_kind kind; #endif # 280 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" /* These are cached fields from pvar table. Do so to avoid extra * indirection when accessing them through pvar handles. */ void *addr; MPI_Datatype datatype; int count; MPIR_T_pvar_get_value_cb *get_value; MPIR_T_pvar_class_t varclass; /* Bytes of an element of datatype */ int bytes; /* Basic flags copied from pvar info + auxilary flags in pvar handle */ int flags; /* Store info here in case we need other fields */ const pvar_table_entry_t *info; /* Owner session from which the handle is allocated */ struct MPIR_T_pvar_session_s *session; /* Object which this pvar is bound to. NULL if no binding */ void *obj_handle; /* This is how we support pvar sessions. * * For pvars of counter, timer or aggregate type, we cache their value at * the last start time in offset, their current value in current, and * their accumlated value in accum. Generally, when such a pvar is running, * reading the pvar should return * accum[i] + current[i] - offset[i], 0 <= i < count - 1. * When the pvar is stopped, reading just returns accum. * * For pvars of high/lowwatermark type, above method does not work. * We have a copy of such a pvar in every handle of the pvar. * Handles are registered to the pvar. Whenever a watermark changes, * its copies in non-stopped handles are updated. That sounds non-scalable. * Considering single-session is common, we reserve room in watermark * themselves for cache buffer for the first handle. So when such a pvar * changes, it also updates the watermark close to it in memory. * * For pvars of other classes, since they are supposed to be readonly * and continuous (FIXME: Is it true?), caching is not needed. */ void *accum; void *offset; void *current; watermark_value_t watermark; /* To chain handles in a session */ struct MPIR_T_pvar_handle_s *prev, *next; /* To chain handles of a watermark pvar */ struct MPIR_T_pvar_handle_s *prev2, *next2; } MPIR_T_pvar_handle_t; typedef struct MPIR_T_pvar_session_s { #ifdef HAVE_ERROR_CHECKING MPIR_T_object_kind kind; #endif # 342 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" /* A linked list of pvar handles */ MPIR_T_pvar_handle_t *hlist; } MPIR_T_pvar_session_t; extern void MPIR_T_PVAR_REGISTER_impl( int varclass, MPI_Datatype dtype, const char* name, void *addr, int count, MPIR_T_enum_t *etype, int verb, int bind, int flags, MPIR_T_pvar_get_value_cb get_value, MPIR_T_pvar_get_count_cb get_count, const char * cat, const char * desc); /* For static pvars (i.e., pvars with static storage), we embed their class name * into their variable name, so that users can declare pvars with the same name * for different classes, without worry of name conflict. "class + pvar name" * should be unique as required by MPI_T. */ /* MPI_T_PVAR_CLASS_STATE (continuous only) */ /* Interfaces through pointer or name */ #define MPIR_T_PVAR_STATE_SET_VAR_impl(ptr_, val_) \ do { *(ptr_) = (val_); } while (0) #define MPIR_T_PVAR_STATE_GET_VAR_impl(ptr_) \ (*(ptr_)) #define MPIR_T_PVAR_STATE_SET_impl(name_, val_) \ MPIR_T_PVAR_STATE_SET_VAR_impl(&PVAR_STATE_##name_, val_) #define MPIR_T_PVAR_STATE_GET_impl(name_) \ MPIR_T_PVAR_STATE_GET_VAR_impl(&PVAR_STATE_##name_) /* Registration AND initialization for static pvar */ #define MPIR_T_PVAR_STATE_REGISTER_STATIC_impl(dtype_, name_, \ initval_, etype_, verb_, bind_, flags_, cat_, desc_) \ do { \ void *addr_; \ /* Allowable datatypes only */ \ MPIR_Assert((dtype_) == MPI_INT); \ /* Double check if dtype_ and name_ match */ \ MPIR_Assert(sizeof(PVAR_STATE_##name_) == MPID_Datatype_get_basic_size(dtype_)); \ MPIR_Assert((flags_) & MPIR_T_PVAR_FLAG_CONTINUOUS); \ /* State pvars should be describled further by an enum */ \ MPIR_Assert((etype_) != MPI_T_ENUM_NULL); \ PVAR_STATE_##name_ = (initval_); \ addr_ = &PVAR_STATE_##name_; \ MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_STATE, dtype_, #name_, \ addr_, 1, etype_, verb_, bind_, flags_, NULL, NULL, cat_, desc_); \ } while (0) /* Registration for dynamic pvar w/ or w/o callback. Init is left to users */ #define MPIR_T_PVAR_STATE_REGISTER_DYNAMIC_impl(dtype_, name_, addr_, count_, \ etype_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \ do { \ /* Allowable datatypes */ \ MPIR_Assert((dtype_) == MPI_INT); \ MPIR_Assert((flags_) & MPIR_T_PVAR_FLAG_CONTINUOUS); \ MPIR_Assert((etype_) != MPI_T_ENUM_NULL); \ MPIR_Assert((addr_) != NULL || (get_value_) != NULL); \ MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_STATE, dtype_, #name_, \ addr_, count_, etype_, verb_, bind_, flags_, get_value_, cat_, desc_); \ } while (0) /* MPI_T_PVAR_CLASS_LEVEL (continuous only) */ /* Interfaces through pointer or name */ #define MPIR_T_PVAR_LEVEL_SET_VAR_impl(ptr_, val_) \ do { *(ptr_) = (val_); } while (0) #define MPIR_T_PVAR_LEVEL_GET_VAR_impl(ptr_) \ (*(ptr_)) #define MPIR_T_PVAR_LEVEL_INC_VAR_impl(ptr_, val_) \ do { *(ptr_) += (val_); } while (0) #define MPIR_T_PVAR_LEVEL_DEC_VAR_impl(ptr_, val_) \ do { *(ptr_) -= (val_); } while (0) #define MPIR_T_PVAR_LEVEL_SET_impl(name_, val_) \ MPIR_T_PVAR_LEVEL_SET_VAR_impl(&PVAR_LEVEL_##name_, val_) #define MPIR_T_PVAR_LEVEL_GET_impl(name_) \ MPIR_T_PVAR_LEVEL_GET_VAR_impl(&PVAR_LEVEL_##name_) #define MPIR_T_PVAR_LEVEL_INC_impl(name_, val_) \ MPIR_T_PVAR_LEVEL_INC_VAR_impl(&PVAR_LEVEL_##name_, val_) #define MPIR_T_PVAR_LEVEL_DEC_impl(name_, val_) \ MPIR_T_PVAR_LEVEL_DEC_VAR_impl(&PVAR_LEVEL_##name_, val_) /* Registration AND initialization for static pvar */ #define MPIR_T_PVAR_LEVEL_REGISTER_STATIC_impl(dtype_, name_, \ initval_, verb_, bind_, flags_, cat_, desc_) \ do { \ void *addr_; \ /* Allowable datatypes only */ \ MPIR_Assert((dtype_) == MPI_UNSIGNED || (dtype_) == MPI_UNSIGNED_LONG || \ (dtype_) == MPI_UNSIGNED_LONG_LONG || (dtype_) == MPI_DOUBLE); \ /* Double check if dtype_ and name_ match */ \ MPIR_Assert(sizeof(PVAR_LEVEL_##name_) == MPID_Datatype_get_basic_size(dtype_)); \ MPIR_Assert((flags_) & MPIR_T_PVAR_FLAG_CONTINUOUS); \ PVAR_LEVEL_##name_ = (initval_); \ addr_ = &PVAR_LEVEL_##name_; \ MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_LEVEL, dtype_, #name_, \ addr_, 1, MPI_T_ENUM_NULL, verb_, bind_, flags_, NULL, NULL, cat_, desc_); \ } while (0) /* Registration for dynamic pvar w/ or w/o callback. Init is left to users */ #define MPIR_T_PVAR_LEVEL_REGISTER_DYNAMIC_impl(dtype_, name_, \ addr_, count_, verb_, bind_, flags_, get_value_, get_count, cat_, desc_) \ do { \ /* Allowable datatypes */ \ MPIR_Assert((dtype_) == MPI_UNSIGNED || (dtype_) == MPI_UNSIGNED_LONG || \ (dtype_) == MPI_UNSIGNED_LONG_LONG || (dtype_) == MPI_DOUBLE); \ MPIR_Assert((flags_) & MPIR_T_PVAR_FLAG_CONTINUOUS); \ MPIR_Assert((addr_) != NULL || (get_value_) != NULL); \ MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_LEVEL, dtype_, #name_, \ addr_, count_, MPI_T_ENUM_NULL, verb_, bind_, flags_, get_value_, \ get_count, cat_, desc_); \ } while (0) /* MPI_T_PVAR_CLASS_SIZE (continuous only) */ /* Interfaces through pointer or name */ #define MPIR_T_PVAR_SIZE_SET_VAR_impl(ptr_, val_) \ do { *(ptr_) = (val_); } while (0) #define MPIR_T_PVAR_SIZE_GET_VAR_impl(ptr_) \ (*(ptr_)) #define MPIR_T_PVAR_SIZE_SET_impl(name_, val_) \ MPIR_T_PVAR_SIZE_SET_VAR_impl(&PVAR_SIZE_##name_, val_) #define MPIR_T_PVAR_SIZE_GET_impl(name_) \ MPIR_T_PVAR_SIZE_GET_VAR_impl(&PVAR_SIZE_##name_) /* Registration AND initialization for static pvar */ #define MPIR_T_PVAR_SIZE_REGISTER_STATIC_impl(dtype_, name_, \ initval_, verb_, bind_, flags_, cat_, desc_) \ do { \ void *addr_; \ /* Allowable datatypes only */ \ MPIR_Assert((dtype_) == MPI_UNSIGNED || (dtype_) == MPI_UNSIGNED_LONG || \ (dtype_) == MPI_UNSIGNED_LONG_LONG || (dtype_) == MPI_DOUBLE); \ /* Double check if dtype_ and name_ match */ \ MPIR_Assert(sizeof(PVAR_SIZE_##name_) == MPID_Datatype_get_basic_size(dtype_)); \ MPIR_Assert((flags_) & MPIR_T_PVAR_FLAG_CONTINUOUS); \ PVAR_SIZE_##name_ = (initval_); \ addr_ = &PVAR_SIZE_##name_; \ MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_SIZE, dtype_, #name_, \ addr_, 1, MPI_T_ENUM_NULL, verb_, bind_, flags_, NULL, NULL, cat_, desc_); \ } while (0) /* Registration for dynamic pvar w/ or w/o callback. Init is left to users */ #define MPIR_T_PVAR_SIZE_REGISTER_DYNAMIC_impl(dtype_, name_, \ addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \ do { \ /* Allowable datatypes */ \ MPIR_Assert((dtype_) == MPI_UNSIGNED || (dtype_) == MPI_UNSIGNED_LONG || \ (dtype_) == MPI_UNSIGNED_LONG_LONG || (dtype_) == MPI_DOUBLE); \ MPIR_Assert((flags_) & MPIR_T_PVAR_FLAG_CONTINUOUS); \ MPIR_Assert((addr_) != NULL || (get_value_) != NULL); \ MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_SIZE, dtype_, #name_, \ addr_, count_, MPI_T_ENUM_NULL, verb_, bind_, flags_, get_value_, \ get_count_, cat_, desc_); \ } while (0) /* MPI_T_PVAR_CLASS_PERCENTAGE (continuous only) */ /* Interfaces through pointer or name */ #define MPIR_T_PVAR_PERCENTAGE_SET_VAR_impl(ptr_, val_) \ do { \ MPIR_Assert(0.0 <= (val_) && (val_) <= 1.0); \ *(ptr_) = (val_); \ } while (0) #define MPIR_T_PVAR_PERCENTAGE_GET_VAR_impl(ptr_) \ (*(ptr_)) #define MPIR_T_PVAR_PERCENTAGE_SET_impl(name_, val_) \ MPIR_T_PVAR_PERCENTAGE_SET_VAR_impl(&PVAR_PERCENTAGE_##name_, val_) #define MPIR_T_PVAR_PERCENTAGE_GET_impl(name_) \ MPIR_T_PVAR_PERCENTAGE_GET_VAR_impl(&PVAR_PERCENTAGE_##name_) /* Registration AND initialization for static pvar */ #define MPIR_T_PVAR_PERCENTAGE_REGISTER_STATIC_impl(dtype_, name_, \ initval_, verb_, bind_, flags_, cat_, desc_) \ do { \ void *addr_; \ /* Allowable datatypes only */ \ MPIR_Assert((dtype_) == MPI_DOUBLE); \ /* Double check if dtype_ and name_ match */ \ MPIR_Assert(sizeof(PVAR_PERCENTAGE_##name_) == MPID_Datatype_get_basic_size(dtype_)); \ MPIR_Assert((flags_) & MPIR_T_PVAR_FLAG_CONTINUOUS); \ addr_ = &PVAR_PERCENTAGE_##name_; \ PVAR_PERCENTAGE_##name_ = (initval_); \ MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_PERCENTAGE, dtype_, #name_, \ addr_, 1, MPI_T_ENUM_NULL, verb_, bind_, flags_, NULL, NULL, cat_, desc_); \ } while (0) /* Registration for dynamic pvar w/ or w/o callback. Init is left to users */ #define MPIR_T_PVAR_PERCENTAGE_REGISTER_DYNAMIC_impl(dtype_, name_, \ addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \ do { \ /* Allowable datatypes */ \ MPIR_Assert((dtype_) == MPI_DOUBLE); \ MPIR_Assert((flags_) & MPIR_T_PVAR_FLAG_CONTINUOUS); \ MPIR_Assert((addr_) != NULL || (get_value_) != NULL); \ MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_PERCENTAGE, dtype_, #name_, \ addr_, count_, MPI_T_ENUM_NULL, verb_, bind_, flags_, get_value_, \ get_count_, cat_, desc_); \ } while (0) /* MPI_T_PVAR_CLASS_COUNTER (continuous or not) */ /* Interfaces through pointer or name */ #define MPIR_T_PVAR_COUNTER_INIT_VAR_impl(ptr_) \ do { *(ptr_) = 0; } while (0) /* _COUNTER_SET is intentionally not provided. Users should only INC counters */ #define MPIR_T_PVAR_COUNTER_GET_VAR_impl(ptr_) \ (*(ptr_)) #define MPIR_T_PVAR_COUNTER_INC_VAR_impl(ptr_, inc_) \ do { *(ptr_) += (inc_); } while (0) #define MPIR_T_PVAR_COUNTER_INIT_impl(name_) \ MPIR_T_PVAR_COUNTER_INIT_VAR_impl(&PVAR_COUNTER_##name_) #define MPIR_T_PVAR_COUNTER_GET_impl(name_) \ MPIR_T_PVAR_COUNTER_GET_VAR_impl(&PVAR_COUNTER_##name_) #define MPIR_T_PVAR_COUNTER_INC_impl(name_, inc_) \ MPIR_T_PVAR_COUNTER_INC_VAR_impl(&PVAR_COUNTER_##name_, inc_) #define MPIR_T_PVAR_COUNTER_ADDR_impl(name_) \ (&PVAR_COUNTER_##name_) /* Registration AND initialization to zero for static pvar. */ #define MPIR_T_PVAR_COUNTER_REGISTER_STATIC_impl(dtype_, name_, \ verb_, bind_, flags_, cat_, desc_) \ do { \ void *addr_; \ /* Allowable datatypes only */ \ MPIR_Assert((dtype_) == MPI_UNSIGNED || (dtype_) == MPI_UNSIGNED_LONG || \ (dtype_) == MPI_UNSIGNED_LONG_LONG); \ /* Double check if dtype_ and name_ match*/ \ MPIR_Assert(sizeof(PVAR_COUNTER_##name_) == MPID_Datatype_get_basic_size(dtype_)); \ PVAR_COUNTER_##name_ = 0; \ addr_ = &PVAR_COUNTER_##name_; \ MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_COUNTER, dtype_, #name_, \ addr_, 1, MPI_T_ENUM_NULL, verb_, bind_, flags_, NULL, NULL, cat_, desc_); \ } while (0) /* Registration for dynamic pvar w/ or w/o callback. Init is left to users */ #define MPIR_T_PVAR_COUNTER_REGISTER_DYNAMIC_impl(dtype_, name_, \ addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \ do { \ /* Allowable datatypes */ \ MPIR_Assert((dtype_) == MPI_UNSIGNED || (dtype_) == MPI_UNSIGNED_LONG || \ (dtype_) == MPI_UNSIGNED_LONG_LONG); \ MPIR_Assert((addr_) != NULL || (get_value_) != NULL); \ MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_COUNTER, dtype_, #name_, \ addr_, count_, MPI_T_ENUM_NULL, verb_, bind_, flags_, get_value_, \ get_count_, cat_, desc_); \ } while (0) /* Interfaces through pointer or name */ #define MPIR_T_PVAR_COUNTER_ARRAY_INIT_VAR_impl(ptr_, count_) \ do { \ int idx_; \ idx_ = 0; \ for (; idx_ < (count_); idx_++) \ *((ptr_) + idx_) = 0; \ } while (0) #define MPIR_T_PVAR_COUNTER_ARRAY_GET_VAR_impl(ptr_, idx_) \ *((ptr_) + (idx_)) #define MPIR_T_PVAR_COUNTER_ARRAY_INC_VAR_impl(ptr_, idx_, inc_) \ do { *((ptr_) + (idx_)) += (inc_); } while (0) #define MPIR_T_PVAR_COUNTER_ARRAY_INIT_impl(name_) \ do { \ int count_; \ count_ = sizeof(PVAR_COUNTER_##name_)/sizeof(PVAR_COUNTER_##name_[0]); \ MPIR_T_PVAR_COUNTER_ARRAY_INIT_VAR_impl(PVAR_COUNTER_##name_, count_); \ } while (0) #define MPIR_T_PVAR_COUNTER_ARRAY_GET_impl(name_, idx_) \ MPIR_T_PVAR_COUNTER_ARRAY_GET_VAR_impl(PVAR_COUNTER_##name_, idx_) #define MPIR_T_PVAR_COUNTER_ARRAY_INC_impl(ptr_, idx_, inc_) \ MPIR_T_PVAR_COUNTER_ARRAY_INC_VAR_impl(PVAR_COUNTER_##name_, idx_, inc_) /* Registration AND initialization to zero for static counter array */ #define MPIR_T_PVAR_COUNTER_ARRAY_REGISTER_STATIC_impl(dtype_, name_, \ verb_, bind_, flags_, cat_, desc_) \ do { \ void *addr_; \ int count_; \ /* Allowable datatypes only */ \ MPIR_Assert((dtype_) == MPI_UNSIGNED || (dtype_) == MPI_UNSIGNED_LONG || \ (dtype_) == MPI_UNSIGNED_LONG_LONG); \ /* Double check if dtype_ and name_ match */ \ MPIR_Assert(sizeof(PVAR_COUNTER_##name_[0]) == MPID_Datatype_get_basic_size(dtype_)); \ addr_ = PVAR_COUNTER_##name_; \ MPIR_T_PVAR_COUNTER_ARRAY_INIT_impl(name_); \ count_ = sizeof(PVAR_COUNTER_##name_)/sizeof(mpit_pvar_##name_[0]); \ MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_COUNTER, dtype_, #name_, \ addr_, count_, MPI_T_ENUM_NULL, verb_, bind_, flags_, NULL, NULL, cat_, desc_); \ } while (0) /* Dynamic counter array is already provided by MPIR_T_PVAR_COUNTER_REGISTER_DYNAMIC */ /* MPI_T_PVAR_CLASS_AGGREGATE (continuous or not) */ /* Interfaces through pointer or name */ #define MPIR_T_PVAR_AGGREGATE_INIT_VAR_impl(ptr_) \ do { *(ptr_) = 0; } while (0) /* _AGGREGATE_SET is intentionally not provided as for counters */ #define MPIR_T_PVAR_AGGREGATE_GET_VAR_impl(ptr_) \ (*(ptr_)) #define MPIR_T_PVAR_AGGREGATE_INC_VAR_impl(ptr_, inc_) \ do { *(ptr_) += (inc_); } while (0) #define MPIR_T_PVAR_AGGREGATE_INIT_impl(name_) \ MPIR_T_PVAR_AGGREGATE_INIT_VAR_impl(&PVAR_AGGREGATE_##name_) #define MPIR_T_PVAR_AGGREGATE_GET_impl(name_) \ MPIR_T_PVAR_AGGREGATE_GET_VAR_impl(&PVAR_AGGREGATE_##name_) #define MPIR_T_PVAR_AGGREGATE_INC_impl(name_, inc_) \ MPIR_T_PVAR_AGGREGATE_INC_VAR_impl(&PVAR_AGGREGATE_##name_, inc_) /* Registration AND initialization to zero for static aggregate */ #define MPIR_T_PVAR_AGGREGATE_REGISTER_STATIC_impl(dtype_, name_, \ verb_, bind_, flags_, cat_, desc_) \ do { \ void *addr; \ /* Allowable datatypes only */ \ MPIR_Assert((dtype_) == MPI_UNSIGNED || (dtype_) == MPI_UNSIGNED_LONG || \ (dtype_) == MPI_UNSIGNED_LONG_LONG || (dtype_) == MPI_DOUBLE); \ /* Double check if dtype_ and name_ match*/ \ MPIR_Assert(sizeof(PVAR_AGGREGATE_##name_) == MPID_Datatype_get_basic_size(dtype_)); \ PVAR_AGGREGATE_##name_ = 0; \ addr_ = &PVAR_AGGREGATE_##name_; \ MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_AGGREGATE, dtype_, #name_, \ addr_, 1, MPI_T_ENUM_NULL, verb_, bind_, flags_, NULL, NULL, cat_, desc_); \ } while (0) /* Registration for dynamic pvar w/ or w/o callback. Init is left to users */ #define MPIR_T_PVAR_AGGREGATE_REGISTER_DYNAMIC_impl(dtype_, name_, \ addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \ do { \ /* Allowable datatypes */ \ MPIR_Assert((dtype_) == MPI_UNSIGNED || (dtype_) == MPI_UNSIGNED_LONG || \ (dtype_) == MPI_UNSIGNED_LONG_LONG || (dtype_) == MPI_DOUBLE); \ MPIR_Assert((addr_) != NULL || (get_value_) != NULL); \ MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_AGGREGATE, dtype_, #name_, \ addr_, count_, MPI_T_ENUM_NULL, verb_, bind_, flags_, get_value_, \ get_count_, cat_, desc_); \ } while (0) /* MPI_T_PVAR_CLASS_TIMER (continuous or not) */ /* Interfaces through pointer or name */ #define MPIR_T_PVAR_TIMER_INIT_VAR_impl(ptr_) \ do { \ /* FIXME: need a generic approach to init a timer */ \ memset(&((ptr_)->total), 0, sizeof(MPID_Time_t)); \ } while (0) #define MPIR_T_PVAR_TIMER_GET_VAR_impl(ptr_, buf) \ do { \ MPID_Wtime_todouble(&((ptr_)->total), buf); \ } while (0) #define MPIR_T_PVAR_TIMER_START_VAR_impl(ptr_) \ do { \ MPID_Wtime(&((ptr_)->curstart)); \ (ptr_)->count++; \ } while (0) #define MPIR_T_PVAR_TIMER_END_VAR_impl(ptr_) \ do { \ MPID_Time_t tmp; \ MPID_Wtime(&tmp); \ MPID_Wtime_acc(&((ptr_)->curstart), &tmp, &((ptr_)->total)); \ } while (0) #define MPIR_T_PVAR_TIMER_INIT_impl(name_) \ MPIR_T_PVAR_TIMER_INIT_VAR_impl(&PVAR_TIMER_##name_) #define MPIR_T_PVAR_TIMER_GET_impl(name_, buf_) \ MPIR_T_PVAR_TIMER_GET_VAR_impl(&PVAR_TIMER_##name_, buf_) #define MPIR_T_PVAR_TIMER_START_impl(name_) \ MPIR_T_PVAR_TIMER_START_VAR_impl(&PVAR_TIMER_##name_) #define MPIR_T_PVAR_TIMER_END_impl(name_) \ MPIR_T_PVAR_TIMER_END_VAR_impl(&PVAR_TIMER_##name_) #define MPIR_T_PVAR_TIMER_ADDR_impl(name_) \ (&PVAR_TIMER_##name_) /* Customized get_value() for MPIR_T_pvar_timer_t */ static inline void get_timer_time_in_double(MPIR_T_pvar_timer_t *timer, void *obj_handle, int count, double *buf) { int i; for (i = 0; i < count; i++) MPID_Wtime_todouble(&(timer[i].total), &buf[i]); } /* Registration for static storage */ #define MPIR_T_PVAR_TIMER_REGISTER_STATIC_impl(dtype_, name_, \ verb_, bind_, flags_, cat_, desc_) \ do { \ void *addr_; \ void *count_addr_; \ /* Allowable datatypes only */ \ MPIR_Assert((dtype_) == MPI_DOUBLE); \ MPIR_T_PVAR_TIMER_INIT_impl(name_); \ addr_ = &PVAR_TIMER_##name_; \ count_addr_ = &(PVAR_TIMER_##name_.count); \ MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_TIMER, dtype_, #name_, \ addr_, 1, MPI_T_ENUM_NULL, verb_, bind_, flags_, \ (MPIR_T_pvar_get_value_cb *)&get_timer_time_in_double, NULL, cat_, desc_); \ MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_COUNTER, MPI_UNSIGNED_LONG_LONG, #name_, \ count_addr_, 1, MPI_T_ENUM_NULL, verb_, bind_, flags_, \ NULL, NULL, cat_, desc_); \ } while (0) /* MPI_T_PVAR_CLASS_HIGHWATERMARK (continuous or not) */ /* Interfaces through pointer or name. * In contrast to previous pvar classes, for each type we create a set * of interfaces. That is because we have a pointer and a union in the * struct. We need to know types to (de)reference them. */ #define MPIR_T_PVAR_UINT_HIGHWATERMARK_INIT_VAR_impl(ptr_, val_) \ do { \ (ptr_)->datatype = MPI_UNSIGNED; \ (ptr_)->current.u = (val_); \ (ptr_)->first_started = 0; \ (ptr_)->first_used = 0; \ (ptr_)->hlist = NULL; \ } while (0) #define MPIR_T_PVAR_ULONG_HIGHWATERMARK_INIT_VAR_impl(ptr_, val_) \ do { \ (ptr_)->datatype = MPI_UNSIGNED_LONG; \ (ptr_)->current.ul = (val_); \ (ptr_)->first_started = 0; \ (ptr_)->first_used = 0; \ (ptr_)->hlist = NULL; \ } while (0) #define MPIR_T_PVAR_ULONG2_HIGHWATERMARK_INIT_VAR_impl(ptr_, val_) \ do { \ (ptr_)->datatype = MPI_UNSIGNED_LONG_LONG; \ (ptr_)->current.ull = (val_); \ (ptr_)->first_started = 0; \ (ptr_)->first_used = 0; \ (ptr_)->hlist = NULL; \ } while (0) #define MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_INIT_VAR_impl(ptr_, val_) \ do { \ (ptr_)->datatype = MPI_DOUBLE; \ (ptr_)->current.f = (val_); \ (ptr_)->first_started = 0; \ (ptr_)->first_used = 0; \ (ptr_)->hlist = NULL; \ } while (0) #define MPIR_T_PVAR_UINT_HIGHWATERMARK_UPDATE_VAR_impl(ptr_, val_) \ do { \ MPIR_T_pvar_handle_t *head; \ (ptr_)->current.u = (val_); \ if ((ptr_)->first_used && (ptr_)->first_started) { \ if ((val_) > (ptr_)->watermark.u) \ (ptr_)->watermark.u = (val_); \ } \ head = (ptr_)->hlist; \ while (head != NULL) { \ if (MPIR_T_pvar_is_started(head) && (val_) > head->watermark.u) { \ head->watermark.u = (val_); \ } \ head = head->next2; \ } \ } while (0) #define MPIR_T_PVAR_ULONG_HIGHWATERMARK_UPDATE_VAR_impl(ptr_, val_) \ do { \ MPIR_T_pvar_handle_t *head; \ (ptr_)->current.ul = (val_); \ if ((ptr_)->first_used && (ptr_)->first_started) { \ if ((val_) > (ptr_)->watermark.ul) \ (ptr_)->watermark.ul = (val_); \ } \ head = (ptr_)->hlist; \ while (head != NULL) { \ if (MPIR_T_pvar_is_started(head) && (val_) > head->watermark.ul) { \ head->watermark.ul = (val_); \ } \ head = head->next2; \ } \ } while (0) #define MPIR_T_PVAR_ULONG2_HIGHWATERMARK_UPDATE_VAR_impl(ptr_, val_) \ do { \ MPIR_T_pvar_handle_t *head; \ (ptr_)->current.ull = (val_); \ if ((ptr_)->first_used && (ptr_)->first_started) { \ if ((val_) > (ptr_)->watermark.ull) \ (ptr_)->watermark.ull = (val_); \ } \ head = (ptr_)->hlist; \ while (head != NULL) { \ if (MPIR_T_pvar_is_started(head) && (val_) > head->watermark.ull) { \ head->watermark.ull = (val_); \ } \ head = head->next2; \ } \ } while (0) #define MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_UPDATE_VAR_impl(ptr_, val_) \ do { \ MPIR_T_pvar_handle_t *head; \ (ptr_)->current.f = (val_); \ if ((ptr_)->first_used && (ptr_)->first_started) { \ if ((val_) > (ptr_)->watermark.f) \ (ptr_)->watermark.f = (val_); \ } \ head = (ptr_)->hlist; \ while (head != NULL) { \ if (MPIR_T_pvar_is_started(head) && (val_) > head->watermark.f) { \ head->watermark.f = (val_); \ } \ head = head->next2; \ } \ } while (0) #define MPIR_T_PVAR_UINT_HIGHWATERMARK_INIT_impl(name_, val_) \ MPIR_T_PVAR_UINT_HIGHWATERMARK_INIT_VAR_impl(&PVAR_HIGHWATERMARK_##name_, val_) #define MPIR_T_PVAR_ULONG_HIGHWATERMARK_INIT_impl(name_, val_) \ MPIR_T_PVAR_ULONG_HIGHWATERMARK_INIT_VAR_impl(&PVAR_HIGHWATERMARK_##name_, val_) #define MPIR_T_PVAR_ULONG2_HIGHWATERMARK_INIT_impl(name_, val_) \ MPIR_T_PVAR_ULONG2_HIGHWATERMARK_INIT_VAR_impl(&PVAR_HIGHWATERMARK_##name_, val_) #define MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_INIT_impl(name_, val_) \ MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_INIT_VAR_impl(&PVAR_HIGHWATERMARK_##name_, val_) #define MPIR_T_PVAR_UINT_HIGHWATERMARK_UPDATE_impl(name_, val_) \ MPIR_T_PVAR_UINT_HIGHWATERMARK_UPDATE_VAR_impl(&PVAR_HIGHWATERMARK_##name_, val_) #define MPIR_T_PVAR_ULONG_HIGHWATERMARK_UPDATE_impl(name_, val_) \ MPIR_T_PVAR_ULONG_HIGHWATERMARK_UPDATE_VAR_impl(&PVAR_HIGHWATERMARK_##name_, val_) #define MPIR_T_PVAR_ULONG2_HIGHWATERMARK_UPDATE_impl(name_, val_) \ MPIR_T_PVAR_ULONG2_HIGHWATERMARK_UPDATE_VAR_impl(&PVAR_HIGHWATERMARK_##name_, val_) #define MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_UPDATE_impl(name_, val_) \ MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_UPDATE_VAR_impl(&PVAR_HIGHWATERMARK_##name_, val_) /* Registration AND initialization for static pvar */ #define MPIR_T_PVAR_HIGHWATERMARK_REGISTER_STATIC_impl(dtype_, name_, \ initval_, verb_, bind_, flags_, cat_, desc_) \ do { \ void *addr_; \ /* Allowable datatypes only */ \ MPIR_Assert((dtype_) == MPI_UNSIGNED || (dtype_) == MPI_UNSIGNED_LONG || \ (dtype_) == MPI_UNSIGNED_LONG_LONG || (dtype_) == MPI_DOUBLE); \ switch (dtype_) { \ case MPI_UNSIGNED: \ MPIR_T_PVAR_UINT_HIGHWATERMARK_INIT_impl(name_, initval_); break; \ case MPI_UNSIGNED_LONG: \ MPIR_T_PVAR_ULONG_HIGHWATERMARK_INIT_impl(name_, initval_); break; \ case MPI_UNSIGNED_LONG_LONG: \ MPIR_T_PVAR_ULONG2_HIGHWATERMARK_INIT_impl(name_, initval_); break; \ case MPI_DOUBLE: \ MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_INIT_impl(name_, initval_); break; \ default: \ break; \ }; \ addr_ = &PVAR_HIGHWATERMARK_##name_; \ MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_HIGHWATERMARK, dtype_, #name_, \ addr_, 1, MPI_T_ENUM_NULL, verb_, bind_, flags_, NULL, NULL, cat_, desc_); \ } while (0) /* Registration for dynamic pvar w/ or w/o callback. Init is left to users */ #define MPIR_T_PVAR_HIGHWATERMARK_REGISTER_DYNAMIC_impl(dtype_, name_, \ addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \ do { \ /* Allowable datatypes */ \ MPIR_Assert((dtype_) == MPI_UNSIGNED || (dtype_) == MPI_UNSIGNED_LONG || \ (dtype_) == MPI_UNSIGNED_LONG_LONG || (dtype_) == MPI_DOUBLE); \ MPIR_Assert((addr_) != NULL || (get_value_) != NULL); \ MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_HIGHWATERMARK, dtype_, #name_, \ addr_, count_, MPI_T_ENUM_NULL, verb_, bind_, flags_, get_value_, \ get_count_, cat_, desc_); \ } while (0) /* MPI_T_PVAR_CLASS_LOWWATERMARK (continuous or not) */ #define MPIR_T_PVAR_UINT_LOWWATERMARK_INIT_VAR_impl(ptr_, val_) \ do { \ (ptr_)->datatype = MPI_UNSIGNED; \ (ptr_)->current.u = (val_); \ (ptr_)->first_started = 0; \ (ptr_)->first_used = 0; \ (ptr_)->hlist = NULL; \ } while (0) #define MPIR_T_PVAR_ULONG_LOWWATERMARK_INIT_VAR_impl(ptr_, val_) \ do { \ (ptr_)->datatype = MPI_UNSIGNED_LONG; \ (ptr_)->current.ul = (val_); \ (ptr_)->first_started = 0; \ (ptr_)->first_used = 0; \ (ptr_)->hlist = NULL; \ } while (0) #define MPIR_T_PVAR_ULONG2_LOWWATERMARK_INIT_VAR_impl(ptr_, val_) \ do { \ (ptr_)->datatype = MPI_UNSIGNED_LONG_LONG; \ (ptr_)->current.ull = (val_); \ (ptr_)->first_started = 0; \ (ptr_)->first_used = 0; \ (ptr_)->hlist = NULL; \ } while (0) #define MPIR_T_PVAR_DOUBLE_LOWWATERMARK_INIT_VAR_impl(ptr_, val_) \ do { \ (ptr_)->datatype = MPI_DOUBLE; \ (ptr_)->current.f = (val_); \ (ptr_)->first_started = 0; \ (ptr_)->first_used = 0; \ (ptr_)->hlist = NULL; \ } while (0) #define MPIR_T_PVAR_UINT_LOWWATERMARK_UPDATE_VAR_impl(ptr_, val_) \ do { \ MPIR_T_pvar_handle_t *head; \ (ptr_)->current.u = (val_); \ /* Update values in all handles */ \ if ((ptr_)->first_used && (ptr_)->first_started) { \ if ((val_) < (ptr_)->watermark.u) \ (ptr_)->watermark.u = (val_); \ } \ head = (ptr_)->hlist; \ while (head != NULL) { \ if (MPIR_T_pvar_is_started(head) && (val_) < head->watermark.u) { \ head->watermark.u = (val_); \ } \ head = head->next2; \ } \ } while (0) #define MPIR_T_PVAR_ULONG_LOWWATERMARK_UPDATE_VAR_impl(ptr_, val_) \ do { \ MPIR_T_pvar_handle_t *head; \ (ptr_)->current.ul = (val_); \ if ((ptr_)->first_used && (ptr_)->first_started) { \ if ((val_) < (ptr_)->watermark.ul) \ (ptr_)->watermark.ul = (val_); \ } \ head = (ptr_)->hlist; \ while (head != NULL) { \ if (MPIR_T_pvar_is_started(head) && (val_) < head->watermark.ul) { \ head->watermark.ul = (val_); \ } \ head = head->next2; \ } \ } while (0) #define MPIR_T_PVAR_ULONG2_LOWWATERMARK_UPDATE_VAR_impl(ptr_, val_) \ do { \ MPIR_T_pvar_handle_t *head; \ (ptr_)->current.ull = (val_); \ if ((ptr_)->first_used && (ptr_)->first_started) { \ if ((val_) < (ptr_)->watermark.ull) \ (ptr_)->watermark.ull = (val_); \ } \ head = (ptr_)->hlist; \ while (head != NULL) { \ if (MPIR_T_pvar_is_started(head) && (val_) < head->watermark.ull) { \ head->watermark.ull = (val_); \ } \ head = head->next2; \ } \ } while (0) #define MPIR_T_PVAR_DOUBLE_LOWWATERMARK_UPDATE_VAR_impl(ptr_, val_) \ do { \ MPIR_T_pvar_handle_t *head; \ (ptr_)->current.f = (val_); \ if ((ptr_)->first_used && (ptr_)->first_started) { \ if ((val_) < (ptr_)->watermark.f) \ (ptr_)->watermark.f = (val_); \ } \ head = (ptr_)->hlist; \ while (head != NULL) { \ if (MPIR_T_pvar_is_started(head) && (val_) < head->watermark.f) { \ head->watermark.f = (val_); \ } \ head = head->next2; \ } \ } while (0) #define MPIR_T_PVAR_UINT_LOWWATERMARK_INIT_impl(name_, val_) \ MPIR_T_PVAR_UINT_LOWWATERMARK_INIT_VAR_impl(&PVAR_LOWWATERMARK_##name_, val_) #define MPIR_T_PVAR_ULONG_LOWWATERMARK_INIT_impl(name_, val_) \ MPIR_T_PVAR_ULONG_LOWWATERMARK_INIT_VAR_impl(&PVAR_LOWWATERMARK_##name_, val_) #define MPIR_T_PVAR_ULONG2_LOWWATERMARK_INIT_impl(name_, val_) \ MPIR_T_PVAR_ULONG2_LOWWATERMARK_INIT_VAR_impl(&PVAR_LOWWATERMARK_##name_, val_) #define MPIR_T_PVAR_DOUBLE_LOWWATERMARK_INIT_impl(name_, val_) \ MPIR_T_PVAR_DOUBLE_LOWWATERMARK_INIT_VAR_impl(&PVAR_LOWWATERMARK_##name_, val_) #define MPIR_T_PVAR_UINT_LOWWATERMARK_UPDATE_impl(name_, val_) \ MPIR_T_PVAR_UINT_LOWWATERMARK_UPDATE_VAR_impl(&PVAR_LOWWATERMARK_##name_, val_) #define MPIR_T_PVAR_ULONG_LOWWATERMARK_UPDATE_impl(name_, val_) \ MPIR_T_PVAR_ULONG_LOWWATERMARK_UPDATE_VAR_impl(&PVAR_LOWWATERMARK_##name_, val_) #define MPIR_T_PVAR_ULONG2_LOWWATERMARK_UPDATE_impl(name_, val_) \ MPIR_T_PVAR_ULONG2_LOWWATERMARK_UPDATE_VAR_impl(&PVAR_LOWWATERMARK_##name_, val_) #define MPIR_T_PVAR_DOUBLE_LOWWATERMARK_UPDATE_impl(name_, val_) \ MPIR_T_PVAR_DOUBLE_LOWWATERMARK_UPDATE_VAR_impl(&PVAR_LOWWATERMARK_##name_, val_) /* Registration AND initialization for static pvar */ #define MPIR_T_PVAR_LOWWATERMARK_REGISTER_STATIC_impl(dtype_, name_, \ initval_, verb_, bind_, flags_, cat_, desc_) \ do { \ void *addr_; \ /* Allowable datatypes only */ \ MPIR_Assert((dtype_) == MPI_UNSIGNED || (dtype_) == MPI_UNSIGNED_LONG || \ (dtype_) == MPI_UNSIGNED_LONG_LONG || (dtype_) == MPI_DOUBLE); \ switch (dtype_) { \ case MPI_UNSIGNED: \ MPIR_T_PVAR_UINT_LOWWATERMARK_INIT_impl(name_, initval_); break; \ case MPI_UNSIGNED_LONG: \ MPIR_T_PVAR_ULONG_LOWWATERMARK_INIT_impl(name_, initval_); break; \ case MPI_UNSIGNED_LONG_LONG: \ MPIR_T_PVAR_ULONG2_LOWWATERMARK_INIT_impl(name_, initval_); break; \ case MPI_DOUBLE: \ MPIR_T_PVAR_DOUBLE_LOWWATERMARK_INIT_impl(name_, initval_); break; \ default: \ break; \ }; \ addr_ = &PVAR_LOWWATERMARK_##name_; \ MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_LOWWATERMARK, dtype_, #name_, \ addr_, 1, MPI_T_ENUM_NULL, verb_, bind_, flags_, NULL, NULL, cat_, desc_); \ } while (0) /* Registration for dynamic pvar w/ or w/o callback. Init is left to users */ #define MPIR_T_PVAR_LOWWATERMARK_REGISTER_DYNAMIC_impl(dtype_, name_, \ addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \ do { \ /* Allowable datatypes */ \ MPIR_Assert((dtype_) == MPI_UNSIGNED || (dtype_) == MPI_UNSIGNED_LONG || \ (dtype_) == MPI_UNSIGNED_LONG_LONG || (dtype_) == MPI_DOUBLE); \ MPIR_Assert((addr_) != NULL || (get_value_) != NULL); \ MPIR_T_PVAR_REGISTER_impl(MPI_T_PVAR_CLASS_LOWWATERMARK, dtype_, #name_, \ addr_, count_, MPI_T_ENUM_NULL, verb_, bind_, flags_, get_value_, \ get_count_, cat_, desc_); \ } while (0) /* Unregister a pvar by its index */ #define MPIR_T_PVAR_UNREGISTER(idx_) \ do { \ if (pvar_table != NULL) { \ pvar_table_entry_t *pvar = \ (pvar_table_entry_t *)utarray_eltptr(pvar_table, idx_); \ if (pvar != NULL) { \ pvar->active = FALSE; \ /* Do not do MPL_free(pvar->info), since it may be re-activated */ \ } \ } \ } while (0) static inline int MPIR_T_pvar_is_readonly(MPIR_T_pvar_handle_t *handle) { return handle->flags & MPIR_T_PVAR_FLAG_READONLY; } static inline int MPIR_T_pvar_is_continuous(MPIR_T_pvar_handle_t *handle) { return handle->flags & MPIR_T_PVAR_FLAG_CONTINUOUS; } static inline int MPIR_T_pvar_is_atomic(MPIR_T_pvar_handle_t *handle) { return handle->flags & MPIR_T_PVAR_FLAG_ATOMIC; } static inline int MPIR_T_pvar_is_sum(MPIR_T_pvar_handle_t *handle) { return handle->flags & MPIR_T_PVAR_FLAG_SUM; } static inline int MPIR_T_pvar_is_watermark(MPIR_T_pvar_handle_t *handle) { return handle->flags & MPIR_T_PVAR_FLAG_WATERMARK; } static inline int MPIR_T_pvar_is_started(MPIR_T_pvar_handle_t *handle) { return handle->flags & MPIR_T_PVAR_FLAG_STARTED; } static inline void MPIR_T_pvar_set_started(MPIR_T_pvar_handle_t *handle) { handle->flags |= (MPIR_T_PVAR_FLAG_STARTED | MPIR_T_PVAR_FLAG_ONCESTARTED); } static inline void MPIR_T_pvar_unset_started(MPIR_T_pvar_handle_t *handle) { handle->flags &= ~MPIR_T_PVAR_FLAG_STARTED; } static inline int MPIR_T_pvar_is_oncestarted(MPIR_T_pvar_handle_t *handle) { return handle->flags & MPIR_T_PVAR_FLAG_ONCESTARTED; } static inline void MPIR_T_pvar_unset_oncestarted(MPIR_T_pvar_handle_t *handle) { handle->flags &= ~MPIR_T_PVAR_FLAG_ONCESTARTED; } static inline int MPIR_T_pvar_is_first(MPIR_T_pvar_handle_t *handle) { return handle->flags & MPIR_T_PVAR_FLAG_FIRST; } static inline int MPIR_T_pvar_set_first(MPIR_T_pvar_handle_t *handle) { return handle->flags |= MPIR_T_PVAR_FLAG_FIRST; } static inline int MPIR_T_pvar_unset_first(MPIR_T_pvar_handle_t *handle) { return handle->flags &= ~MPIR_T_PVAR_FLAG_FIRST; } /* A counter that keeps track of the relative balance of calls to * MPI_T_init_thread and MPI_T_finalize */ extern int MPIR_T_init_balance; static inline int MPIR_T_is_initialized() { return MPIR_T_init_balance > 0; } /* A special strncpy to return strings in behavior defined by MPI_T */ extern void MPIR_T_strncpy(char *dst, const char *src, int *len); /* Stuffs to support multithreaded MPI_T */ extern int MPIR_T_is_threaded; #define MPIR_T_THREAD_CHECK_BEGIN if (MPIR_T_is_threaded) { #define MPIR_T_THREAD_CHECK_END } #ifdef MPICH_IS_THREADED extern MPID_Thread_mutex_t mpi_t_mutex; #define MPIR_T_THREAD_CS_INIT() \ do { \ int err_; \ MPIR_T_THREAD_CHECK_BEGIN \ MPID_Thread_mutex_create(&mpi_t_mutex, &err_); \ MPIR_Assert(err_ == 0); \ MPIR_T_THREAD_CHECK_END \ } while (0) #define MPIR_T_THREAD_CS_FINALIZE() \ do { \ int err_; \ MPIR_T_THREAD_CHECK_BEGIN \ MPID_Thread_mutex_destroy(&mpi_t_mutex, &err_); \ MPIR_Assert(err_ == 0); \ MPIR_T_THREAD_CHECK_END \ } while (0) #define MPIR_T_THREAD_CS_ENTER() \ do { \ int err; \ MPIR_T_THREAD_CHECK_BEGIN \ MPID_Thread_mutex_lock(&mpi_t_mutex,&err); \ MPIR_T_THREAD_CHECK_END \ } while (0) #define MPIR_T_THREAD_CS_EXIT() \ do { \ int err; \ MPIR_T_THREAD_CHECK_BEGIN \ MPID_Thread_mutex_unlock(&mpi_t_mutex,&err); \ MPIR_T_THREAD_CHECK_END \ } while (0) #else /* !MPICH_IS_THREADED */ # 1210 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" #define MPIR_T_THREAD_CS_INIT() do { /* nothing */ } while (0) #define MPIR_T_THREAD_CS_FINALIZE() do { /* nothing */ } while (0) #define MPIR_T_THREAD_CS_ENTER() do { /* nothing */ } while (0) #define MPIR_T_THREAD_CS_EXIT() do { /* nothing */ } while (0) #endif # 1215 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" /* Init and finalize routines */ extern void MPIR_T_env_init(void); extern void MPIR_T_env_finalize(void); #endif # 1221 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpitimpl.h" # 18 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_cvars.h" 2 /* Initializes cvar values from the environment */ int MPIR_T_cvar_init(void); int MPIR_T_cvar_finalize(void); /* Extern declarations for each cvar * (definitions in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/util/cvar/mpir_cvars.c) */ /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/allgather.c */ extern int MPIR_CVAR_ALLGATHER_SHORT_MSG_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/allgather.c */ extern int MPIR_CVAR_ALLGATHER_LONG_MSG_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/allgatherv.c */ extern int MPIR_CVAR_ALLGATHERV_PIPELINE_MSG_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/allreduce.c */ extern int MPIR_CVAR_ALLREDUCE_SHORT_MSG_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/allreduce.c */ extern int MPIR_CVAR_ENABLE_SMP_COLLECTIVES; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/allreduce.c */ extern int MPIR_CVAR_ENABLE_SMP_ALLREDUCE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/allreduce.c */ extern int MPIR_CVAR_MAX_SMP_ALLREDUCE_MSG_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/alltoall.c */ extern int MPIR_CVAR_ALLTOALL_SHORT_MSG_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/alltoall.c */ extern int MPIR_CVAR_ALLTOALL_MEDIUM_MSG_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/alltoall.c */ extern int MPIR_CVAR_ALLTOALL_THROTTLE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/barrier.c */ extern int MPIR_CVAR_ENABLE_SMP_BARRIER; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/bcast.c */ extern int MPIR_CVAR_BCAST_MIN_PROCS; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/bcast.c */ extern int MPIR_CVAR_BCAST_SHORT_MSG_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/bcast.c */ extern int MPIR_CVAR_BCAST_LONG_MSG_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/bcast.c */ extern int MPIR_CVAR_ENABLE_SMP_BCAST; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/bcast.c */ extern int MPIR_CVAR_MAX_SMP_BCAST_MSG_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/gather.c */ extern int MPIR_CVAR_GATHER_VSMALL_MSG_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/gather.c */ extern int MPIR_CVAR_GATHER_INTER_SHORT_MSG_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/gatherv.c */ extern int MPIR_CVAR_GATHERV_INTER_SSEND_MIN_PROCS; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/red_scat.c */ extern int MPIR_CVAR_REDSCAT_COMMUTATIVE_LONG_MSG_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/reduce.c */ extern int MPIR_CVAR_REDUCE_SHORT_MSG_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/reduce.c */ extern int MPIR_CVAR_ENABLE_SMP_REDUCE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/reduce.c */ extern int MPIR_CVAR_MAX_SMP_REDUCE_MSG_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/coll/scatter.c */ extern int MPIR_CVAR_SCATTER_INTER_SHORT_MSG_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/comm/comm_split.c */ extern int MPIR_CVAR_COMM_SPLIT_USE_QSORT; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/comm/contextid.c */ extern int MPIR_CVAR_CTXID_EAGER_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/debugger/dbginit.c */ extern int MPIR_CVAR_PROCTABLE_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/debugger/dbginit.c */ extern int MPIR_CVAR_PROCTABLE_PRINT; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/errhan/errutil.c */ extern int MPIR_CVAR_PRINT_ERROR_STACK; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/errhan/errutil.c */ extern int MPIR_CVAR_CHOP_ERROR_STACK; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/init/abort.c */ extern int MPIR_CVAR_SUPPRESS_ABORT_MESSAGE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/init/finalize.c */ extern int MPIR_CVAR_MEMDUMP; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/init/init.c */ extern int MPIR_CVAR_ASYNC_PROGRESS; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/init/init.c */ extern char * MPIR_CVAR_DEFAULT_THREAD_LEVEL; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/init/initthread.c */ extern int MPIR_CVAR_DEBUG_HOLD; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/init/initthread.c */ extern int MPIR_CVAR_ERROR_CHECKING; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpi/topo/dims_create.c */ extern int MPIR_CVAR_DIMS_VERBOSE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/nameserv/file/file_nameserv.c */ extern char * MPIR_CVAR_NAMESERV_FILE_PUBDIR; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/util/mem/handlemem.c */ extern int MPIR_CVAR_ABORT_ON_LEAKED_HANDLES; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/util/nodemap/build_nodemap.h */ extern int MPIR_CVAR_NOLOCAL; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/util/nodemap/build_nodemap.h */ extern int MPIR_CVAR_ODD_EVEN_CLIQUES; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/include/mpir_err.h */ extern int MPIR_CVAR_COLL_ALIAS_CHECK; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/channels/nemesis/include/mpid_nem_inline.h */ extern int MPIR_CVAR_POLLS_BEFORE_YIELD; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_init.c */ extern int MPIR_CVAR_NEMESIS_MXM_BULK_CONNECT; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_init.c */ extern int MPIR_CVAR_NEMESIS_MXM_BULK_DISCONNECT; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/channels/nemesis/netmod/mxm/mxm_init.c */ extern int MPIR_CVAR_NEMESIS_MXM_HUGEPAGE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c */ extern char * MPIR_CVAR_OFI_USE_PROVIDER; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/channels/nemesis/netmod/ofi/ofi_init.c */ extern int MPIR_CVAR_OFI_DUMP_PROVIDERS; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c */ extern char * MPIR_CVAR_CH3_INTERFACE_HOSTNAME; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c */ extern MPIR_T_cvar_range_value_t MPIR_CVAR_CH3_PORT_RANGE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c */ extern char * MPIR_CVAR_NEMESIS_TCP_NETWORK_IFACE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/channels/nemesis/netmod/tcp/tcp_init.c */ extern int MPIR_CVAR_NEMESIS_TCP_HOST_LOOKUP_RETRIES; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/channels/nemesis/src/mpid_nem_ckpt.c */ extern int MPIR_CVAR_NEMESIS_ENABLE_CKPOINT; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c */ extern int MPIR_CVAR_NEMESIS_SHM_EAGER_MAX_SZ; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/channels/nemesis/src/mpid_nem_init.c */ extern int MPIR_CVAR_NEMESIS_SHM_READY_EAGER_MAX_SZ; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt.c */ extern int MPIR_CVAR_ENABLE_FT; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/channels/nemesis/src/mpid_nem_lmt_dma.c */ extern int MPIR_CVAR_NEMESIS_LMT_DMA_THRESHOLD; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/channels/nemesis/src/mpid_nem_network.c */ extern char * MPIR_CVAR_NEMESIS_NETMOD; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/src/ch3u_comm.c */ extern int MPIR_CVAR_CH3_ENABLE_HCOLL; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/src/ch3u_port.c */ extern int MPIR_CVAR_CH3_COMM_CONNECT_TIMEOUT; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/src/ch3u_rma_ops.c */ extern int MPIR_CVAR_CH3_RMA_OP_PIGGYBACK_LOCK_DATA_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/src/ch3u_rma_progress.c */ extern int MPIR_CVAR_CH3_RMA_ACTIVE_REQ_THRESHOLD; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/src/ch3u_rma_progress.c */ extern int MPIR_CVAR_CH3_RMA_POKE_PROGRESS_REQ_THRESHOLD; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/src/ch3u_rma_sync.c */ extern int MPIR_CVAR_CH3_RMA_SCALABLE_FENCE_PROCESS_NUM; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/src/ch3u_rma_sync.c */ extern int MPIR_CVAR_CH3_RMA_DELAY_ISSUING_FOR_PIGGYBACKING; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/src/mpid_rma.c */ extern int MPIR_CVAR_CH3_RMA_SLOTS_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/src/mpid_rma.c */ extern int MPIR_CVAR_CH3_RMA_TARGET_LOCK_DATA_BYTES; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/src/mpid_vc.c */ extern int MPIR_CVAR_CH3_EAGER_MAX_MSG_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/src/mpidi_rma.c */ extern int MPIR_CVAR_CH3_RMA_OP_WIN_POOL_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/src/mpidi_rma.c */ extern int MPIR_CVAR_CH3_RMA_OP_GLOBAL_POOL_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/src/mpidi_rma.c */ extern int MPIR_CVAR_CH3_RMA_TARGET_WIN_POOL_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/src/mpidi_rma.c */ extern int MPIR_CVAR_CH3_RMA_TARGET_GLOBAL_POOL_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch3/src/mpidi_rma.c */ extern int MPIR_CVAR_CH3_RMA_TARGET_LOCK_ENTRY_WIN_POOL_SIZE; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch4/src/ch4_init.h */ extern char * MPIR_CVAR_CH4_NETMOD; /* declared in /home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/maint/../src/mpid/ch4/src/ch4_init.h */ extern char * MPIR_CVAR_CH4_SHM; /* TODO: this should be defined elsewhere */ #define MPIR_CVAR_assert MPIR_Assert /* Arbitrary, simplifies interaction with external interfaces like MPI_T_ */ #define MPIR_CVAR_MAX_STRLEN (384) #endif /* MPIR_CVARS_H_INCLUDED */ # 184 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_cvars.h" # 226 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_misc_post.h" #endif /* expanded by -frewrite-includes */ # 226 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_misc_post.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPIR_MISC_POST_H_INCLUDED #define MPIR_MISC_POST_H_INCLUDED /* Pull the error status out of the tag space and put it into an errflag. */ #undef FUNCNAME #define FUNCNAME MPIR_process_status #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline void MPIR_Process_status(MPI_Status *status, MPIR_Errflag_t *errflag) { if (MPI_PROC_NULL != status->MPI_SOURCE && (MPIX_ERR_REVOKED == MPIR_ERR_GET_CLASS(status->MPI_ERROR) || MPIX_ERR_PROC_FAILED == MPIR_ERR_GET_CLASS(status->MPI_ERROR) || MPIR_TAG_CHECK_ERROR_BIT(status->MPI_TAG)) && !*errflag) { /* If the receive was completed within the MPID_Recv, handle the * errflag here. */ if (MPIR_TAG_CHECK_PROC_FAILURE_BIT(status->MPI_TAG) || MPIX_ERR_PROC_FAILED == MPIR_ERR_GET_CLASS(status->MPI_ERROR)) { *errflag = MPIR_ERR_PROC_FAILED; MPIR_TAG_CLEAR_ERROR_BITS(status->MPI_TAG); } else { *errflag = MPIR_ERR_OTHER; MPIR_TAG_CLEAR_ERROR_BITS(status->MPI_TAG); } } } #endif /* MPIR_MISC_POST_H_INCLUDED */ # 36 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_misc_post.h" # 227 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpit.h" #endif /* expanded by -frewrite-includes */ # 227 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpit.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2013 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ /* Interfaces in this file are intended to be used by modules other than * MPIR_T. They use these interfaces to declare, create, operate and expose * enums, control variables, performance variables and categories. */ #ifndef MPIT_H_INCLUDED #define MPIT_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpitimpl.h" #endif /* expanded by -frewrite-includes */ # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpit.h" # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpit.h" /* Stamp to indicate a change in categories */ extern int cat_stamp; /* Tables to store enums, categories, cvars, pvars. * All tables need random access except enum_table. But we still implement * enum_table as an array, since it is handy and element size of * enum_table (i.e., sizeof(enum_item_t)) is small. */ extern UT_array *enum_table; extern UT_array *cat_table; extern UT_array *cvar_table; extern UT_array *pvar_table; /* Hash tables to quick locate category, cvar, pvar indices by their names */ extern name2index_hash_t *cat_hash; extern name2index_hash_t *cvar_hash; /* pvar names are unique per pvar class. So we use multiple hashs */ extern name2index_hash_t *pvar_hashs[MPIR_T_PVAR_CLASS_NUMBER]; /* See description in mpit.c */ extern void MPIR_T_enum_create(const char *name, MPI_T_enum *handle); extern void MPIR_T_enum_add_item(MPI_T_enum handle, const char *item_name, int item_value); extern int MPIR_T_cat_add_pvar(const char *cat_name, int pvar_index); extern int MPIR_T_cat_add_cvar(const char *cat_name, int cvar_index); extern int MPIR_T_cat_add_subcat(const char *parent_name, const char *child_name); extern int MPIR_T_cat_add_desc(const char *cat_name, const char *cat_desc); static inline cvar_table_entry_t * LOOKUP_CVAR_BY_NAME(const char* cvar_name) { unsigned cvar_idx; name2index_hash_t *hash_entry; MPL_HASH_FIND_STR(cvar_hash, cvar_name, hash_entry); MPIR_Assert(hash_entry != NULL); cvar_idx = hash_entry->idx; return (cvar_table_entry_t *)utarray_eltptr(cvar_table, cvar_idx); } /* Helper macros for getting the default value of a cvar */ #define MPIR_CVAR_GET_DEFAULT_INT(name_,out_ptr_) \ do { \ cvar_table_entry_t *cvar = LOOKUP_CVAR_BY_NAME(#name_); \ *(out_ptr_) = cvar->defaultval.d; \ } while (0) #define MPIR_CVAR_GET_DEFAULT_BOOLEAN(name_,out_ptr_) \ do { \ MPIR_CVAR_GET_DEFAULT_INT(name_,out_ptr_); \ } while (0) #define MPIR_CVAR_GET_DEFAULT_UNSIGNED(name_,out_ptr_) \ do { \ cvar_table_entry_t *cvar = LOOKUP_CVAR_BY_NAME(#name_); \ *(out_ptr_) = cvar->defaultval.u; \ } while (0) #define MPIR_CVAR_GET_DEFAULT_UNSIGNED_LONG(name_,out_ptr_) \ do { \ cvar_table_entry_t *cvar = LOOKUP_CVAR_BY_NAME(#name_); \ *(out_ptr_) = cvar->defaultval.ul; \ } while (0) #define MPIR_CVAR_GET_DEFAULT_UNSIGNED_LONG_LONG(name_,out_ptr_) \ do { \ cvar_table_entry_t *cvar = LOOKUP_CVAR_BY_NAME(#name_); \ *(out_ptr_) = cvar->defaultval.ull; \ } while (0) #define MPIR_CVAR_GET_DEFAULT_DOUBLE(name_,out_ptr_) \ do { \ cvar_table_entry_t *cvar = LOOKUP_CVAR_BY_NAME(#name_); \ *(out_ptr_) = cvar->defaultval.f; \ } while (0) #define MPIR_CVAR_GET_DEFAULT_STRING(name_,out_ptr_) \ do { \ cvar_table_entry_t *cvar = LOOKUP_CVAR_BY_NAME(#name_); \ *(out_ptr_) = cvar->defaultval.str; \ } while (0) #define MPIR_CVAR_GET_DEFAULT_RANGE(name_,out_ptr_) \ do { \ cvar_table_entry_t *cvar = LOOKUP_CVAR_BY_NAME(#name_); \ *(out_ptr_) = cvar->defaultval.range; \ } while (0) /* Register a static cvar. A static pvar has NO binding and its address * and count are known at registeration time. * Attention: name_ is a token not a string */ #define MPIR_T_CVAR_REGISTER_STATIC(dtype_, name_, addr_, count_, verb_, \ scope_, default_, cat_, desc_) \ do { \ MPIR_Assert(count_ > 0); \ MPIR_T_CVAR_REGISTER_impl(dtype_, #name_, addr_, count_, MPI_T_ENUM_NULL, \ verb_, MPI_T_BIND_NO_OBJECT, scope_, NULL, NULL, default_, cat_, desc_); \ } while (0) /* Register a dynamic cvar, which may have object binding and whose * address and count may be unknown at registeration time. It is * developers' duty to provide self-contained arguments. */ #define MPIR_T_CVAR_REGISTER_DYNAMIC(dtype_, name_, addr_, count_, etype_, \ verb_, bind_, scope_, get_addr_, get_count_, default_, cat_, desc_) \ do { \ MPIR_Assert(addr_ != NULL || get_addr_ != NULL); \ MPIR_Assert(count_ > 0 || get_count_ != NULL); \ MPIR_T_CVAR_REGISTER_impl(dtype_, #name_, addr_, count_, etype_, \ verb_, bind_, scope_, get_addr_, get_count_, default_, cat_, desc_); \ } while (0) /* stmt_ is executed only when ENABLE_PVAR_#MODULE is defined as 1 */ #define MPIR_T_PVAR_STMT(MODULE, stmt_) \ PVAR_GATED_ACTION(MODULE, stmt_) /* The following are interfaces for each pvar classe, * basically including delcaration, access and registeration. */ /* STATE */ #define MPIR_T_PVAR_STATE_SET_VAR(MODULE, ptr_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_STATE_SET_VAR_impl(ptr_, val_)) /* Not gated by MODULE, since it is supposed to be a rvalue */ #define MPIR_T_PVAR_STATE_GET_VAR(ptr_) \ MPIR_T_PVAR_STATE_GET_VAR_impl(ptr_) #define MPIR_T_PVAR_STATE_SET(MODULE, name_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_STATE_SET_impl(name_, val_)) #define MPIR_T_PVAR_STATE_GET(name_) \ MPIR_T_PVAR_STATE_GET_impl(name_) #define MPIR_T_PVAR_STATE_REGISTER_STATIC(MODULE, dtype_, name_, \ initval_, etype_, verb_, bind_, flags_, cat_, desc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_STATE_REGISTER_STATIC_impl(dtype_, name_, \ initval_, etype_, verb_, bind_, flags_, cat_, desc_)) #define MPIR_T_PVAR_STATE_REGISTER_DYNAMIC(MODULE, dtype_, name_, \ addr_, count_, etype_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_STATE_REGISTER_DYNAMIC_impl(dtype_, name_, \ addr_, count_, etype_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_)) /* LEVEL */ #define MPIR_T_PVAR_LEVEL_SET_VAR(MODULE, ptr_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LEVEL_SET_VAR_impl(ptr_, val_)) #define MPIR_T_PVAR_LEVEL_GET_VAR(ptr_) \ MPIR_T_PVAR_LEVEL_GET_VAR_impl(ptr_) #define MPIR_T_PVAR_LEVEL_INC_VAR(MODULE, ptr_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LEVEL_INC_VAR_impl(ptr_, val_)) #define MPIR_T_PVAR_LEVEL_DEC_VAR(MODULE, ptr_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LEVEL_DEC_VAR_impl(ptr_, val_)) #define MPIR_T_PVAR_LEVEL_SET(MODULE, name_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LEVEL_SET_impl(name_, val_)) #define MPIR_T_PVAR_LEVEL_GET(name_) \ MPIR_T_PVAR_LEVEL_GET_impl(name_) #define MPIR_T_PVAR_LEVEL_INC(MODULE, name_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LEVEL_INC_impl(name_, val_)) #define MPIR_T_PVAR_LEVEL_DEC(MODULE, name_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LEVEL_DEC_impl(name_, val_)) #define MPIR_T_PVAR_LEVEL_REGISTER_STATIC(MODULE, dtype_, name_, \ initval_, verb_, bind_, flags_, cat_, desc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LEVEL_REGISTER_STATIC_impl(dtype_, name_, \ initval_, verb_, bind_, flags_, cat_, desc_)) #define MPIR_T_PVAR_LEVEL_REGISTER_DYNAMIC(MODULE, dtype_, name_, \ addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LEVEL_REGISTER_DYNAMIC_impl(dtype_, name_, \ addr_, count_, verb_, bind_, flags_, get_value_, get_count, cat_, desc_)) /* SIZE */ #define MPIR_T_PVAR_SIZE_SET_VAR(MODULE, ptr_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_SIZE_SET_VAR_impl(ptr_, val_)) #define MPIR_T_PVAR_SIZE_GET_VAR(ptr_) \ MPIR_T_PVAR_SIZE_GET_VAR_impl(ptr_) #define MPIR_T_PVAR_SIZE_SET(MODULE, name_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_SIZE_SET_impl(name_, val_)) #define MPIR_T_PVAR_SIZE_GET(name_) \ MPIR_T_PVAR_SIZE_GET_impl(name_) #define MPIR_T_PVAR_SIZE_REGISTER_STATIC(MODULE, dtype_, name_, \ initval_, verb_, bind_, flags_, cat_, desc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_SIZE_REGISTER_STATIC_impl(dtype_, name_, \ initval_, verb_, bind_, flags_, cat_, desc_)) #define MPIR_T_PVAR_SIZE_REGISTER_DYNAMIC(MODULE, dtype_, name_, \ addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_SIZE_REGISTER_DYNAMIC_impl(dtype_, name_, \ addr_, count_, verb_, bind_, flags_, get_value_, get_count, cat_, desc_)) /* PERCENTAGE */ #define MPIR_T_PVAR_PERCENTAGE_SET_VAR(MODULE, ptr_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_PERCENTAGE_SET_VAR_impl(ptr_, val_)) #define MPIR_T_PVAR_PERCENTAGE_GET_VAR(MODULE, ptr_) \ MPIR_T_PVAR_PERCENTAGE_GET_VAR_impl(ptr_) #define MPIR_T_PVAR_PERCENTAGE_SET(MODULE, name_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_PERCENTAGE_SET_impl(name_, val_)) #define MPIR_T_PVAR_PERCENTAGE_GET(MODULE, name_) \ MPIR_T_PVAR_PERCENTAGE_GET_impl(name_) #define MPIR_T_PVAR_PERCENTAGE_REGISTER_STATIC(MODULE, dtype_, name_, \ initval_, verb_, bind_, flags_, cat_, desc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_PERCENTAGE_REGISTER_STATIC_impl(dtype_, name_, \ initval_, verb_, bind_, flags_, cat_, desc_)) #define MPIR_T_PVAR_PERCENTAGE_REGISTER_DYNAMIC(MODULE, dtype_, name_, \ addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_PERCENTAGE_REGISTER_DYNAMIC_impl(dtype_, name_, \ addr_, count_, verb_, bind_, flags_, get_value_, get_count, cat_, desc_)) /* COUNTER */ #define MPIR_T_PVAR_COUNTER_INIT_VAR(MODULE, ptr_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_INIT_VAR_impl(ptr_)) #define MPIR_T_PVAR_COUNTER_GET_VAR(ptr_) \ MPIR_T_PVAR_COUNTER_GET_VAR_impl(ptr_) #define MPIR_T_PVAR_COUNTER_INC_VAR(MODULE, ptr_, inc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_INC_VAR_impl(ptr_, inc_)) #define MPIR_T_PVAR_COUNTER_INIT(MODULE, name_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_INIT_impl(name_)) #define MPIR_T_PVAR_COUNTER_GET(name_) \ MPIR_T_PVAR_COUNTER_GET_impl(name_) #define MPIR_T_PVAR_COUNTER_INC(MODULE, name_, inc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_INC_impl(name_, inc_)) #define MPIR_T_PVAR_COUNTER_ADDR(name_) \ MPIR_T_PVAR_COUNTER_ADDR_impl(name_) #define MPIR_T_PVAR_COUNTER_REGISTER_STATIC(MODULE, dtype_, name_, \ verb_, bind_, flags_, cat_, desc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_REGISTER_STATIC_impl(dtype_, name_, \ verb_, bind_, flags_, cat_, desc_)) #define MPIR_T_PVAR_COUNTER_REGISTER_DYNAMIC(MODULE, dtype_, name_, \ addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_REGISTER_DYNAMIC_impl(dtype_, name_, \ addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_)) /* COUNTER ARRAY for user's convenience */ #define MPIR_T_PVAR_COUNTER_ARRAY_INIT_VAR(MODULE, ptr_, count_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_ARRAY_INIT_VAR_impl(ptr_, count_)) #define MPIR_T_PVAR_COUNTER_ARRAY_GET_VAR(ptr_, idx_) \ MPIR_T_PVAR_COUNTER_ARRAY_GET_VAR_impl(ptr_, idx_) #define MPIR_T_PVAR_COUNTER_ARRAY_INC_VAR(MODULE, ptr_, idx_, inc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_ARRAY_INC_VAR_impl(ptr_, idx_, inc_)) #define MPIR_T_PVAR_COUNTER_ARRAY_INIT(MODULE, name_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_ARRAY_INIT_impl(name_)) #define MPIR_T_PVAR_COUNTER_ARRAY_GET(name_, idx_) \ MPIR_T_PVAR_COUNTER_ARRAY_GET_impl(name_, idx_) #define MPIR_T_PVAR_COUNTER_ARRAY_INC(MODULE, ptr_, idx_, inc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_ARRAY_INC_impl(ptr_, idx_, inc_)) #define MPIR_T_PVAR_COUNTER_ARRAY_REGISTER_STATIC(MODULE, dtype_, name_, \ verb_, bind_, flags_, cat_, desc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_COUNTER_ARRAY_REGISTER_STATIC_impl(dtype_, name_, \ verb_, bind_, flags_, cat_, desc_)) /* ARRGEGATE */ #define MPIR_T_PVAR_AGGREGATE_INIT_VAR(MODULE, ptr_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_AGGREGATE_INIT_VAR_impl(ptr_)) #define MPIR_T_PVAR_AGGREGATE_GET_VAR(ptr_) \ MPIR_T_PVAR_AGGREGATE_GET_VAR_impl(ptr_) #define MPIR_T_PVAR_AGGREGATE_INC_VAR(MODULE, ptr_, inc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_AGGREGATE_INC_VAR_impl(ptr_, inc_)) #define MPIR_T_PVAR_AGGREGATE_INIT(MODULE, name_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_AGGREGATE_INIT_impl(name_)) #define MPIR_T_PVAR_AGGREGATE_GET(name_) \ MPIR_T_PVAR_AGGREGATE_GET_impl(name_) #define MPIR_T_PVAR_AGGREGATE_INC(MODULE, name_, inc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_AGGREGATE_INC_impl(name_, inc_)) #define MPIR_T_PVAR_AGGREGATE_REGISTER_STATIC(MODULE, dtype_, name_, \ verb_, bind_, flags_, cat_, desc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_AGGREGATE_REGISTER_STATIC_impl(dtype_, name_, \ verb_, bind_, flags_, cat_, desc_)) #define MPIR_T_PVAR_AGGREGATE_REGISTER_DYNAMIC(MODULE, dtype_, name_, \ addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_AGGREGATE_REGISTER_DYNAMIC_impl(dtype_, name_, \ addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_)) /* TIMER */ /* A timer actually has a twin, i.e., a counter, which counts how many times the timer is started/stopped so that we could know the average time for events measured. In our impl, the twins are exposed to MPI_T through the same name, but in two MPI_T_PVAR classes (timer and counter) and two data types (double and unsigned long long) respectively. */ #define MPIR_T_PVAR_TIMER_INIT_VAR(MODULE, ptr_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_INIT_VAR_impl(ptr_)) #define MPIR_T_PVAR_TIMER_GET_VAR(MODULE, ptr_, buf) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_GET_VAR_impl(ptr_, buf)) #define MPIR_T_PVAR_TIMER_START_VAR(MODULE, ptr_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_START_VAR_impl(ptr_)) #define MPIR_T_PVAR_TIMER_END_VAR(MODULE, ptr_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_END_VAR_impl(ptr_)) #define MPIR_T_PVAR_TIMER_INIT(MODULE, name_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_INIT_impl(name_)) #define MPIR_T_PVAR_TIMER_GET(MODULE, name_, buf_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_GET_impl(name_, buf_)) #define MPIR_T_PVAR_TIMER_START(MODULE, name_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_START_impl(name_)) #define MPIR_T_PVAR_TIMER_END(MODULE, name_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_END_impl(name_)) #define MPIR_T_PVAR_TIMER_ADDR(name_) \ MPIR_T_PVAR_TIMER_ADDR_impl(name_) /* This macro actually register twins of a timer and a counter to MPIR_T */ #define MPIR_T_PVAR_TIMER_REGISTER_STATIC(MODULE, dtype_, name_, \ verb_, bind_, flags_, cat_, desc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_TIMER_REGISTER_STATIC_impl(dtype_, name_, \ verb_, bind_, flags_, cat_, desc_)) /* HIGHWATERMARK */ /* Embed type names in watermark operations because these operations need to know types of watermark to work, however we can't use typeof(ptr_) in C. */ #define MPIR_T_PVAR_UINT_HIGHWATERMARK_INIT_VAR(MODULE, ptr_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_UINT_HIGHWATERMARK_INIT_VAR_impl(ptr_, val_)) #define MPIR_T_PVAR_ULONG_HIGHWATERMARK_INIT_VAR(MODULE, ptr_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG_HIGHWATERMARK_INIT_VAR_impl(ptr_, val_)) #define MPIR_T_PVAR_ULONG2_HIGHWATERMARK_INIT_VAR(MODULE, ptr_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG2_HIGHWATERMARK_INIT_VAR_impl(ptr_, val_)) #define MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_INIT_VAR(MODULE, ptr_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_INIT_VAR_impl(ptr_, val_)) #define MPIR_T_PVAR_UINT_HIGHWATERMARK_UPDATE_VAR(MODULE, ptr_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_UINT_HIGHWATERMARK_UPDATE_VAR_impl(ptr_, val_)) #define MPIR_T_PVAR_ULONG_HIGHWATERMARK_UPDATE_VAR(MODULE, ptr_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG_HIGHWATERMARK_UPDATE_VAR_impl(ptr_, val_)) #define MPIR_T_PVAR_ULONG2_HIGHWATERMARK_UPDATE_VAR(MODULE, ptr_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG2_HIGHWATERMARK_UPDATE_VAR_impl(ptr_, val_)) #define MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_UPDATE_VAR(MODULE, ptr_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_UPDATE_VAR_impl(ptr_, val_)) #define MPIR_T_PVAR_UINT_HIGHWATERMARK_INIT(MODULE, name_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_UINT_HIGHWATERMARK_INIT_impl(name_, val_)) #define MPIR_T_PVAR_ULONG_HIGHWATERMARK_INIT(MODULE, name_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG_HIGHWATERMARK_INIT_impl(name_, val_)) #define MPIR_T_PVAR_ULONG2_HIGHWATERMARK_INIT(MODULE, name_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG2_HIGHWATERMARK_INIT_impl(name_, val_)) #define MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_INIT(MODULE, name_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_INIT_impl(name_, val_)) #define MPIR_T_PVAR_UINT_HIGHWATERMARK_UPDATE(MODULE, name_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_UINT_HIGHWATERMARK_UPDATE_impl(name_, val_)) #define MPIR_T_PVAR_ULONG_HIGHWATERMARK_UPDATE(MODULE, name_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG_HIGHWATERMARK_UPDATE_impl(name_, val_)) #define MPIR_T_PVAR_ULONG2_HIGHWATERMARK_UPDATE(MODULE, name_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG2_HIGHWATERMARK_UPDATE_impl(name_, val_)) #define MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_UPDATE(MODULE, name_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_DOUBLE_HIGHWATERMARK_UPDATE_impl(name_, val_)) #define MPIR_T_PVAR_HIGHWATERMARK_REGISTER_STATIC(MODULE, dtype_, \ name_, initval_, verb_, bind_, flags_, cat_, desc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_HIGHWATERMARK_REGISTER_STATIC_impl(dtype_, name_, \ initval_, verb_, bind_, flags_, cat_, desc_)) #define MPIR_T_PVAR_HIGHWATERMARK_REGISTER_DYNAMIC(MODULE, dtype_, name_, \ addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_HIGHWATERMARK_REGISTER_DYNAMIC_impl(dtype_, name_, \ addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_)) /* LOWWATERMARK */ #define MPIR_T_PVAR_UINT_LOWWATERMARK_INIT_VAR(MODULE, ptr_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_UINT_LOWWATERMARK_INIT_VAR_impl(ptr_, val_)) #define MPIR_T_PVAR_ULONG_LOWWATERMARK_INIT_VAR(MODULE, ptr_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG_LOWWATERMARK_INIT_VAR_impl(ptr_, val_)) #define MPIR_T_PVAR_ULONG2_LOWWATERMARK_INIT_VAR(MODULE, ptr_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG2_LOWWATERMARK_INIT_VAR_impl(ptr_, val_)) #define MPIR_T_PVAR_DOUBLE_LOWWATERMARK_INIT_VAR(MODULE, ptr_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_DOUBLE_LOWWATERMARK_INIT_VAR_impl(ptr_, val_)) #define MPIR_T_PVAR_UINT_LOWWATERMARK_UPDATE_VAR(MODULE, ptr_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_UINT_LOWWATERMARK_UPDATE_VAR_impl(ptr_, val_)) #define MPIR_T_PVAR_ULONG_LOWWATERMARK_UPDATE_VAR(MODULE, ptr_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG_LOWWATERMARK_UPDATE_VAR_impl(ptr_, val_)) #define MPIR_T_PVAR_ULONG2_LOWWATERMARK_UPDATE_VAR(MODULE, ptr_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG2_LOWWATERMARK_UPDATE_VAR_impl(ptr_, val_)) #define MPIR_T_PVAR_DOUBLE_LOWWATERMARK_UPDATE_VAR(MODULE, ptr_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_DOUBLE_LOWWATERMARK_UPDATE_VAR_impl(ptr_, val_)) #define MPIR_T_PVAR_UINT_LOWWATERMARK_INIT(MODULE, name_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_UINT_LOWWATERMARK_INIT_impl(name_, val_)) #define MPIR_T_PVAR_ULONG_LOWWATERMARK_INIT(MODULE, name_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG_LOWWATERMARK_INIT_impl(name_, val_)) #define MPIR_T_PVAR_ULONG2_LOWWATERMARK_INIT(MODULE, name_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG2_LOWWATERMARK_INIT_impl(name_, val_)) #define MPIR_T_PVAR_DOUBLE_LOWWATERMARK_INIT(MODULE, name_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_DOUBLE_LOWWATERMARK_INIT_impl(name_, val_)) #define MPIR_T_PVAR_UINT_LOWWATERMARK_UPDATE(MODULE, name_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_UINT_LOWWATERMARK_UPDATE_impl(name_, val_)) #define MPIR_T_PVAR_ULONG_LOWWATERMARK_UPDATE(MODULE, name_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG_LOWWATERMARK_UPDATE_impl(name_, val_)) #define MPIR_T_PVAR_ULONG2_LOWWATERMARK_UPDATE(MODULE, name_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_ULONG2_LOWWATERMARK_UPDATE_impl(name_, val_)) #define MPIR_T_PVAR_DOUBLE_LOWWATERMARK_UPDATE(MODULE, name_, val_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_DOUBLE_LOWWATERMARK_UPDATE_impl(name_, val_)) #define MPIR_T_PVAR_LOWWATERMARK_REGISTER_STATIC(MODULE, dtype_, name_, \ initval_, verb_, bind_, flags_, cat_, desc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LOWWATERMARK_REGISTER_STATIC_impl(dtype_, name_, \ initval_, verb_, bind_, flags_, cat_, desc_)) #define MPIR_T_PVAR_LOWWATERMARK_REGISTER_DYNAMIC(MODULE, dtype_, name_, \ addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_) \ PVAR_GATED_ACTION(MODULE, MPIR_T_PVAR_LOWWATERMARK_REGISTER_DYNAMIC_impl(dtype_, name_, \ addr_, count_, verb_, bind_, flags_, get_value_, get_count_, cat_, desc_)) int MPIR_T_cvar_handle_alloc_impl(int cvar_index, void *obj_handle, MPI_T_cvar_handle *handle, int *count); int MPIR_T_cvar_read_impl(MPI_T_cvar_handle handle, void *buf); int MPIR_T_cvar_write_impl(MPI_T_cvar_handle handle, const void *buf); int MPIR_T_pvar_session_create_impl(MPI_T_pvar_session *session); int MPIR_T_pvar_session_free_impl(MPI_T_pvar_session *session); int MPIR_T_pvar_handle_alloc_impl(MPI_T_pvar_session session, int pvar_index, void *obj_handle, MPI_T_pvar_handle *handle, int *count); int MPIR_T_pvar_handle_free_impl(MPI_T_pvar_session session, MPI_T_pvar_handle *handle); int MPIR_T_pvar_start_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle); int MPIR_T_pvar_stop_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle); int MPIR_T_pvar_read_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle, void *buf); int MPIR_T_pvar_write_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle, const void *buf); int MPIR_T_pvar_reset_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle); int MPIR_T_pvar_readreset_impl(MPI_T_pvar_session session, MPI_T_pvar_handle handle, void *buf); int MPIR_T_category_get_cvars_impl(int cat_index, int len, int indices[]); int MPIR_T_category_get_pvars_impl(int cat_index, int len, int indices[]); int MPIR_T_category_get_categories_impl(int cat_index, int len, int indices[]); #endif /* MPIT_H_INCLUDED */ # 449 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpit.h" # 228 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpir_handlemem.h" #endif /* expanded by -frewrite-includes */ # 228 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_handlemem.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * */ #ifndef MPIR_HANDLEMEM_H_INCLUDED #define MPIR_HANDLEMEM_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpichconfconst.h" #endif /* expanded by -frewrite-includes */ # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_handlemem.h" # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_handlemem.h" #if 0 /* expanded by -frewrite-includes */ #include "mpichconf.h" #endif /* expanded by -frewrite-includes */ # 12 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_handlemem.h" # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_handlemem.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_objects.h" #endif /* expanded by -frewrite-includes */ # 13 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_handlemem.h" # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_handlemem.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_thread.h" #endif /* expanded by -frewrite-includes */ # 14 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_handlemem.h" # 15 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_handlemem.h" /* style: allow:printf:5 sig:0 */ #ifdef MPICH_DEBUG_HANDLEALLOC /* The following is a handler that may be added to finalize to test whether handles remain allocated, including those from the direct blocks. When adding memory checking, this routine should be invoked as MPIR_Add_finalize(MPIR_check_handles_on_finalize, objmem, 1); as part of the object intialization. The algorithm follows the following approach: The memory allocation approach manages a list of available objects. These objects are allocated from several places: "direct" - this is a block of preallocated space "indirect" - this is a block of blocks that are allocated as necessary. E.g., objmem_ptr->indirect[0..objmem_ptr->indirect_size-1] are pointers (or null) to a block of memory. This block is then divided into objects that are added to the avail list. To provide information on the handles that are still in use, we must "repatriate" all of the free objects, at least virtually. To give the best information, for each free item, we determine to which block it belongs. */ static inline int MPIR_check_handles_on_finalize(void *objmem_ptr) { MPIR_Object_alloc_t *objmem = (MPIR_Object_alloc_t *) objmem_ptr; int i; MPIR_Handle_common *ptr; int leaked_handles = FALSE; int directSize = objmem->direct_size; char *direct = (char *) objmem->direct; char *directEnd = (char *) direct + directSize * objmem->size - 1; int nDirect = 0; int *nIndirect = 0; /* Return immediately if this object has not allocated any space */ if (!objmem->initialized) { return 0; } if (objmem->indirect_size > 0) { nIndirect = (int *) MPL_calloc(objmem->indirect_size, sizeof(int)); } /* Count the number of items in the avail list. These include * all objects, whether direct or indirect allocation */ ptr = objmem->avail; while (ptr) { /* printf("Looking at %p\n", ptr); */ /* Find where this object belongs */ if ((char *) ptr >= direct && (char *) ptr < directEnd) { nDirect++; } else { void **indirect = (void **) objmem->indirect; for (i = 0; i < objmem->indirect_size; i++) { char *start = indirect[i]; char *end = start + HANDLE_NUM_INDICES * objmem->size; if ((char *) ptr >= start && (char *) ptr < end) { nIndirect[i]++; break; } } if (i == objmem->indirect_size) { /* Error - could not find the owning memory */ /* Temp */ printf("Could not place object at %p in handle memory for type %s\n", ptr, MPIR_Handle_get_kind_str(objmem->kind)); printf("direct block is [%p,%p]\n", direct, directEnd); if (objmem->indirect_size) { printf("indirect block is [%p,%p]\n", indirect[0], (char *) indirect[0] + HANDLE_NUM_INDICES * objmem->size); } } } ptr = ptr->next; } if (0) { /* Produce a report */ printf("Object handles:\n\ttype \t%s\n\tsize \t%d\n\tdirect size\t%d\n\ \tindirect size\t%d\n", MPIR_Handle_get_kind_str(objmem->kind), objmem->size, objmem->direct_size, objmem->indirect_size); } if (nDirect != directSize) { leaked_handles = TRUE; printf("In direct memory block for handle type %s, %d handles are still allocated\n", MPIR_Handle_get_kind_str(objmem->kind), directSize - nDirect); } for (i = 0; i < objmem->indirect_size; i++) { if (nIndirect[i] != HANDLE_NUM_INDICES) { leaked_handles = TRUE; printf ("In indirect memory block %d for handle type %s, %d handles are still allocated\n", i, MPIR_Handle_get_kind_str(objmem->kind), HANDLE_NUM_INDICES - nIndirect[i]); } } if (nIndirect) { MPL_free(nIndirect); } if (leaked_handles && MPIR_CVAR_ABORT_ON_LEAKED_HANDLES) { /* comm_world has been (or should have been) destroyed by this point, * pass comm=NULL */ MPID_Abort(NULL, MPI_ERR_OTHER, 1, "ERROR: leaked handles detected, aborting"); MPIR_Assert(0); } return 0; } #endif # 131 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_handlemem.h" /* This is the utility file for info that contains routines used to manage the arrays used to store handle objects. To use these routines, allocate the following in a utility file used by each object (e.g., info, datatype, comm, group, ...). (The comment format // is used in this example but the usual C comment convention should be used of course.) The usage is described below. // Declarations begin here // Static declaration of the information about the block // Define the number of preallocated entries # omitted) define MPID__PREALLOC 256 MPIR_Object_alloc_t MPID__mem = { 0, 0, 0, 0, MPID_, sizeof(MPID_), MPID__direct, MPID__PREALLOC, }; // Preallocated objects MPID_ MPID__direct[MPID__PREALLOC]; static int initialized = 0; // Next available object static int MPID_ *avail = 0; // Extension (indirect) objects static MPID_ *(*MPID__indirect)[] = 0; static int MPID__indirect_size = 0; // Declarations end here These provide for lazy initialization; applications that do not need a particular object will not include any of the code or even reference the space. Note that these routines are designed for the MPI objects, and include the creation of a "handle" that is appropriate for the MPI object value. None of these routines is thread-safe. Any routine that uses them must ensure that only one thread at a time may call them. */ /* This routine is called by finalize when MPI exits */ static inline int MPIR_Handle_free(void *((*indirect)[]), int indirect_size) { int i; /* Remove any allocated storage */ for (i = 0; i < indirect_size; i++) { MPL_free((*indirect)[i]); } if (indirect) { MPL_free(indirect); } /* This does *not* remove any objects that the user created * and then did not destroy */ return 0; } #if defined(MPL_VG_AVAILABLE) #define HANDLE_VG_LABEL(objptr_, objsize_, handle_type_, is_direct_) \ do { \ if (MPL_VG_RUNNING_ON_VALGRIND()) { \ char desc_str[256]; \ MPL_snprintf(desc_str, sizeof(desc_str)-1, \ "[MPICH handle: objptr=%p handle=0x%x %s/%s]", \ (objptr_), (objptr_)->handle, \ ((is_direct_) ? "DIRECT" : "INDIRECT"), \ MPIR_Handle_get_kind_str(handle_type_)); \ /* we don't keep track of the block descriptor because the handle */ \ /* values never change once allocated */ \ MPL_VG_CREATE_BLOCK((objptr_), (objsize_), desc_str); \ } \ } while (0) #else # 205 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_handlemem.h" #define HANDLE_VG_LABEL(objptr_, objsize_, handle_type_, is_direct_) do {} while (0) #endif # 207 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_handlemem.h" static inline void *MPIR_Handle_direct_init(void *direct, int direct_size, int obj_size, int handle_type) { int i; MPIR_Handle_common *hptr = 0; char *ptr = (char *) direct; for (i = 0; i < direct_size; i++) { /* printf("Adding %p in %d\n", ptr, handle_type); */ /* First cast to (void*) to avoid false warnings about alignment * (consider that a requirement of the input parameters) */ hptr = (MPIR_Handle_common *) (void *) ptr; ptr = ptr + obj_size; hptr->next = ptr; hptr->handle = ((unsigned) HANDLE_KIND_DIRECT << HANDLE_KIND_SHIFT) | (handle_type << HANDLE_MPI_KIND_SHIFT) | i; HANDLE_VG_LABEL(hptr, obj_size, handle_type, 1); } if (hptr) hptr->next = 0; return direct; } /* indirect is really a pointer to a pointer to an array of pointers */ static inline void *MPIR_Handle_indirect_init(void *(**indirect)[], int *indirect_size, int indirect_num_blocks, int indirect_num_indices, int obj_size, int handle_type) { void *block_ptr; MPIR_Handle_common *hptr = 0; char *ptr; int i; /* Must create new storage for dynamically allocated objects */ /* Create the table */ if (!*indirect) { /* printf("Creating indirect table with %d pointers to blocks in it\n", indirect_num_blocks); */ *indirect = (void *) MPL_calloc(indirect_num_blocks, sizeof(void *)); if (!*indirect) { return 0; } *indirect_size = 0; } /* See if we can allocate another block */ if (*indirect_size >= indirect_num_blocks) { /* printf("Out of space in indirect table\n"); */ return 0; } /* Create the next block */ /* printf("Creating indirect block number %d with %d objects in it\n", *indirect_size, indirect_num_indices); */ block_ptr = (void *) MPL_calloc(indirect_num_indices, obj_size); if (!block_ptr) { return 0; } ptr = (char *) block_ptr; for (i = 0; i < indirect_num_indices; i++) { /* Cast to (void*) to avoid false warning about alignment */ hptr = (MPIR_Handle_common *) (void *) ptr; ptr = ptr + obj_size; hptr->next = ptr; hptr->handle = ((unsigned) HANDLE_KIND_INDIRECT << HANDLE_KIND_SHIFT) | (handle_type << HANDLE_MPI_KIND_SHIFT) | (*indirect_size << HANDLE_INDIRECT_SHIFT) | i; /* printf("handle=%#x handle_type=%x *indirect_size=%d i=%d\n", hptr->handle, handle_type, *indirect_size, i); */ HANDLE_VG_LABEL(hptr, obj_size, handle_type, 0); } hptr->next = 0; /* We're here because avail is null, so there is no need to set * the last block ptr to avail */ /* printf("loc of update is %x\n", &(**indirect)[*indirect_size]); */ (**indirect)[*indirect_size] = block_ptr; *indirect_size = *indirect_size + 1; return block_ptr; } static inline int MPIR_Handle_finalize(void *objmem_ptr) { MPIR_Object_alloc_t *objmem = (MPIR_Object_alloc_t *) objmem_ptr; (void) MPIR_Handle_free(objmem->indirect, objmem->indirect_size); /* This does *not* remove any Info objects that the user created * and then did not destroy */ /* at this point we are done with the memory pool, inform valgrind */ MPL_VG_DESTROY_MEMPOOL(objmem_ptr); return 0; } /*+ MPIR_Handle_obj_alloc - Create an object using the handle allocator Input Parameters: . objmem - Pointer to object memory block. Return Value: Pointer to new object. Null if no more objects are available or can be allocated. Notes: In addition to returning a pointer to a new object, this routine may allocate additional space for more objects. This routine is thread-safe. This routine is performance-critical (it may be used to allocate MPI_Requests) and should not call any other routines in the common case. Threading: The 'MPID_THREAD_CS_ENTER/EXIT(POBJ, MPIR_THREAD_POBJ_HANDLE_MUTEX)' enables both finer-grain locking with a single global mutex and with a mutex specific for handles. +*/ #undef FUNCNAME #define FUNCNAME MPIR_Handle_obj_alloc #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline void *MPIR_Handle_obj_alloc(MPIR_Object_alloc_t * objmem) { void *ret; MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_HANDLE_MUTEX); ret = MPIR_Handle_obj_alloc_unsafe(objmem); MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_HANDLE_MUTEX); return ret; } #undef FUNCNAME #define FUNCNAME MPIR_Handle_obj_alloc_unsafe #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline void *MPIR_Handle_obj_alloc_unsafe(MPIR_Object_alloc_t * objmem) { MPIR_Handle_common *ptr; if (objmem->avail) { ptr = objmem->avail; objmem->avail = objmem->avail->next; /* We do not clear ptr->next as we set it to an invalid pattern * when doing memory debugging and we don't need to set it * for the production/default case */ /* ptr points to object to allocate */ } else { int objsize, objkind; objsize = objmem->size; objkind = objmem->kind; if (!objmem->initialized) { MPL_VG_CREATE_MEMPOOL(objmem, 0 /*rzB */ , 0 /*is_zeroed */); /* Setup the first block. This is done here so that short MPI * jobs do not need to include any of the Info code if no * Info-using routines are used */ objmem->initialized = 1; ptr = MPIR_Handle_direct_init(objmem->direct, objmem->direct_size, objsize, objkind); if (ptr) { objmem->avail = ptr->next; } #ifdef MPICH_DEBUG_HANDLEALLOC /* The priority of these callbacks must be greater than * the priority of the callback that frees the objmem direct and * indirect storage. */ MPIR_Add_finalize(MPIR_check_handles_on_finalize, objmem, MPIR_FINALIZE_CALLBACK_HANDLE_CHECK_PRIO); #endif # 382 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_handlemem.h" MPIR_Add_finalize(MPIR_Handle_finalize, objmem, 0); /* ptr points to object to allocate */ } else { /* no space left in direct block; setup the indirect block. */ ptr = MPIR_Handle_indirect_init(&objmem->indirect, &objmem->indirect_size, HANDLE_NUM_BLOCKS, HANDLE_NUM_INDICES, objsize, objkind); if (ptr) { objmem->avail = ptr->next; } /* ptr points to object to allocate */ } } if (ptr) { #ifdef USE_MEMORY_TRACING /* We set the object to an invalid pattern. This is similar to * what is done by MPL_trmalloc by default (except that trmalloc uses * 0xda as the byte in the memset) */ /* if the object was previously freed then MEMPOOL_FREE marked it as * NOACCESS, so we need to make it addressable again before memsetting * it */ /* save and restore the handle -- it's a more robust method than * encoding the layout of the structure */ int tmp_handle; MPL_VG_MAKE_MEM_DEFINED(ptr, objmem->size); tmp_handle = ptr->handle; memset(ptr, 0xef, objmem->size); ptr->handle = tmp_handle; #endif /* USE_MEMORY_TRACING */ # 417 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_handlemem.h" /* mark the mem as addressable yet undefined if valgrind is available */ MPL_VG_MEMPOOL_ALLOC(objmem, ptr, objmem->size); /* the handle value is always valid at return from this function */ MPL_VG_MAKE_MEM_DEFINED(&ptr->handle, sizeof(ptr->handle)); /* necessary to prevent annotations from being misinterpreted. HB/HA * arcs will be drawn between a req object in across a free/alloc * boundary otherwise */ /* NOTE: basically causes DRD's --trace-addr option to be useless for * handlemem-allocated objects. Consider one of the trace-inducing * annotations instead. */ MPL_VG_ANNOTATE_NEW_MEMORY(ptr, objmem->size); MPL_DBG_MSG_FMT(MPIR_DBG_HANDLE, TYPICAL, (MPL_DBG_FDEST, "Allocating object ptr %p (handle val 0x%08x)", ptr, ptr->handle)); } return ptr; } /*+ MPIR_Handle_obj_free - Free an object allocated with MPID_Handle_obj_new Input Parameters: + objmem - Pointer to object block - object - Object to delete Notes: This routine assumes that only a single thread calls it at a time; this is true for the SINGLE_CS approach to thread safety +*/ static inline void MPIR_Handle_obj_free(MPIR_Object_alloc_t * objmem, void *object) { MPIR_Handle_common *obj = (MPIR_Handle_common *) object; MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_HANDLE_MUTEX); MPL_DBG_MSG_FMT(MPIR_DBG_HANDLE, TYPICAL, (MPL_DBG_FDEST, "Freeing object ptr %p (0x%08x kind=%s) refcount=%d", (obj), (obj)->handle, MPIR_Handle_get_kind_str(HANDLE_GET_MPI_KIND ((obj)->handle)), MPIR_Object_get_ref(obj))); #ifdef USE_MEMORY_TRACING { /* set the object memory to an invalid value (0xec), except for the handle field */ int tmp_handle; tmp_handle = obj->handle; memset(obj, 0xec, objmem->size); obj->handle = tmp_handle; } #endif # 472 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_handlemem.h" if (MPL_VG_RUNNING_ON_VALGRIND()) { int tmp_handle = obj->handle; MPL_VG_MEMPOOL_FREE(objmem, obj); /* MEMPOOL_FREE marks the object NOACCESS, so we have to make the * MPIR_Handle_common area that is used for internal book keeping * addressable again. */ MPL_VG_MAKE_MEM_DEFINED(&obj->handle, sizeof(obj->handle)); MPL_VG_MAKE_MEM_UNDEFINED(&obj->next, sizeof(obj->next)); /* tt#1626: MEMPOOL_FREE also uses the value of `--free-fill=0x..` to * memset the object, so we need to restore the handle */ obj->handle = tmp_handle; /* Necessary to prevent annotations from being misinterpreted. HB/HA arcs * will be drawn between a req object in across a free/alloc boundary * otherwise. Specifically, stores to obj->next when obj is actually an * MPIR_Request falsely look like a race to DRD and Helgrind because of the * other lockfree synchronization used with requests. */ MPL_VG_ANNOTATE_NEW_MEMORY(obj, objmem->size); } obj->next = objmem->avail; objmem->avail = obj; MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_HANDLE_MUTEX); } /* * Get an pointer to dynamically allocated storage for objects. */ static inline void *MPIR_Handle_get_ptr_indirect(int handle, MPIR_Object_alloc_t * objmem) { int block_num, index_num; /* Check for a valid handle type */ if (HANDLE_GET_MPI_KIND(handle) != objmem->kind) { return 0; } /* Find the block */ block_num = HANDLE_BLOCK(handle); if (block_num >= objmem->indirect_size) { return 0; } /* Find the entry */ index_num = HANDLE_BLOCK_INDEX(handle); /* If we could declare the blocks to a known size object, we * could do something like * return &((MPIR_Info**)*MPIU_Info_mem.indirect)[block_num][index_num]; * since we cannot, we do the calculation by hand. */ /* Get the pointer to the block of addresses. This is an array of * void * */ { char *block_ptr; /* Get the pointer to the block */ block_ptr = (char *) (*(objmem->indirect))[block_num]; /* Get the item */ block_ptr += index_num * objmem->size; return block_ptr; } } #endif /* MPIR_HANDLEMEM_H_INCLUDED */ # 539 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpir_handlemem.h" # 229 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 /*****************************************************************************/ /******************** PART 6: DEVICE "POST" FUNCTIONALITY ********************/ /*****************************************************************************/ #if 0 /* expanded by -frewrite-includes */ #include "mpidpost.h" #endif /* expanded by -frewrite-includes */ # 234 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpost.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPIDPOST_H_INCLUDED) #define MPIDPOST_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpid_coll.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpost.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpid_coll.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if 0 /* expanded by -frewrite-includes */ #include "mpidimpl.h" #endif /* expanded by -frewrite-includes */ # 7 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpid_coll.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ /* * WARNING: Functions and macros in this file are for internal use only. * As such, they are only visible to the device and * channel. Do not include them in the MPID macros. */ #if !defined(MPICH_MPIDIMPL_H_INCLUDED) #define MPICH_MPIDIMPL_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpichconf.h" #endif /* expanded by -frewrite-includes */ # 16 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" # 17 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" #if defined(HAVE_ASSERT_H) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" # 1 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/assert.h" 1 3 /* Copyright (C) 1991,1992,1994-2001,2003,2004,2007,2011,2012 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 modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ /* * ISO C99 Standard: 7.2 Diagnostics */ #ifdef _ASSERT_H # undef _ASSERT_H # undef assert # undef __ASSERT_VOID_CAST # ifdef __USE_GNU # undef assert_perror # endif # 32 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/assert.h" 3 #endif /* assert.h */ # 34 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/assert.h" 3 #define _ASSERT_H 1 #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 36 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/assert.h" 3 # 37 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/assert.h" 3 #if defined __cplusplus && __GNUC_PREREQ (2,95) # define __ASSERT_VOID_CAST static_cast #else # 41 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/assert.h" 3 # define __ASSERT_VOID_CAST (void) #endif # 43 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/assert.h" 3 /* void assert (int expression); If NDEBUG is defined, do nothing. If not, and EXPRESSION is zero, print an error message and abort. */ #ifdef NDEBUG # define assert(expr) (__ASSERT_VOID_CAST (0)) /* void assert_perror (int errnum); If NDEBUG is defined, do nothing. If not, and ERRNUM is not zero, print an error message with the error text for ERRNUM and abort. (This is a GNU extension.) */ # ifdef __USE_GNU # define assert_perror(errnum) (__ASSERT_VOID_CAST (0)) # endif # 62 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/assert.h" 3 #else /* Not NDEBUG. */ # 64 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/assert.h" 3 __BEGIN_DECLS /* This prints an "Assertion failed" message and aborts. */ extern void __assert_fail (const char *__assertion, const char *__file, unsigned int __line, const char *__function) __THROW __attribute__ ((__noreturn__)); /* Likewise, but prints the error text for ERRNUM. */ extern void __assert_perror_fail (int __errnum, const char *__file, unsigned int __line, const char *__function) __THROW __attribute__ ((__noreturn__)); /* The following is not at all used here but needed for standard compliance. */ extern void __assert (const char *__assertion, const char *__file, int __line) __THROW __attribute__ ((__noreturn__)); __END_DECLS # define assert(expr) \ ((expr) \ ? __ASSERT_VOID_CAST (0) \ : __assert_fail (__STRING(expr), __FILE__, __LINE__, __ASSERT_FUNCTION)) # ifdef __USE_GNU # define assert_perror(errnum) \ (!(errnum) \ ? __ASSERT_VOID_CAST (0) \ : __assert_perror_fail ((errnum), __FILE__, __LINE__, __ASSERT_FUNCTION)) # endif # 97 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/assert.h" 3 /* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__' which contains the name of the function currently being defined. This is broken in G++ before version 2.6. C9x has a similar variable called __func__, but prefer the GCC one since it demangles C++ function names. */ # if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4) # define __ASSERT_FUNCTION __PRETTY_FUNCTION__ # else # 106 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/assert.h" 3 # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L # define __ASSERT_FUNCTION __func__ # else # 109 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/assert.h" 3 # define __ASSERT_FUNCTION ((const char *) 0) # endif # 111 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/assert.h" 3 # endif # 112 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/assert.h" 3 #endif /* NDEBUG. */ # 114 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/assert.h" 3 #if defined __USE_ISOC11 && !defined __cplusplus /* Static assertion. Requires support in the compiler. */ # undef static_assert # define static_assert _Static_assert #endif # 121 "/bgsys/drivers/V1R2M4/ppc64/gnu-linux-4.7.2/powerpc64-bgq-linux/sys-include/assert.h" 3 # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" 2 #endif # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpiimpl.h" #endif /* expanded by -frewrite-includes */ # 22 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. * * Portions of this code were written by Microsoft. Those portions are * Copyright (c) 2007 Microsoft Corporation. Microsoft grants * permission to use, reproduce, prepare derivative works, and to * redistribute to others. The code is licensed "as is." The User * bears the risk of using it. Microsoft gives no express warranties, * guarantees or conditions. To the extent permitted by law, Microsoft * excludes the implied warranties of merchantability, fitness for a * particular purpose and non-infringement. */ #ifndef MPIIMPL_H_INCLUDED #define MPIIMPL_H_INCLUDED #if 0 /* expanded by -frewrite-includes */ #include "mpichconfconst.h" #endif /* expanded by -frewrite-includes */ # 19 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpichconf.h" #endif /* expanded by -frewrite-includes */ # 20 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 21 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 22 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 23 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #ifdef STDC_HEADERS #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 24 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 26 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 26 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 27 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #else # 28 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #ifdef HAVE_STDLIB_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 29 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 30 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 31 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #ifdef HAVE_STDARG_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 32 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 33 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 34 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #ifdef HAVE_STRING_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 35 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 36 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 37 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 38 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #ifdef HAVE_LIMITS_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 40 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 41 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 42 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #ifdef HAVE_SYS_TYPES_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 44 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 45 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 46 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" /* for MAXHOSTNAMELEN under Linux and OSX */ #ifdef HAVE_SYS_PARAM_H #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 49 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 50 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 51 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if defined (HAVE_USLEEP) #if 0 /* expanded by -frewrite-includes */ #include #endif /* expanded by -frewrite-includes */ # 53 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 54 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if defined (NEEDS_USLEEP_DECL) int usleep(useconds_t usec); #endif # 57 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 58 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if defined(HAVE_LONG_LONG_INT) /* Assume two's complement for determining LLONG_MAX (already assumed * elsewhere in MPICH). */ #ifndef LLONG_MAX /* slightly tricky (values in binary): * - put a 1 in the second-to-msb digit (0100...0000) * - sub 1, giving all 1s starting at third-to-msb digit (0011...1111) * - shift left 1 (0111...1110) * - add 1, yielding all 1s in positive space (0111...1111) */ #define LLONG_MAX (((((long long) 1 << (sizeof(long long) * CHAR_BIT - 2)) - 1 ) << 1) + 1) #endif # 70 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif /* defined(HAVE_LONG_LONG_INT) */ # 71 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if (!defined MAXHOSTNAMELEN) && (!defined MAX_HOSTNAME_LEN) #define MAX_HOSTNAME_LEN 256 #elif !defined MAX_HOSTNAME_LEN # 75 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #define MAX_HOSTNAME_LEN MAXHOSTNAMELEN #endif # 77 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" /* This allows us to keep names local to a single file when we can use weak symbols */ #ifdef USE_WEAK_SYMBOLS #define PMPI_LOCAL static #else # 83 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #define PMPI_LOCAL #endif # 85 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" /* Fix for universal endianess added in autoconf 2.62 */ #ifdef WORDS_UNIVERSAL_ENDIAN #if defined(__BIG_ENDIAN__) #elif defined(__LITTLE_ENDIAN__) # 90 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #define WORDS_LITTLEENDIAN #else # 92 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #error 'Universal endianess defined without __BIG_ENDIAN__ or __LITTLE_ENDIAN__' #endif # 94 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 95 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if defined(HAVE_VSNPRINTF) && defined(NEEDS_VSNPRINTF_DECL) && !defined(vsnprintf) int vsnprintf(char *str, size_t size, const char *format, va_list ap); # endif # 99 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" /***************************************************************************** * We use the following ordering of information in this file: * * 1. Start with independent headers that do not have any * dependencies on the rest of the MPICH implementation (e.g., * mpl, opa, mpi.h). * * 2. Next is forward declarations of MPIR structures (MPIR_Comm, * MPIR_Win, etc.). * * 3. After that we have device-independent headers (MPIR * functionality that does not have any dependency on MPID). * * 4. Next is the device "pre" header that defines device-level * initial objects that would be used by the MPIR structures. * * 5. Then comes the device-dependent MPIR functionality, with the * actual definitions of structures, function prototypes, etc. * This functionality can only rely on the device "pre" * functionality. * * 6. Finally, we'll add the device "post" header that is allowed to * use anything from the MPIR layer. *****************************************************************************/ /*****************************************************************************/ /*********************** PART 1: INDEPENDENT HEADERS *************************/ /*****************************************************************************/ /* if we are defining this, we must define it before including mpl.h */ #if defined(MPICH_DEBUG_MEMINIT) #define MPL_VG_ENABLED 1 #endif # 135 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpl.h" #endif /* expanded by -frewrite-includes */ # 136 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 137 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "opa_primitives.h" #endif /* expanded by -frewrite-includes */ # 137 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 138 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpi.h" #endif /* expanded by -frewrite-includes */ # 138 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 139 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" /*****************************************************************************/ /*********************** PART 2: FORWARD DECLARATION *************************/ /*****************************************************************************/ struct MPIR_Request; typedef struct MPIR_Request MPIR_Request; struct MPIR_Comm; typedef struct MPIR_Comm MPIR_Comm; struct MPIR_Datatype; /* FIXME: waiting for Wes' patch revert to fix this */ /* typedef struct MPIR_Datatype MPIR_Datatype; */ struct MPIR_Win; typedef struct MPIR_Win MPIR_Win; struct MPIR_Info; typedef struct MPIR_Info MPIR_Info; struct MPIR_Group; typedef struct MPIR_Group MPIR_Group; struct MPIR_Topology; typedef struct MPIR_Topology MPIR_Topology; /*****************************************************************************/ /******************* PART 3: DEVICE INDEPENDENT HEADERS **********************/ /*****************************************************************************/ #if 0 /* expanded by -frewrite-includes */ #include "mpir_misc.h" #endif /* expanded by -frewrite-includes */ # 172 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 173 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_dbg.h" #endif /* expanded by -frewrite-includes */ # 173 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 174 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_objects.h" #endif /* expanded by -frewrite-includes */ # 174 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 175 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_strerror.h" #endif /* expanded by -frewrite-includes */ # 175 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 176 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_type_defs.h" #endif /* expanded by -frewrite-includes */ # 176 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 177 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_assert.h" #endif /* expanded by -frewrite-includes */ # 177 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 178 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_pointers.h" #endif /* expanded by -frewrite-includes */ # 178 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 179 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_refcount.h" #endif /* expanded by -frewrite-includes */ # 179 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 180 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_mem.h" #endif /* expanded by -frewrite-includes */ # 180 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 181 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_info.h" #endif /* expanded by -frewrite-includes */ # 181 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 182 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_errhandler.h" #endif /* expanded by -frewrite-includes */ # 182 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 183 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_attr_generic.h" #endif /* expanded by -frewrite-includes */ # 183 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 184 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_contextid.h" #endif /* expanded by -frewrite-includes */ # 184 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 185 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_status.h" #endif /* expanded by -frewrite-includes */ # 185 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 186 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_debugger.h" #endif /* expanded by -frewrite-includes */ # 186 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 187 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_op.h" #endif /* expanded by -frewrite-includes */ # 187 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 188 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_topo.h" #endif /* expanded by -frewrite-includes */ # 188 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 189 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_tags.h" #endif /* expanded by -frewrite-includes */ # 189 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 190 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_pt2pt.h" #endif /* expanded by -frewrite-includes */ # 190 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 191 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_ext.h" #endif /* expanded by -frewrite-includes */ # 191 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 192 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #ifdef HAVE_CXX_BINDING #if 0 /* expanded by -frewrite-includes */ #include "mpii_cxxinterface.h" #endif /* expanded by -frewrite-includes */ # 194 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 195 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 196 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #ifdef HAVE_FORTRAN_BINDING #if 0 /* expanded by -frewrite-includes */ #include "mpii_f77interface.h" #endif /* expanded by -frewrite-includes */ # 198 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 199 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #endif # 200 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" /*****************************************************************************/ /********************** PART 4: DEVICE PRE DECLARATION ***********************/ /*****************************************************************************/ #if 0 /* expanded by -frewrite-includes */ #include "mpidpre.h" #endif /* expanded by -frewrite-includes */ # 206 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 207 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" /*****************************************************************************/ /********************* PART 5: DEVICE DEPENDENT HEADERS **********************/ /*****************************************************************************/ #if 0 /* expanded by -frewrite-includes */ #include "mpir_thread.h" #endif /* expanded by -frewrite-includes */ # 213 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 214 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_attr.h" #endif /* expanded by -frewrite-includes */ # 214 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 215 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_group.h" #endif /* expanded by -frewrite-includes */ # 215 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 216 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_comm.h" #endif /* expanded by -frewrite-includes */ # 216 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 217 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_request.h" #endif /* expanded by -frewrite-includes */ # 217 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 218 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_win.h" #endif /* expanded by -frewrite-includes */ # 218 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 219 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_coll.h" #endif /* expanded by -frewrite-includes */ # 219 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 220 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_func.h" #endif /* expanded by -frewrite-includes */ # 220 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 221 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_err.h" #endif /* expanded by -frewrite-includes */ # 221 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 222 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_datatype.h" #endif /* expanded by -frewrite-includes */ # 222 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 223 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_nbc.h" #endif /* expanded by -frewrite-includes */ # 223 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 224 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_process.h" #endif /* expanded by -frewrite-includes */ # 224 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 225 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_cvars.h" #endif /* expanded by -frewrite-includes */ # 225 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 226 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_misc_post.h" #endif /* expanded by -frewrite-includes */ # 226 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 227 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpit.h" #endif /* expanded by -frewrite-includes */ # 227 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 228 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" #if 0 /* expanded by -frewrite-includes */ #include "mpir_handlemem.h" #endif /* expanded by -frewrite-includes */ # 228 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 229 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" /*****************************************************************************/ /******************** PART 6: DEVICE "POST" FUNCTIONALITY ********************/ /*****************************************************************************/ #if 0 /* expanded by -frewrite-includes */ #include "mpidpost.h" #endif /* expanded by -frewrite-includes */ # 234 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 235 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" /* avoid conflicts in source files with old-style "char FCNAME[]" vars */ #undef FUNCNAME #undef FCNAME #endif /* MPIIMPL_INCLUDED */ # 241 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 23 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpidftb.h" #endif /* expanded by -frewrite-includes */ # 24 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidftb.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPICH_FTB_H_INCLUDED #define MPICH_FTB_H_INCLUDED /* FTB events we can throw */ #define MPIDU_FTB_EV_OTHER "FTB_MPICH_OTHER" #define MPIDU_FTB_EV_RESOURCES "FTB_MPICH_RESOURCES" #define MPIDU_FTB_EV_UNREACHABLE "FTB_MPI_PROCS_UNREACHABLE" #define MPIDU_FTB_EV_COMMUNICATION "FTB_MPI_PROCS_COMM_ERROR" #define MPIDU_FTB_EV_ABORT "FTB_MPI_PROCS_ABORTED" #ifdef ENABLE_FTB struct MPIDI_VC; /* prototypes */ int MPIDU_Ftb_init(void); void MPIDU_Ftb_publish(const char *event_name, const char *event_payload); void MPIDU_Ftb_publish_vc(const char *event_name, struct MPIDI_VC *vc); void MPIDU_Ftb_publish_me(const char *event_name); void MPIDU_Ftb_finalize(void); #else /* ENABLE_FTB */ # 27 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidftb.h" #define MPIDU_Ftb_init() (MPI_SUCCESS) #define MPIDU_Ftb_publish(event_name, event_payload) do {} while(0) #define MPIDU_Ftb_publish_vc(event_name, vc) do {} while(0) #define MPIDU_Ftb_publish_me(event_name) do {} while(0) #define MPIDU_Ftb_finalize() do {} while(0) #endif /* ENABLE_FTB */ # 33 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidftb.h" #endif /* MPICH_FTB_H_INCLUDED */ # 35 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidftb.h" # 25 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" 2 /* Add the ch3 packet definitions */ #if 0 /* expanded by -frewrite-includes */ #include "mpidpkt.h" #endif /* expanded by -frewrite-includes */ # 27 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" # 28 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" #if !defined(MPIDI_IOV_DENSITY_MIN) # define MPIDI_IOV_DENSITY_MIN (16 * 1024) #endif # 32 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" #if defined(HAVE_GETHOSTNAME) && defined(NEEDS_GETHOSTNAME_DECL) && \ !defined(gethostname) int gethostname(char *name, size_t len); # endif # 37 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /* Default PMI version to use */ #define MPIDI_CH3I_DEFAULT_PMI_VERSION 1 #define MPIDI_CH3I_DEFAULT_PMI_SUBVERSION 1 /* group of processes detected to have failed. This is a subset of comm_world group. */ extern MPIR_Group *MPIDI_Failed_procs_group; extern int MPIDI_last_known_failed; extern char *MPIDI_failed_procs_string; extern int MPIDI_Use_pmi2_api; #if defined(MPL_USE_DBG_LOGGING) extern MPL_dbg_class MPIDI_CH3_DBG_CONNECT; extern MPL_dbg_class MPIDI_CH3_DBG_DISCONNECT; extern MPL_dbg_class MPIDI_CH3_DBG_PROGRESS; extern MPL_dbg_class MPIDI_CH3_DBG_CHANNEL; extern MPL_dbg_class MPIDI_CH3_DBG_OTHER; extern MPL_dbg_class MPIDI_CH3_DBG_MSG; extern MPL_dbg_class MPIDI_CH3_DBG_VC; extern MPL_dbg_class MPIDI_CH3_DBG_REFCOUNT; #endif /* MPL_USE_DBG_LOGGING */ # 60 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" #define MPIDI_CHANGE_VC_STATE(vc, new_state) do { \ MPL_DBG_VCSTATECHANGE(vc, VC_STATE_##new_state); \ (vc)->state = MPIDI_VC_STATE_##new_state; \ } while (0) /*S MPIDI_PG_t - Process group description Notes: Every 'MPI_COMM_WORLD' known to this process has an associated process group. S*/ typedef struct MPIDI_PG { /* MPIU_Object field. MPIDI_PG_t objects are not allocated using the MPIU_Object system, but we do use the associated reference counting routines. Therefore, handle must be present, but is not used except by debugging routines */ MPIR_OBJECT_HEADER; /* adds handle and ref_count fields */ /* Next pointer used to maintain a list of all process groups known to this process */ struct MPIDI_PG * next; /* Number of processes in the process group */ int size; /* VC table. At present this is a pointer to an array of VC structures. Someday we may want make this a pointer to an array of VC references. Thus, it is important to use MPIDI_PG_Get_vc() instead of directly referencing this field. */ struct MPIDI_VC * vct; /* Pointer to the process group ID. The actual ID is defined and allocated by the process group. The pointer is kept in the device space because it is necessary for the device to be able to find a particular process group. */ void * id; /* Flag to mark a procress group which is finalizing. This means thay the VCs for this process group are closing, (normally becuase MPI_Finalize was called). This is required to avoid a reconnection of the VCs when the PG is closed due to unused elements in the event queue */ int finalize; /* Replacement abstraction for connection information */ /* Connection information needed to access processes in this process group and to share the data with other processes. The items are connData - pointer for data used to implement these functions (e.g., a pointer to an array of process group info) getConnInfo( rank, buf, bufsize, self ) - function to store into buf the connection information for rank in this process group connInfoToString( buf_p, size, self ) - return in buf_p a string that can be sent to another process to recreate the connection information (the info needed to support getConnInfo) connInfoFromString( buf, self ) - setup the information needed to implement getConnInfo freeConnInfo( self ) - free any storage or resources associated with the connection information. See ch3/src/mpidi_pg.c */ void *connData; int (*getConnInfo)( int, char *, int, struct MPIDI_PG * ); int (*connInfoToString)( char **, int *, struct MPIDI_PG * ); int (*connInfoFromString)( const char *, struct MPIDI_PG * ); int (*freeConnInfo)( struct MPIDI_PG * ); /* Rather than have each channel define its own fields for the channel-specific data, we provide a fixed-sized scratchpad. Currently, this has a very generous size, though this may shrink later (a channel can always allocate storage and hang it off of the end). This is necessary to allow dynamic loading of channels at MPI_Init time. */ #define MPIDI_CH3_PG_SIZE 48 int32_t channel_private[MPIDI_CH3_PG_SIZE]; #if defined(MPIDI_CH3_PG_DECL) MPIDI_CH3_PG_DECL #endif # 142 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" } MPIDI_PG_t; /*S MPIDI_Process_t - The information required about this process by the CH3 device. S*/ typedef struct MPIDI_Process { MPIDI_PG_t * my_pg; int my_pg_rank; } MPIDI_Process_t; extern MPIDI_Process_t MPIDI_Process; /*---------------------- BEGIN DATATYPE SECTION ----------------------*/ /* FIXME: We want to avoid even storing information about the builtins if we can */ #define MPIDI_Datatype_get_info(count_, datatype_, dt_contig_out_, data_sz_out_, dt_ptr_, dt_true_lb_)\ { \ if (HANDLE_GET_KIND(datatype_) == HANDLE_KIND_BUILTIN) \ { \ (dt_ptr_) = NULL; \ (dt_contig_out_) = TRUE; \ (dt_true_lb_) = 0; \ (data_sz_out_) = (intptr_t) (count_) * MPIDU_Datatype_get_basic_size(datatype_); \ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER, TERSE, (MPL_DBG_FDEST,"basic datatype: dt_contig=%d, dt_sz=%d, data_sz=%" PRIdPTR, \ (dt_contig_out_), MPIDU_Datatype_get_basic_size(datatype_), (data_sz_out_)));\ } \ else \ { \ MPIDU_Datatype_get_ptr((datatype_), (dt_ptr_)); \ (dt_contig_out_) = (dt_ptr_)->is_contig; \ (data_sz_out_) = (intptr_t) (count_) * (dt_ptr_)->size; \ (dt_true_lb_) = (dt_ptr_)->true_lb; \ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER, TERSE, (MPL_DBG_FDEST, "user defined datatype: dt_contig=%d, dt_sz=" MPI_AINT_FMT_DEC_SPEC ", data_sz=%" PRIdPTR, \ (dt_contig_out_), (dt_ptr_)->size, (data_sz_out_)));\ } \ } /*-------------------- END DATATYPE SECTION --------------------*/ /*--------------------- BEGIN REQUEST SECTION ---------------------*/ /* * MPIR_Requests * * MPI Requests are handles to MPIR_Request structures. These are used * for most communication operations to provide a uniform way in which to * define pending operations. As such, they contain many fields that are * only used by some operations (logically, an MPIR_Request is a union type). * * There are several kinds of requests. They are * Send, Receive, RMA, User, Persistent * In addition, send and RMA requests may be "incomplete"; this means that * they have not sent their initial packet, and they may store additional * data about the operation that will be used when the initial packet * can be sent. * * Also, requests that are used internally within blocking MPI routines * (only Send and Receive requests) do not require references to * (or increments of the reference counts) communicators or datatypes. * Thus, freeing these requests also does not require testing or * decrementing these fields. * * Finally, we want to avoid multiple tests for a failure to allocate * a request. Thus, the request allocation macros will jump to fn_fail * if there is an error. This is akin to using a "throw" in C++. * * For example, a posted (unmatched) receive queue entry needs only: * match info * buffer info (address, count, datatype) * if nonblocking, communicator (used for finding error handler) * if nonblocking, cancelled state * Once matched, a receive queue entry also needs * actual match info * message type (eager, rndv, eager-sync) * completion state (is all data available) * If destination datatype is non-contiguous, it also needs * current unpack state. * An unexpected message (in the unexpected receive queue) needs only: * match info * message type (eager, rndv, eager-sync) * if (eager, eager-sync), data * completion state (is all data available?) * A send request requires only * message type (eager, rndv, eager-sync) * completion state (has all data been sent?) * canceled state * if nonblocking, communicator (used for finding error handler) * if the initial envelope is still pending (e.g., could not write yet) * match info * if the data is still pending (rndv or would not send eager) * buffer info (address, count, datatype) * RMA requests require (what)? * User (generalized) requests require * function pointers for operations * completion state * cancelled state */ /* FIXME XXX DJG for TLS hack */ #define MPIR_REQUEST_TLS_MAX 128 # define MPIDI_Request_tls_alloc(req_) \ do { \ (req_) = MPIR_Handle_obj_alloc(&MPIR_Request_mem); \ MPL_DBG_MSG_P(MPIDI_CH3_DBG_CHANNEL,VERBOSE, \ "allocated request, handle=0x%08x", req_);\ } while (0) /* If the channel doesn't initialize anything in the request, provide a dummy */ #ifndef MPIDI_CH3_REQUEST_INIT #define MPIDI_CH3_REQUEST_INIT(a_) #endif # 268 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /* FIXME: Why does a send request need the match information? Is that for debugging information? In case the initial envelope cannot be sent? Ditto for the dev.user_buf, count, and datatype fields when the data is sent eagerly. The following fields needed to be set: datatype_ptr status.MPI_ERROR Note that this macro requires that rank, tag, context_offset, comm, buf, datatype, and count all be available with those names (they are not arguments to the routine) */ #define MPIDI_Request_create_sreq(sreq_, mpi_errno_, FAIL_) \ { \ (sreq_) = MPIR_Request_create(MPIR_REQUEST_KIND__SEND); \ MPIR_Object_set_ref((sreq_), 2); \ (sreq_)->comm = comm; \ (sreq_)->dev.partner_request = NULL; \ MPIR_Comm_add_ref(comm); \ (sreq_)->dev.match.parts.rank = rank; \ (sreq_)->dev.match.parts.tag = tag; \ (sreq_)->dev.match.parts.context_id = comm->context_id + context_offset; \ (sreq_)->dev.user_buf = (void *) buf; \ (sreq_)->dev.user_count = count; \ (sreq_)->dev.datatype = datatype; \ (sreq_)->dev.iov_count = 0; \ } /* This is the receive request version of MPIDI_Request_create_sreq */ #define MPIDI_Request_create_rreq(rreq_, mpi_errno_, FAIL_) \ { \ (rreq_) = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED); \ MPIR_Object_set_ref((rreq_), 2); \ (rreq_)->kind = MPIR_REQUEST_KIND__RECV; \ (rreq_)->dev.partner_request = NULL; \ } /* creates a new, trivially complete recv request that is suitable for * returning when a user passed MPI_PROC_NULL */ #define MPIDI_Request_create_null_rreq(rreq_, mpi_errno_, FAIL_) \ do { \ (rreq_) = MPIR_Request_create(MPIR_REQUEST_KIND__UNDEFINED); \ if ((rreq_) != NULL) { \ MPIR_Object_set_ref((rreq_), 1); \ /* MT FIXME should these be handled by MPIR_Request_create? */ \ MPIR_cc_set(&(rreq_)->cc, 0); \ (rreq_)->kind = MPIR_REQUEST_KIND__RECV; \ MPIR_Status_set_procnull(&(rreq_)->status); \ } \ else { \ MPL_DBG_MSG(MPIDI_CH3_DBG_CHANNEL,TYPICAL,"unable to allocate a request");\ (mpi_errno_) = MPIR_ERR_MEMALLOCFAILED; \ FAIL_; \ } \ } while (0) #define MPIDI_REQUEST_MSG_MASK (0x3 << MPIDI_REQUEST_MSG_SHIFT) #define MPIDI_REQUEST_MSG_SHIFT 0 #define MPIDI_REQUEST_NO_MSG 0 #define MPIDI_REQUEST_EAGER_MSG 1 #define MPIDI_REQUEST_RNDV_MSG 2 #define MPIDI_REQUEST_SELF_MSG 3 #define MPIDI_Request_get_msg_type(req_) \ (((req_)->dev.state & MPIDI_REQUEST_MSG_MASK) >> MPIDI_REQUEST_MSG_SHIFT) #define MPIDI_Request_set_msg_type(req_, msgtype_) \ { \ (req_)->dev.state &= ~MPIDI_REQUEST_MSG_MASK; \ (req_)->dev.state |= ((msgtype_) << MPIDI_REQUEST_MSG_SHIFT) & MPIDI_REQUEST_MSG_MASK;\ } #define MPIDI_REQUEST_SRBUF_MASK (0x1 << MPIDI_REQUEST_SRBUF_SHIFT) #define MPIDI_REQUEST_SRBUF_SHIFT 2 #define MPIDI_Request_get_srbuf_flag(req_) \ (((req_)->dev.state & MPIDI_REQUEST_SRBUF_MASK) >> MPIDI_REQUEST_SRBUF_SHIFT) #define MPIDI_Request_set_srbuf_flag(req_, flag_) \ { \ (req_)->dev.state &= ~MPIDI_REQUEST_SRBUF_MASK; \ (req_)->dev.state |= ((flag_) << MPIDI_REQUEST_SRBUF_SHIFT) & MPIDI_REQUEST_SRBUF_MASK; \ } #define MPIDI_REQUEST_SYNC_SEND_MASK (0x1 << MPIDI_REQUEST_SYNC_SEND_SHIFT) #define MPIDI_REQUEST_SYNC_SEND_SHIFT 3 #define MPIDI_Request_get_sync_send_flag(req_) \ (((req_)->dev.state & MPIDI_REQUEST_SYNC_SEND_MASK) >> MPIDI_REQUEST_SYNC_SEND_SHIFT) #define MPIDI_Request_set_sync_send_flag(req_, flag_) \ { \ (req_)->dev.state &= ~MPIDI_REQUEST_SYNC_SEND_MASK; \ (req_)->dev.state |= ((flag_) << MPIDI_REQUEST_SYNC_SEND_SHIFT) & MPIDI_REQUEST_SYNC_SEND_MASK;\ } #define MPIDI_REQUEST_TYPE_MASK (0xF << MPIDI_REQUEST_TYPE_SHIFT) #define MPIDI_REQUEST_TYPE_SHIFT 4 #define MPIDI_REQUEST_TYPE_RECV 0 #define MPIDI_REQUEST_TYPE_SEND 1 #define MPIDI_REQUEST_TYPE_RSEND 2 #define MPIDI_REQUEST_TYPE_SSEND 3 /* We need a BSEND type for persistent bsends (see mpid_startall.c) */ #define MPIDI_REQUEST_TYPE_BSEND 4 #define MPIDI_REQUEST_TYPE_PUT_RECV 5 /* target is receiving PUT data */ #define MPIDI_REQUEST_TYPE_GET_RESP 6 /* target is sending GET response data */ #define MPIDI_REQUEST_TYPE_ACCUM_RECV 7 /* target is receiving ACC data */ #define MPIDI_REQUEST_TYPE_PUT_RECV_DERIVED_DT 8 /* target is receiving derived DT info for PUT data */ #define MPIDI_REQUEST_TYPE_GET_RECV_DERIVED_DT 9 /* target is receiving derived DT info for GET data */ #define MPIDI_REQUEST_TYPE_ACCUM_RECV_DERIVED_DT 10 /* target is receiving derived DT info for ACC data */ #define MPIDI_REQUEST_TYPE_GET_ACCUM_RECV 11 /* target is receiving GACC data */ #define MPIDI_REQUEST_TYPE_GET_ACCUM_RECV_DERIVED_DT 12 /* target is receiving derived DT info for GACC data */ #define MPIDI_REQUEST_TYPE_GET_ACCUM_RESP 13 /* target is sending GACC response data */ #define MPIDI_REQUEST_TYPE_FOP_RECV 14 /* target is receiving FOP data */ #define MPIDI_REQUEST_TYPE_FOP_RESP 15 /* target is sending FOP response data */ #define MPIDI_Request_get_type(req_) \ (((req_)->dev.state & MPIDI_REQUEST_TYPE_MASK) >> MPIDI_REQUEST_TYPE_SHIFT) #define MPIDI_Request_set_type(req_, type_) \ { \ (req_)->dev.state &= ~MPIDI_REQUEST_TYPE_MASK; \ (req_)->dev.state |= ((type_) << MPIDI_REQUEST_TYPE_SHIFT) & MPIDI_REQUEST_TYPE_MASK;\ } /* NOTE: Request updates may require atomic ops (critical sections) if a fine-grain thread-sync model is used. */ #define MPIDI_Request_cancel_pending(req_, flag_) \ { \ *(flag_) = (req_)->dev.cancel_pending; \ (req_)->dev.cancel_pending = TRUE; \ } /* the following two macros were formerly a single confusing macro with side effects named MPIDI_Request_recv_pending() */ #define MPIDI_Request_check_pending(req_, recv_pending_) \ do { \ *(recv_pending_) = (req_)->dev.recv_pending_count; \ } while (0) #define MPIDI_Request_decr_pending(req_) \ do { \ --(req_)->dev.recv_pending_count; \ } while (0) /* MPIDI_Request_fetch_and_clear_rts_sreq() - atomically fetch current partner RTS sreq and nullify partner request */ #define MPIDI_Request_fetch_and_clear_rts_sreq(sreq_, rts_sreq_) \ { \ *(rts_sreq_) = (sreq_)->dev.partner_request; \ (sreq_)->dev.partner_request = NULL; \ } /* FIXME: We've moved to allow finer-grain critical sections... */ /* Note: In the current implementation, the mpid_xsend.c routines that make use of MPIDI_VC_FAI_send_seqnum are all protected by the SINGLE_CS_ENTER/EXIT macros, so all uses of this macro are alreay within a critical section when needed. If/when we move to a finer-grain model, we'll need to examine whether this requires a separate lock. */ #if defined(MPID_USE_SEQUENCE_NUMBERS) # define MPIDI_Request_set_seqnum(req_, seqnum_) \ { \ (req_)->dev.seqnum = (seqnum_); \ } # define MPIDI_VC_FAI_send_seqnum(vc_, seqnum_out_) \ { \ (seqnum_out_) = (vc_)->seqnum_send++; \ } # define MPIDI_Pkt_set_seqnum(pkt_, seqnum_) \ { \ (pkt_)->seqnum = (seqnum_); \ } # define MPIDI_VC_Init_seqnum_send(vc_) \ { \ (vc_)->seqnum_send = 0; \ } #else # 449 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" # define MPIDI_Request_set_seqnum(req_, seqnum_) # define MPIDI_VC_FAI_send_seqnum(vc_, seqnum_out_) # define MPIDI_Pkt_set_seqnum(pkt_, seqnum_) # define MPIDI_VC_Init_seqnum_send(vc_) #endif # 454 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /*------------------- END REQUEST SECTION -------------------*/ /*------------------ BEGIN COMM SECTION ------------------*/ #define MPIDI_Comm_get_vc(comm_, rank_, vcp_) *(vcp_) = (comm_)->dev.vcrt->vcr_table[(rank_)] #ifdef USE_MPIDI_DBG_PRINT_VC void MPIDI_DBG_PrintVC(MPIDI_VC_t *vc); void MPIDI_DBG_PrintVCState2(MPIDI_VC_t *vc, MPIDI_VC_State_t new_state); void MPIDI_DBG_PrintVCState(MPIDI_VC_t *vc); #else # 471 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" #define MPIDI_DBG_PrintVC(vc) #define MPIDI_DBG_PrintVCState2(vc, new_state) #define MPIDI_DBG_PrintVCState(vc) #endif # 475 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" #define MPIDI_Comm_get_vc_set_active(comm_, rank_, vcp_) do { \ *(vcp_) = (comm_)->dev.vcrt->vcr_table[(rank_)]; \ if ((*(vcp_))->state == MPIDI_VC_STATE_INACTIVE) \ { \ MPIDI_DBG_PrintVCState2(*(vcp_), MPIDI_VC_STATE_ACTIVE); \ MPIDI_CHANGE_VC_STATE((*(vcp_)), ACTIVE); \ } \ } while(0) /*---------------- END COMM SECTION ----------------*/ /*-------------------- BEGIN PACKET SECTION --------------------*/ #if !defined(MPICH_DEBUG_MEMINIT) # define MPIDI_Pkt_init(pkt_, type_) \ { \ (pkt_)->type = (type_); \ } #else # 499 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" # define MPIDI_Pkt_init(pkt_, type_) \ { \ memset((void *) (pkt_), 0xfc, sizeof(MPIDI_CH3_Pkt_t)); \ (pkt_)->type = (type_); \ } #endif # 505 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /*------------------ END PACKET SECTION ------------------*/ /*--------------------------- BEGIN PROCESS GROUP SECTION ---------------------------*/ /* FIXME: Determine which of these functions should be exported to all of the MPICH routines and which are internal to the device implementation */ typedef int (*MPIDI_PG_Compare_ids_fn_t)(void * id1, void * id2); typedef int (*MPIDI_PG_Destroy_fn_t)(MPIDI_PG_t * pg); int MPIDI_VCRT_Create(int size, struct MPIDI_VCRT **vcrt_ptr); int MPIDI_VCRT_Add_ref(struct MPIDI_VCRT *vcrt); int MPIDI_VCRT_Release(struct MPIDI_VCRT *vcrt, int isDisconnect); int MPIDI_VCR_Dup(MPIDI_VCR orig_vcr, MPIDI_VCR * new_vcr); int MPIDI_PG_Init( int *, char ***, MPIDI_PG_Compare_ids_fn_t, MPIDI_PG_Destroy_fn_t); int MPIDI_PG_Finalize(void); int MPIDI_PG_Create(int vct_sz, void * pg_id, MPIDI_PG_t ** ppg); int MPIDI_PG_Destroy(MPIDI_PG_t * pg); int MPIDI_PG_Find(void * id, MPIDI_PG_t ** pgp); int MPIDI_PG_Id_compare(void *id1, void *id2); /* Always use the MPIDI_PG_iterator type, never its expansion. Otherwise it will be difficult to make any changes later. */ typedef MPIDI_PG_t * MPIDI_PG_iterator; /* 'iter' is similar to 'saveptr' in strtok_r */ int MPIDI_PG_Get_iterator(MPIDI_PG_iterator *iter); int MPIDI_PG_Has_next(MPIDI_PG_iterator *iter); int MPIDI_PG_Get_next(MPIDI_PG_iterator *iter, MPIDI_PG_t **pgp); int MPIDI_PG_Close_VCs( void ); int MPIDI_PG_InitConnKVS( MPIDI_PG_t * ); int MPIDI_PG_GetConnKVSname( char ** ); int MPIDI_PG_InitConnString( MPIDI_PG_t * ); int MPIDI_PG_GetConnString( MPIDI_PG_t *, int, char *, int ); int MPIDI_PG_Dup_vcr( MPIDI_PG_t *, int, struct MPIDI_VC ** ); int MPIDI_PG_Get_size(MPIDI_PG_t * pg); void MPIDI_PG_IdToNum( MPIDI_PG_t *, int * ); int MPIU_PG_Printall( FILE * ); int MPIDI_PG_CheckForSingleton( void ); /* CH3_PG_Init allows the channel to pre-initialize the process group */ int MPIDI_CH3_PG_Init( MPIDI_PG_t * ); #define MPIDI_PG_add_ref(pg_) \ do { \ MPIR_Object_add_ref(pg_); \ } while (0) #define MPIDI_PG_release_ref(pg_, inuse_) \ do { \ MPIR_Object_release_ref(pg_, inuse_); \ } while (0) #define MPIDI_PG_Get_vc(pg_, rank_, vcp_) *(vcp_) = &(pg_)->vct[rank_] #define MPIDI_PG_Get_vc_set_active(pg_, rank_, vcp_) do { \ *(vcp_) = &(pg_)->vct[rank_]; \ if ((*(vcp_))->state == MPIDI_VC_STATE_INACTIVE) \ { \ MPIDI_DBG_PrintVCState2(*(vcp_), MPIDI_VC_STATE_ACTIVE); \ MPIDI_CHANGE_VC_STATE((*(vcp_)), ACTIVE); \ } \ } while(0) #define MPIDI_PG_Get_size(pg_) ((pg_)->size) #ifdef MPIDI_DEV_IMPLEMENTS_KVS int MPIDI_PG_To_string(MPIDI_PG_t *pg_ptr, char **str_ptr, int *); int MPIDI_PG_Create_from_string(const char * str, MPIDI_PG_t ** pg_pptr, int *flag); #endif # 582 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /*------------------------- END PROCESS GROUP SECTION -------------------------*/ /*-------------------------------- BEGIN VIRTUAL CONNECTION SECTION --------------------------------*/ /*E MPIDI_VC_State - States for a virtual connection. Notes: A closed connection is placed into 'STATE_INACTIVE'. (is this true?) E*/ typedef enum MPIDI_VC_State { MPIDI_VC_STATE_INACTIVE=1, /* Comm either hasn't started or has completed. */ MPIDI_VC_STATE_ACTIVE, /* Comm has started and hasn't completed */ MPIDI_VC_STATE_LOCAL_CLOSE, /* Local side has initiated close protocol */ MPIDI_VC_STATE_REMOTE_CLOSE, /* Remote side has initiated close protocol */ MPIDI_VC_STATE_CLOSE_ACKED, /* Both have initiated close, we have acknowledged remote side */ MPIDI_VC_STATE_CLOSED, /* Both have initiated close, both have acked */ MPIDI_VC_STATE_INACTIVE_CLOSED, /* INACTIVE VCs are moved to this state in Finalize */ MPIDI_VC_STATE_MORIBUND /* Abnormally terminated, there may be unsent/unreceived msgs */ } MPIDI_VC_State_t; struct MPIR_Comm; #ifdef ENABLE_COMM_OVERRIDES typedef struct MPIDI_Comm_ops { /* Overriding calls in case of matching-capable interfaces */ int (*recv_posted)(struct MPIDI_VC *vc, struct MPIR_Request *req); int (*send)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm, int context_offset, struct MPIR_Request **request); int (*rsend)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm, int context_offset, struct MPIR_Request **request); int (*ssend)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm, int context_offset, struct MPIR_Request **request ); int (*isend)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm, int context_offset, struct MPIR_Request **request ); int (*irsend)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm, int context_offset, struct MPIR_Request **request ); int (*issend)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm, int context_offset, struct MPIR_Request **request ); int (*send_init)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm, int context_offset, struct MPIR_Request **request ); int (*bsend_init)(struct MPIDI_VC *vc, const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm, int context_offset, struct MPIR_Request **request); int (*rsend_init)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm, int context_offset, struct MPIR_Request **request ); int (*ssend_init)(struct MPIDI_VC *vc, const void *buf, MPI_Aint count, MPI_Datatype datatype, int dest, int tag, MPIR_Comm *comm, int context_offset, struct MPIR_Request **request ); int (*startall)(struct MPIDI_VC *vc, int count, struct MPIR_Request *requests[]); int (*cancel_send)(struct MPIDI_VC *vc, struct MPIR_Request *sreq); int (*cancel_recv)(struct MPIDI_VC *vc, struct MPIR_Request *rreq); int (*probe)(struct MPIDI_VC *vc, int source, int tag, MPIR_Comm *comm, int context_offset, MPI_Status *status); int (*iprobe)(struct MPIDI_VC *vc, int source, int tag, MPIR_Comm *comm, int context_offset, int *flag, MPI_Status *status); int (*improbe)(struct MPIDI_VC *vc, int source, int tag, MPIR_Comm *comm, int context_offset, int *flag, MPIR_Request **message, MPI_Status *status); int (*imrecv)(struct MPIDI_VC *vc, struct MPIR_Request *req); } MPIDI_Comm_ops_t; extern int (*MPIDI_Anysource_iprobe_fn)(int tag, MPIR_Comm * comm, int context_offset, int *flag, MPI_Status * status); extern int (*MPIDI_Anysource_improbe_fn)(int tag, MPIR_Comm * comm, int context_offset, int *flag, MPIR_Request **message, MPI_Status * status); #endif # 667 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" typedef struct MPIDI_VC { /* XXX - need better comment */ /* MPIU_Object fields. MPIDI_VC_t objects are not allocated using the MPIU_Object system, but we do use the associated reference counting routines. The handle value is required when debugging objects (the handle kind is used in reporting on changes to the object). */ MPIR_OBJECT_HEADER; /* adds handle and ref_count fields */ /* state of the VC */ MPIDI_VC_State_t state; /* Process group to which this VC belongs */ struct MPIDI_PG * pg; /* Rank of the process in that process group associated with this VC */ int pg_rank; /* Local process ID */ int lpid; /* The node id of this process, used for topologically aware collectives. */ MPID_Node_id_t node_id; /* port name tag */ int port_name_tag; /* added to handle dynamic process mgmt */ #ifndef MPIDI_CH3_HAS_NO_DYNAMIC_PROCESS void *connreq_obj; /* pointer to dynamic connection mgmt object */ #endif # 700 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" #if defined(MPID_USE_SEQUENCE_NUMBERS) /* Sequence number of the next packet to be sent */ MPID_Seqnum_t seqnum_send; #endif # 705 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" #if defined(MPIDI_CH3_MSGS_UNORDERED) /* Sequence number of the next packet we expect to receive */ MPID_Seqnum_t seqnum_recv; /* Queue for holding packets received out of order. NOTE: the CH3 device only orders packets. Handling of out-of-order data is the responsibility of the channel. */ MPIDI_CH3_Pkt_send_container_t * msg_reorder_queue; #endif # 715 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /* rendezvous function pointers. Called to send a rendevous message or when one is matched */ int (* rndvSend_fn)( struct MPIR_Request **sreq_p, const void * buf, MPI_Aint count, MPI_Datatype datatype, int dt_contig, intptr_t data_sz, MPI_Aint dt_true_lb, int rank, int tag, struct MPIR_Comm * comm, int context_offset ); int (* rndvRecv_fn)( struct MPIDI_VC * vc, struct MPIR_Request *rreq ); /* eager message threshold */ int eager_max_msg_sz; /* eager message threshold for ready sends. -1 means there's no limit */ int ready_eager_max_msg_sz; /* noncontiguous send function pointer. Called to send a noncontiguous message. Caller must initialize sreq->dev.segment, _first and _size. Contiguous messages are called directly from CH3 and cannot be overridden. */ int (* sendNoncontig_fn)( struct MPIDI_VC *vc, struct MPIR_Request *sreq, void *header, intptr_t hdr_sz ); #ifdef ENABLE_COMM_OVERRIDES MPIDI_Comm_ops_t *comm_ops; #endif # 739 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" # if defined(MPIDI_CH3_VC_DECL) MPIDI_CH3_VC_DECL # endif # 743 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" } MPIDI_VC_t; typedef enum MPIDI_VC_Event { MPIDI_VC_EVENT_TERMINATED } MPIDI_VC_Event_t; /*S * MPIDI_VCRT - virtual connection reference table * * handle - this element is not used, but exists so that we may use the * MPIU_Object routines for reference counting * * ref_count - number of references to this table * * vcr_table - array of virtual connection references S*/ typedef struct MPIDI_VCRT { MPIR_OBJECT_HEADER; /* adds handle and ref_count fields */ int size; MPIDI_VC_t * vcr_table[1]; } MPIDI_VCRT_t; /* number of VCs that are in MORIBUND state */ extern int MPIDI_Failed_vc_count; /* Initialize a new VC */ int MPIDI_VC_Init( MPIDI_VC_t *, MPIDI_PG_t *, int ); #if defined(MPIDI_CH3_MSGS_UNORDERED) # define MPIDI_VC_Init_seqnum_recv(vc_); \ { \ (vc_)->seqnum_recv = 0; \ (vc_)->msg_reorder_queue = NULL; \ } #else # 783 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" # define MPIDI_VC_Init_seqnum_recv(vc_); #endif # 785 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" #define MPIDI_VC_add_ref( _vc ) \ do { MPIR_Object_add_ref( _vc ); } while (0) #define MPIDI_VC_release_ref( _vc, _inuse ) \ do { MPIR_Object_release_ref( _vc, _inuse ); } while (0) /*------------------------------ END VIRTUAL CONNECTION SECTION ------------------------------*/ /*--------------------------------- BEGIN SEND/RECEIVE BUFFER SECTION ---------------------------------*/ #if !defined(MPIDI_CH3U_Offsetof) # define MPIDI_CH3U_Offsetof(struct_, field_) ((MPI_Aint) &((struct_*)0)->field_) #endif # 804 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" #if !defined(MPIDI_CH3U_SRBuf_size) # define MPIDI_CH3U_SRBuf_size (256 * 1024) #endif # 808 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" typedef struct __MPIDI_CH3U_SRBuf_element { /* Keep the buffer at the top to help keep the memory alignment */ char buf[MPIDI_CH3U_SRBuf_size]; struct __MPIDI_CH3U_SRBuf_element * next; } MPIDI_CH3U_SRBuf_element_t; extern MPIDI_CH3U_SRBuf_element_t * MPIDI_CH3U_SRBuf_pool; #if !defined (MPIDI_CH3U_SRBuf_get) # define MPIDI_CH3U_SRBuf_get(req_) \ { \ MPIDI_CH3U_SRBuf_element_t * tmp; \ if (!MPIDI_CH3U_SRBuf_pool) { \ MPIDI_CH3U_SRBuf_pool = \ MPL_malloc(sizeof(MPIDI_CH3U_SRBuf_element_t)); \ MPIDI_CH3U_SRBuf_pool->next = NULL; \ } \ tmp = MPIDI_CH3U_SRBuf_pool; \ MPIDI_CH3U_SRBuf_pool = MPIDI_CH3U_SRBuf_pool->next; \ tmp->next = NULL; \ (req_)->dev.tmpbuf = tmp->buf; \ } #endif # 832 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" #if !defined (MPIDI_CH3U_SRBuf_free) # define MPIDI_CH3U_SRBuf_free(req_) \ { \ MPIDI_CH3U_SRBuf_element_t * tmp; \ MPIR_Assert(MPIDI_Request_get_srbuf_flag(req_)); \ MPIDI_Request_set_srbuf_flag((req_), FALSE); \ tmp = (MPIDI_CH3U_SRBuf_element_t *) (((MPI_Aint) ((req_)->dev.tmpbuf)) - \ ((MPI_Aint) MPIDI_CH3U_Offsetof(MPIDI_CH3U_SRBuf_element_t, buf))); \ tmp->next = MPIDI_CH3U_SRBuf_pool; \ MPIDI_CH3U_SRBuf_pool = tmp; \ } #endif # 845 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" #if !defined(MPIDI_CH3U_SRBuf_alloc) # define MPIDI_CH3U_SRBuf_alloc(req_, size_) \ { \ MPIDI_CH3U_SRBuf_get(req_); \ if ((req_)->dev.tmpbuf != NULL) \ { \ (req_)->dev.tmpbuf_sz = MPIDI_CH3U_SRBuf_size; \ MPIDI_Request_set_srbuf_flag((req_), TRUE); \ } \ else \ { \ (req_)->dev.tmpbuf_sz = 0; \ } \ } #endif # 861 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /*------------------------------- END SEND/RECEIVE BUFFER SECTION -------------------------------*/ /* define ACC stream size as the SRBuf size */ #if !defined(MPIDI_CH3U_Acc_stream_size) #define MPIDI_CH3U_Acc_stream_size MPIDI_CH3U_SRBuf_size #endif # 869 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /*---------------------------- BEGIN DEBUGGING TOOL SECTION ----------------------------*/ /* If there is no support for dynamic processes, there will be no channel-specific connection state */ #ifdef MPL_USE_DBG_LOGGING #ifdef MPIDI_CH3_HAS_NO_DYNAMIC_PROCESS #define MPIDI_CH3_VC_GetStateString( _c ) "none" #else # 881 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /* FIXME: This duplicates a value in util/sock/ch3usock.h */ const char *MPIDI_CH3_VC_GetStateString(struct MPIDI_VC *); const char *MPIDI_CH3_VC_SockGetStateString(struct MPIDI_VC *); #endif # 885 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /* These tw routines are in mpidi_pg.c and are used to print the connection string (which is attached to a process group) */ int MPIDI_PrintConnStr( const char *file, int line, const char *label, const char *str ); int MPIDI_PrintConnStrToFile( FILE *fd, const char *file, int line, const char *label, const char *str ); #endif # 893 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /* These macros simplify and unify the debugging of changes in the connection state MPL_DBG_VCSTATECHANGE(vc,newstate) - use when changing the state of a VC MPL_DBG_VCCHSTATECHANGE(vc,newstate) - use when changing the state of the channel-specific part of the vc (e.g., vc->ch.state) MPL_DBG_CONNSTATECHANGE(vc,conn,newstate ) - use when changing the state of a conn. vc may be null MPL_DBG_CONNSTATECHANGEMSG(vc,conn,newstate,msg ) - use when changing the state of a conn. vc may be null. Like CONNSTATECHANGE, but allows an additional message MPL_DBG_PKT(conn,pkt,msg) - print out a short description of an packet being sent/received on the designated connection, prefixed with msg. */ #define MPL_DBG_VCSTATECHANGE(_vc,_newstate) do { \ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CONNECT,TYPICAL,(MPL_DBG_FDEST, \ "vc=%p: Setting state (vc) from %s to %s, vcchstate is %s", \ _vc, MPIDI_VC_GetStateString((_vc)->state), \ #_newstate, MPIDI_CH3_VC_GetStateString( (_vc) ))); \ } while (0) #define MPL_DBG_VCCHSTATECHANGE(_vc,_newstate) \ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CONNECT,TYPICAL,(MPL_DBG_FDEST, \ "vc=%p: Setting state (ch) from %s to %s, vc state is %s", \ _vc, MPIDI_CH3_VC_GetStateString((_vc)), \ #_newstate, MPIDI_VC_GetStateString( (_vc)->state )) ) #define MPL_DBG_CONNSTATECHANGE(_vc,_conn,_newstate) \ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CONNECT,TYPICAL,(MPL_DBG_FDEST, \ "vc=%p,conn=%p: Setting state (conn) from %s to %s, vcstate = %s", \ _vc, _conn, \ MPIDI_Conn_GetStateString((_conn)->state), #_newstate, \ _vc ? MPIDI_VC_GetStateString((_vc)->state) : "" )) #define MPL_DBG_CONNSTATECHANGE_MSG(_vc,_conn,_newstate,_msg) \ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CONNECT,TYPICAL,(MPL_DBG_FDEST, \ "vc=%p,conn=%p: Setting conn state from %s to %s, vcstate = %s %s", \ _vc, _conn, \ MPIDI_Conn_GetStateString((_conn)->state), #_newstate, \ _vc ? MPIDI_VC_GetStateString((_vc)->state) : "", _msg )) #define MPL_DBG_VCUSE(_vc,_msg) \ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_CONNECT,TYPICAL,(MPL_DBG_FDEST,\ "vc=%p: Using vc for %s", _vc, _msg )) #define MPL_DBG_PKT(_conn,_pkt,_msg) \ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_OTHER,TYPICAL,(MPL_DBG_FDEST,\ "conn=%p: %s %s", _conn, _msg, MPIDI_Pkt_GetDescString( _pkt ) )) const char *MPIDI_Pkt_GetDescString( MPIDI_CH3_Pkt_t *pkt ); /* These macros help trace communication headers */ #define MPL_DBG_MSGPKT(_vc,_tag,_contextid,_dest,_size,_kind) \ MPL_DBG_MSG_FMT(MPIDI_CH3_DBG_MSG,TYPICAL,(MPL_DBG_FDEST,\ "%s: vc=%p, tag=%d, context=%d, dest=%d, datasz=%" PRIdPTR,\ _kind,_vc,_tag,_contextid,_dest,_size) ) /* FIXME: Switch this to use the common debug code */ void MPIDI_err_printf(char *, char *, ...); /* FIXME: This does not belong here */ #ifdef USE_MPIDI_DBG_PRINT_VC extern char *MPIDI_DBG_parent_str; #endif # 963 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" #define MPIDI_ERR_PRINTF(e) MPIDI_err_printf e #if defined(HAVE_MACRO_VA_ARGS) # define MPIDI_err_printf(func, fmt, ...) \ { \ MPL_error_printf("[%d] ERROR - %s(): " fmt "\n", MPIR_Process.comm_world->rank, func, __VA_ARGS__); \ fflush(stdout); \ } #endif # 973 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /* This is used to quote a name in a definition (see FUNCNAME/FCNAME below) */ #define MPL_QUOTE(A) MPL_QUOTE2(A) #define MPL_QUOTE2(A) #A #ifdef MPICH_DBG_OUTPUT void MPIDI_DBG_Print_packet(MPIDI_CH3_Pkt_t *pkt); #else # 981 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" # define MPIDI_DBG_Print_packet(a) #endif # 983 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /* Given a state, return the string for this state (VC's and connections) */ const char * MPIDI_VC_GetStateString(int); /*-------------------------- END DEBUGGING TOOL SECTION --------------------------*/ /* Prototypes for internal device routines */ int MPIDI_Isend_self(const void *, MPI_Aint, MPI_Datatype, int, int, MPIR_Comm *, int, int, MPIR_Request **); /*-------------------------- BEGIN MPI PORT SECTION --------------------------*/ /* These are the default functions */ int MPIDI_Comm_connect(const char *, MPIR_Info *, int, MPIR_Comm *, MPIR_Comm **); int MPIDI_Comm_accept(const char *, MPIR_Info *, int, MPIR_Comm *, MPIR_Comm **); int MPIDI_Comm_spawn_multiple(int, char **, char ***, const int *, MPIR_Info **, int, MPIR_Comm *, MPIR_Comm **, int *); /* This structure defines a module that handles the routines that work with MPI port names */ typedef struct MPIDI_Port_Ops { int (*OpenPort)( MPIR_Info *, char * ); int (*ClosePort)( const char * ); int (*CommAccept)( const char *, MPIR_Info *, int, MPIR_Comm *, MPIR_Comm ** ); int (*CommConnect)( const char *, MPIR_Info *, int, MPIR_Comm *, MPIR_Comm ** ); } MPIDI_PortFns; #define MPIDI_PORTFNS_VERSION 1 int MPIDI_CH3_PortFnsInit( MPIDI_PortFns * ); #ifndef MPIDI_CH3_HAS_NO_DYNAMIC_PROCESS /* Utility routines provided in src/ch3u_port.c for working with connection queues */ int MPIDI_CH3I_Acceptq_enqueue(MPIDI_VC_t * vc, int port_name_tag); int MPIDI_Port_finalize(void); int MPIDI_CH3I_Port_init(int port_name_tag); int MPIDI_CH3I_Port_destroy(int port_name_tag); #else # 1028 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /* Need empty symbols to avoid failure at compile time if defined * MPIDI_CH3_HAS_NO_DYNAMIC_PROCESS. */ #define MPIDI_CH3I_Acceptq_enqueue(vc, port_name_tag) (MPI_SUCCESS) #define MPIDI_Port_finalize() (MPI_SUCCESS) #define MPIDI_CH3I_Port_init(port_name_tag) (MPI_SUCCESS) #define MPIDI_CH3I_Port_destroy(port_name_tag) (MPI_SUCCESS) #endif # 1036 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /*-------------------------- END MPI PORT SECTION --------------------------*/ #define MPIDI_MAX_KVS_VALUE_LEN 4096 /* ------------------------------------------------------------------------- */ /* mpirma.h (in src/mpi/rma?) */ /* ------------------------------------------------------------------------- */ int MPIDI_RMA_init(void); void MPIDI_RMA_finalize(void); /* The Win_fns table contains pointers to the channel's implementation of the * RMA window creation routines. The channel must provide the init function, * which can optionally override any defaults already set by CH3. */ typedef struct { int (*create)(void *, MPI_Aint, int, MPIR_Info *, MPIR_Comm *, MPIR_Win **); int (*allocate)(MPI_Aint, int, MPIR_Info *, MPIR_Comm *, void *, MPIR_Win **); int (*allocate_shared)(MPI_Aint, int, MPIR_Info *, MPIR_Comm *, void *, MPIR_Win **); int (*allocate_shm)(MPI_Aint, int, MPIR_Info *, MPIR_Comm *, void *, MPIR_Win **); int (*create_dynamic)(MPIR_Info *, MPIR_Comm *, MPIR_Win **); int (*detect_shm)(MPIR_Win **); int (*gather_info)(void *, MPI_Aint, int, MPIR_Info *, MPIR_Comm *, MPIR_Win **); int (*shared_query)(MPIR_Win *, int, MPI_Aint *, int *, void *); } MPIDI_CH3U_Win_fns_t; extern MPIDI_CH3U_Win_fns_t MPIDI_CH3U_Win_fns; typedef struct { int (*win_init)(MPI_Aint, int, int, int, MPIR_Info *, MPIR_Comm *, MPIR_Win **); int (*win_free)(MPIR_Win **); } MPIDI_CH3U_Win_hooks_t; extern MPIDI_CH3U_Win_hooks_t MPIDI_CH3U_Win_hooks; typedef struct MPIDI_CH3U_Win_pkt_ordering { /* Ordered AM flush. * It means whether AM flush is guaranteed to be finished after all previous * RMA operations. It initialized by Nemesis and used by CH3. * Note that we use single global flag for all targets including both * intra-node and inter-node processes.*/ int am_flush_ordered; } MPIDI_CH3U_Win_pkt_ordering_t; extern MPIDI_CH3U_Win_pkt_ordering_t MPIDI_CH3U_Win_pkt_orderings; /* CH3 and Channel window functions initializers */ int MPIDI_Win_fns_init(MPIDI_CH3U_Win_fns_t *win_fns); int MPIDI_CH3_Win_fns_init(MPIDI_CH3U_Win_fns_t *win_fns); /* Channel window hooks initializer */ int MPIDI_CH3_Win_hooks_init(MPIDI_CH3U_Win_hooks_t *win_hooks); int MPIDI_CH3_Win_pkt_orderings_init(MPIDI_CH3U_Win_pkt_ordering_t * win_pkt_orderings); /* Default window creation functions provided by CH3 */ int MPIDI_CH3U_Win_create(void *, MPI_Aint, int, MPIR_Info *, MPIR_Comm *, MPIR_Win **); int MPIDI_CH3U_Win_allocate(MPI_Aint size, int disp_unit, MPIR_Info *info, MPIR_Comm *comm, void *baseptr, MPIR_Win **win); int MPIDI_CH3U_Win_allocate_no_shm(MPI_Aint size, int disp_unit, MPIR_Info *info, MPIR_Comm *comm_ptr, void *baseptr, MPIR_Win **win_ptr); int MPIDI_CH3U_Win_create_dynamic(MPIR_Info *info, MPIR_Comm *comm, MPIR_Win **win); int MPIDI_CH3U_Win_shared_query(MPIR_Win * win_ptr, int target_rank, MPI_Aint * size, int *disp_unit, void *baseptr); /* MPI RMA Utility functions */ int MPIDI_CH3U_Win_gather_info(void *, MPI_Aint, int, MPIR_Info *, MPIR_Comm *, MPIR_Win **); #ifdef MPIDI_CH3I_HAS_ALLOC_MEM void* MPIDI_CH3I_Alloc_mem(size_t size, MPIR_Info *info_ptr); /* fallback to MPL_malloc if channel does not have its own RMA memory allocator */ #else # 1116 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" #define MPIDI_CH3I_Alloc_mem(size, info_ptr) MPL_malloc(size) #endif # 1118 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" #ifdef MPIDI_CH3I_HAS_FREE_MEM int MPIDI_CH3I_Free_mem(void *ptr); #else # 1122 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" #define MPIDI_CH3I_Free_mem(ptr) MPL_free(ptr); #endif # 1124 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /* Pvars */ void MPIDI_CH3_RMA_Init_sync_pvars(void); void MPIDI_CH3_RMA_Init_pkthandler_pvars(void); /* internal */ int MPIDI_CH3I_Release_lock(MPIR_Win * win_ptr); int MPIDI_CH3I_Try_acquire_win_lock(MPIR_Win * win_ptr, int requested_lock); int MPIDI_CH3I_Progress_finalize(void); /* Internal RMA operation routines. * Called by normal RMA operations and request-based RMA operations . */ int MPIDI_CH3I_Put(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPIR_Win * win_ptr, MPIR_Request * ureq); int MPIDI_CH3I_Get(void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPIR_Win * win_ptr, MPIR_Request * ureq); int MPIDI_CH3I_Accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPIR_Win * win_ptr, MPIR_Request * ureq); int MPIDI_CH3I_Get_accumulate(const void *origin_addr, int origin_count, MPI_Datatype origin_datatype, void *result_addr, int result_count, MPI_Datatype result_datatype, int target_rank, MPI_Aint target_disp, int target_count, MPI_Datatype target_datatype, MPI_Op op, MPIR_Win * win_ptr, MPIR_Request * ureq); /*@ MPIDI_CH3_Progress_signal_completion - Inform the progress engine that a pending request has completed. IMPLEMENTORS: In a single-threaded environment, this routine can be implemented by incrementing a request completion counter. In a multi-threaded environment, the request completion counter must be atomically incremented, and any threaded blocking in the progress engine must be woken up when a request is completed. Notes on the implementation: This code is designed to support one particular model of thread-safety. It is common to many of the channels and was moved into this file because the MPIDI_CH3_Progress_signal_completion reference is used by the function the implements MPID_Request_complete. @*/ /* * MPIDI_CH3_Progress_signal_completion() is used to notify the progress * engine that a completion has occurred. The multi-threaded version will need * to wake up any (and all) threads blocking in MPIDI_CH3_Progress(). */ /* This allows the channel to define an alternate to the completion counter. */ #ifndef MPIDI_CH3I_INCR_PROGRESS_COMPLETION_COUNT #define MPIDI_CH3I_INCR_PROGRESS_COMPLETION_COUNT \ do { \ MPID_THREAD_CS_ENTER(POBJ, MPIR_THREAD_POBJ_COMPLETION_MUTEX); \ ++MPIDI_CH3I_progress_completion_count; \ MPL_DBG_MSG_D(MPIDI_CH3_DBG_PROGRESS,VERBOSE, \ "just incremented MPIDI_CH3I_progress_completion_count=%d", \ MPIDI_CH3I_progress_completion_count); \ MPID_THREAD_CS_EXIT(POBJ, MPIR_THREAD_POBJ_COMPLETION_MUTEX); \ } while (0) #endif # 1194 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /* The following is part of an implementation of a control of a resource shared among threads - it needs to be managed more explicitly as such as shared resource */ #ifndef MPICH_IS_THREADED # define MPIDI_CH3_Progress_signal_completion() \ { \ MPIDI_CH3I_INCR_PROGRESS_COMPLETION_COUNT; \ } #else # 1205 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /* TODO these decls should probably move into each channel as appropriate */ extern volatile int MPIDI_CH3I_progress_blocked; extern volatile int MPIDI_CH3I_progress_wakeup_signalled; /* This allows the channel to hook the MPIDI_CH3_Progress_signal_completion * macro when it is necessary to wake up some part of the progress engine from a * blocking operation. Currently ch3:sock uses it, ch3:nemesis does not. */ /* MT alternative implementations of this macro are responsible for providing any * synchronization (acquiring MPIDCOMM, etc) */ #ifndef MPIDI_CH3I_PROGRESS_WAKEUP # define MPIDI_CH3I_PROGRESS_WAKEUP do {/*do nothing*/} while(0) #endif # 1217 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" void MPIDI_CH3I_Progress_wakeup(void); /* MT TODO profiling is needed here. We currently protect the completion * counter with the COMPLETION critical section, which could be a source of * contention. It should be possible to peform these updates atomically via * OPA instead, but the additional complexity should be justified by * profiling evidence. [goodell@ 2010-06-29] */ # define MPIDI_CH3_Progress_signal_completion() \ do { \ MPIDI_CH3I_INCR_PROGRESS_COMPLETION_COUNT; \ MPIDI_CH3I_PROGRESS_WAKEUP; \ } while (0) #endif # 1230 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /* Function that may be used to provide business card info */ int MPIDI_CH3I_BCInit( char **bc_val_p, int *val_max_sz_p); /* Function to free the storage allocated by MPIDI_CH3I_BCInit */ int MPIDI_CH3I_BCFree( char *publish_bc ); /* Inform the process group of our connection information string (business card) */ int MPIDI_PG_SetConnInfo( int rank, const char *connString ); /* Fill in the node_id information for each VC in the given PG. */ int MPIDI_Populate_vc_node_ids(MPIDI_PG_t *pg, int our_pg_rank); /* NOTE: Channel function prototypes are in mpidi_ch3_post.h since some of the macros require their declarations. */ /* FIXME: These should be defined only when these particular utility packages are used. Best would be to keep these prototypes in the related util/xxx directories, and either copy them into an include directory used only for builds or add (yet another) include path */ /* from util/sock */ int MPIDI_VC_InitSock( MPIDI_VC_t *); int MPIDI_CH3I_Connect_to_root_sock(const char *, MPIDI_VC_t **); int MPIDI_CH3I_VC_post_sockconnect(MPIDI_VC_t * ); /* FIXME: Where should this go? */ /* Used internally to broadcast process groups belonging to peercomm to all processes in comm*/ int MPID_PG_BCast( MPIR_Comm *peercomm_p, MPIR_Comm *comm_p, int root ); /* Channel defintitions */ /*@ MPIDI_CH3_iStartMsg - A non-blocking request to send a CH3 packet. A r equest object is allocated only if the send could not be completed immediately. Input Parameters: + vc - virtual connection to send the message over . pkt - pointer to a MPIDI_CH3_Pkt_t structure containing the substructure to be sent - pkt_sz - size of the packet substucture Output Parameters: . sreq_ptr - send request or NULL if the send completed immediately Return value: An mpi error code. NOTE: The packet structure may be allocated on the stack. IMPLEMETORS: If the send can not be completed immediately, the CH3 packet structure must be stored internally until the request is complete. If the send completes immediately, the channel implementation should return NULL. @*/ int MPIDI_CH3_iStartMsg(MPIDI_VC_t * vc, void * pkt, intptr_t pkt_sz, MPIR_Request **sreq_ptr); /*@ MPIDI_CH3_iStartMsgv - A non-blocking request to send a CH3 packet and associated data. A request object is allocated only if the send could not be completed immediately. Input Parameters: + vc - virtual connection to send the message over . iov - a vector of a structure contains a buffer pointer and length - iov_n - number of elements in the vector Output Parameters: . sreq_ptr - send request or NULL if the send completed immediately Return value: An mpi error code. NOTE: The first element in the vector must point to the packet structure. The packet structure and the vector may be allocated on the stack. IMPLEMENTORS: If the send can not be completed immediately, the CH3 packet structure and the vector must be stored internally until the request is complete. If the send completes immediately, the channel implementation should return NULL. @*/ int MPIDI_CH3_iStartMsgv(MPIDI_VC_t * vc, MPL_IOV * iov, int iov_n, MPIR_Request **sreq_ptr); /*@ MPIDI_CH3_iSend - A non-blocking request to send a CH3 packet using an existing request object. When the send is complete the channel implementation will call the OnDataAvail routine in the request, if any (if not, the channel implementation will mark the request as complete). Input Parameters: + vc - virtual connection over which to send the CH3 packet . sreq - pointer to the send request object . pkt - pointer to a MPIDI_CH3_Pkt_t structure containing the substructure to be sent - pkt_sz - size of the packet substucture Return value: An mpi error code. NOTE: The packet structure may be allocated on the stack. IMPLEMETORS: If the send can not be completed immediately, the packet structure must be stored internally until the request is complete. If the send completes immediately, the channel implementation still must invoke the OnDataAvail routine in the request, if any; otherwise, is must set the request as complete. @*/ int MPIDI_CH3_iSend(MPIDI_VC_t * vc, MPIR_Request * sreq, void * pkt, intptr_t pkt_sz); /*@ MPIDI_CH3_iSendv - A non-blocking request to send a CH3 packet and associated data using an existing request object. When the send is complete the channel implementation will call the OnDataAvail routine in the request, if any. Input Parameters: + vc - virtual connection over which to send the CH3 packet and data . sreq - pointer to the send request object . iov - a vector of a structure contains a buffer pointer and length - iov_n - number of elements in the vector Return value: An mpi error code. NOTE: The first element in the vector must point to the packet structure. The packet structure and the vector may be allocated on the stack. IMPLEMENTORS: If the send can not be completed immediately, the packet structure and the vector must be stored internally until the request is complete. If the send completes immediately, the channel implementation still must call the OnDataAvail routine in the request, if any. @*/ int MPIDI_CH3_iSendv(MPIDI_VC_t * vc, MPIR_Request * sreq, MPL_IOV * iov, int iov_n); /*@ MPIDI_CH3_Connection_terminate - terminate the underlying connection associated with the specified VC Input Parameters: . vc - virtual connection Return value: An MPI error code @*/ int MPIDI_CH3_Connection_terminate(MPIDI_VC_t * vc); /* MPIDI_CH3_Connect_to_root (really connect to peer) - channel routine for connecting to a process through a port, used in implementing MPID_Comm_connect and accept */ int MPIDI_CH3_Connect_to_root(const char *, MPIDI_VC_t **); /* * Channel utility prototypes */ int MPIDI_CH3U_Recvq_init(void); int MPIDI_CH3U_Recvq_FU(int, int, int, MPI_Status * ); MPIR_Request * MPIDI_CH3U_Recvq_FDU(MPI_Request, MPIDI_Message_match *); MPIR_Request * MPIDI_CH3U_Recvq_FDU_matchonly(int source, int tag, int context_id, MPIR_Comm *comm, int *foundp); MPIR_Request * MPIDI_CH3U_Recvq_FDU_or_AEP(int source, int tag, int context_id, MPIR_Comm *comm, void *user_buf, MPI_Aint user_count, MPI_Datatype datatype, int * foundp); int MPIDI_CH3U_Recvq_DP(MPIR_Request * rreq); MPIR_Request * MPIDI_CH3U_Recvq_FDP_or_AEU(MPIDI_Message_match * match, int * found); int MPIDI_CH3U_Recvq_count_unexp(void); int MPIDI_CH3U_Complete_posted_with_error(MPIDI_VC_t *vc); int MPIDI_CH3U_Clean_recvq(MPIR_Comm *comm_ptr); int MPIDI_CH3U_Request_load_send_iov(MPIR_Request * const sreq, MPL_IOV * const iov, int * const iov_n); int MPIDI_CH3U_Request_load_recv_iov(MPIR_Request * const rreq); int MPIDI_CH3U_Request_unpack_uebuf(MPIR_Request * rreq); int MPIDI_CH3U_Request_unpack_srbuf(MPIR_Request * rreq); void MPIDI_CH3U_Buffer_copy(const void * const sbuf, MPI_Aint scount, MPI_Datatype sdt, int * smpi_errno, void * const rbuf, MPI_Aint rcount, MPI_Datatype rdt, intptr_t * rdata_sz, int * rmpi_errno); int MPIDI_CH3U_Post_data_receive(int found, MPIR_Request ** rreqp); int MPIDI_CH3U_Post_data_receive_found(MPIR_Request * rreqp); int MPIDI_CH3U_Post_data_receive_unexpected(MPIR_Request * rreqp); int MPIDI_CH3U_Receive_data_found(MPIR_Request *rreq, char *buf, intptr_t *buflen, int *complete); int MPIDI_CH3U_Receive_data_unexpected(MPIR_Request * rreq, char *buf, intptr_t *buflen, int *complete); /* Initialization routine for ch3u_comm.c */ int MPIDI_CH3I_Comm_init(void); int MPIDI_CH3I_Comm_handle_failed_procs(MPIR_Group *new_failed_procs); void MPIDI_CH3I_Comm_find(MPIR_Context_id_t context_id, MPIR_Comm **comm); /* The functions below allow channels to register functions to be called immediately after a communicator has been created, and immediately before a communicator is to be destroyed. */ int MPIDI_CH3U_Comm_register_create_hook(int (*hook_fn)(struct MPIR_Comm *, void *), void *param); int MPIDI_CH3U_Comm_register_destroy_hook(int (*hook_fn)(struct MPIR_Comm *, void *), void *param); /* FIXME: This is a macro! */ #ifndef MPIDI_CH3_Request_add_ref /*@ MPIDI_CH3_Request_add_ref - Increment the reference count associated with a request object Input Parameters: . req - pointer to the request object @*/ void MPIDI_CH3_Request_add_ref(MPIR_Request * req); #endif # 1467 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /*@ MPIDI_CH3_GetParentPort - obtain the port name associated with the parent Output Parameters: . parent_port_name - the port name associated with the parent communicator Return value: A MPI error code. NOTE: 'MPIDI_CH3_GetParentPort' should only be called if the initialization (in the current implementation, done with the static function 'InitPGFromPMI' in 'mpid_init.c') has determined that this process in fact has a parent. @*/ int MPIDI_CH3_GetParentPort(char ** parent_port_name); /*@ MPIDI_CH3_FreeParentPort - This routine frees the storage associated with a parent port (allocted with MPIDH_CH3_GetParentPort). @*/ void MPIDI_CH3_FreeParentPort( void ); /*E MPIDI_CH3_Abort - Abort this process. Input Parameters: + exit_code - exit code to be returned by the process - error_msg - error message to print Return value: This function should not return. Notes: This routine is used only if the channel defines 'MPIDI_CH3_IMPLEMENTS_ABORT'. This allows the channel to handle aborting processes, particularly when the channel does not use the standard PMI interface. E*/ int MPIDI_CH3_Abort(int exit_code, char * error_msg); /* FIXME: Move these prototypes into header files in the appropriate util directories */ /* added by brad. upcalls for MPIDI_CH3_Init that contain code which could be executed by two or more channels */ int MPIDI_CH3U_Init_sock(int has_parent, MPIDI_PG_t * pg_p, int pg_rank, char **bc_val_p, int *val_max_sz_p); /* added by brad. business card related global and functions */ /* FIXME: Make these part of the channel support headers */ #define MAX_HOST_DESCRIPTION_LEN 256 int MPIDI_CH3U_Get_business_card_sock(int myRank, char **bc_val_p, int *val_max_sz_p); int MPIDI_CH3_Get_business_card(int myRank, char *value, int length); /* * Channel upcall prototypes */ /*E MPIDI_CH3U_Handle_recv_pkt- Handle a freshly received CH3 packet. Input Parameters: + vc - virtual connection over which the packet was received - pkt - pointer to the CH3 packet Output Parameter: . rreqp - receive request defining data to be received; may be NULL NOTE: Multiple threads may not simultaneously call this routine with the same virtual connection. This constraint eliminates the need to lock the VC and thus improves performance. If simultaneous upcalls for a single VC are a possible, then the calling routine must serialize the calls (perhaps by locking the VC). Special consideration may need to be given to packet ordering if the channel has made guarantees about ordering. E*/ int MPIDI_CH3U_Handle_recv_pkt(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, intptr_t *buflen, MPIR_Request ** rreqp); /*@ MPIDI_CH3U_Handle_recv_req - Process a receive request for which all of the data has been received (and copied) into the buffers described by the request's IOV. Input Parameters: + vc - virtual connection over which the data was received - rreq - pointer to the receive request object Output Parameter: . complete - data transfer for the request has completed @*/ int MPIDI_CH3U_Handle_recv_req(MPIDI_VC_t * vc, MPIR_Request * rreq, int * complete); /* Handle_send_req invokes the action (method/function) when data becomes available. It is an obsolete routine; the completion function should be invoked directly. */ int MPIDI_CH3U_Handle_send_req(MPIDI_VC_t * vc, MPIR_Request * sreq, int *complete); int MPIDI_CH3U_Handle_connection(MPIDI_VC_t * vc, MPIDI_VC_Event_t event); int MPIDI_CH3U_VC_SendClose( MPIDI_VC_t *vc, int rank ); int MPIDI_CH3U_VC_WaitForClose( void ); #ifdef MPIDI_CH3_HAS_CHANNEL_CLOSE int MPIDI_CH3_Channel_close( void ); #else # 1579 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" #define MPIDI_CH3_Channel_close( ) MPI_SUCCESS #endif # 1581 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /* MPIDI_CH3U_Get_failed_group() generates a group of failed processes based * on the last list generated during MPIDI_CH3U_Check_for_failed_procs */ int MPIDI_CH3U_Get_failed_group(int last_rank, MPIR_Group **failed_group); /* MPIDI_CH3U_Check_for_failed_procs() reads PMI_dead_processes key and marks VCs to those processes as failed */ int MPIDI_CH3U_Check_for_failed_procs(void); /*@ MPIDI_CH3_Pre_init - Allows the channel to initialize before PMI_init is called, and allows the channel to optionally set the rank, size, and whether this process has a parent. Output Parameters: + setvals - boolean value that is true if this function set has_parent, rank, and size . has_parent - boolean value that is true if this MPI job was spawned by another set of MPI processes . rank - rank of this process in the process group - size - number of processes in the process group Return value: A MPI error code. Notes: This function is optional, and is used only when HAVE_CH3_PRE_INIT is defined. It is called by CH3 before PMI_Init. If the function sets setvals to TRUE, CH3 will not use PMI to get the rank, size, etc. @*/ int MPIDI_CH3_Pre_init (int *setvals, int *has_parent, int *rank, int *size); /*@ MPIDI_CH3_Init - Initialize the channel implementation. Input Parameters: + has_parent - boolean value that is true if this MPI job was spawned by another set of MPI processes . pg_ptr - the new process group representing MPI_COMM_WORLD - pg_rank - my rank in the process group Return value: A MPI error code. Notes: MPID_Init has called 'PMI_Init' and created the process group structure before this routine is called. @*/ int MPIDI_CH3_Init(int has_parent, MPIDI_PG_t *pg_ptr, int pg_rank ); /*@ MPIDI_CH3_Finalize - Shutdown the channel implementation. Return value: A MPI error class. @*/ int MPIDI_CH3_Finalize(void); /*@ MPIDI_CH3_VC_Init - Perform channel-specific initialization of a VC Input Parameter: . vc - Virtual connection to initialize @*/ int MPIDI_CH3_VC_Init( struct MPIDI_VC *vc ); /*@ MPIDI_CH3_PG_Destroy - Perform any channel-specific actions when freeing a process group Input Parameter: . pg - Process group on which to act @*/ int MPIDI_CH3_PG_Destroy( struct MPIDI_PG *pg ); /*@ MPIDI_CH3_VC_Destroy - Perform and channel-specific actions when freeing a virtual connection. Input Parameter: . vc - Virtual connection on which to act @*/ int MPIDI_CH3_VC_Destroy( struct MPIDI_VC *vc ); /*@ MPIDI_CH3_InitCompleted - Perform any channel-specific initialization actions after MPID_Init but before MPI_Init (or MPI_Initthread) returns @*/ int MPIDI_CH3_InitCompleted( void ); #ifdef MPIDI_CH3_HASIMPL_HEADER #if 0 /* expanded by -frewrite-includes */ #include "mpidi_ch3_mpid.h" #endif /* expanded by -frewrite-includes */ # 1670 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" # 1671 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" #endif # 1672 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /* Routines in support of ch3 */ #ifndef MPIDI_CH3_HAS_NO_DYNAMIC_PROCESS /* Routine to return the tag associated with a port */ int MPIDI_GetTagFromPort( const char *, int * ); #else # 1678 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /* Need empty symbol to avoid failure at compile time if defined * MPIDI_CH3_HAS_NO_DYNAMIC_PROCESS. */ #define MPIDI_GetTagFromPort(port_name, port_name_tag) (MPI_SUCCESS) #endif # 1682 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /* Here are the packet handlers */ int MPIDI_CH3_PktHandler_EagerSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); #ifdef USE_EAGER_SHORT int MPIDI_CH3_PktHandler_EagerShortSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); #endif # 1690 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" int MPIDI_CH3_PktHandler_ReadySend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_EagerSyncSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_EagerSyncAck( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_RndvReqToSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_RndvClrToSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_RndvSend( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_CancelSendReq( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_CancelSendResp( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_Put( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_Accumulate( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_GetAccumulate( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_CAS( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_CASResp( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_FOP( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_FOPResp( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_Get_AccumResp( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_Get( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_GetResp( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_Lock( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_LockAck( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_LockOpAck( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_Unlock( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_Flush( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_Ack( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_DecrAtCnt( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_FlowCntlUpdate( MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_Close( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); #ifndef MPIDI_CH3_HAS_NO_DYNAMIC_PROCESS /* packet handlers used in dynamic process connection. */ int MPIDI_CH3_PktHandler_ConnAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, intptr_t * buflen, MPIR_Request ** rreqp); int MPIDI_CH3_PktHandler_AcceptAck(MPIDI_VC_t * vc, MPIDI_CH3_Pkt_t * pkt, intptr_t * buflen, MPIR_Request ** rreqp); #endif /* end of MPIDI_CH3_HAS_NO_DYNAMIC_PROCESS */ # 1752 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" int MPIDI_CH3_PktHandler_EndCH3( MPIDI_VC_t *, MPIDI_CH3_Pkt_t *, intptr_t *, MPIR_Request ** ); int MPIDI_CH3_PktHandler_Revoke(MPIDI_VC_t *vc, MPIDI_CH3_Pkt_t *pkt, intptr_t *buflen, MPIR_Request **rreqp); int MPIDI_CH3_PktHandler_Init( MPIDI_CH3_PktHandler_Fcn *[], int ); int MPIDI_CH3I_RMA_Make_progress_global(int *made_progress); #ifdef MPICH_DBG_OUTPUT int MPIDI_CH3_PktPrint_CancelSendReq( FILE *, MPIDI_CH3_Pkt_t * ); int MPIDI_CH3_PktPrint_CancelSendResp( FILE *, MPIDI_CH3_Pkt_t * ); int MPIDI_CH3_PktPrint_EagerSend( FILE *, MPIDI_CH3_Pkt_t * ); int MPIDI_CH3_PktPrint_ReadySend( FILE *, MPIDI_CH3_Pkt_t * ); int MPIDI_CH3_PktPrint_RndvReqToSend( FILE *, MPIDI_CH3_Pkt_t * ); int MPIDI_CH3_PktPrint_RndvClrToSend( FILE *, MPIDI_CH3_Pkt_t * ); int MPIDI_CH3_PktPrint_RndvSend( FILE *, MPIDI_CH3_Pkt_t * ); int MPIDI_CH3_PktPrint_EagerSyncSend( FILE *fp, MPIDI_CH3_Pkt_t *pkt ); int MPIDI_CH3_PktPrint_EagerSyncAck( FILE *fp, MPIDI_CH3_Pkt_t *pkt ); #endif # 1772 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" /* Routines to create packets (used in implementing MPI communications */ int MPIDI_CH3_EagerNoncontigSend( MPIR_Request **, MPIDI_CH3_Pkt_type_t, const void *, MPI_Aint, MPI_Datatype, intptr_t, int, int, MPIR_Comm *, int ); int MPIDI_CH3_EagerContigSend( MPIR_Request **, MPIDI_CH3_Pkt_type_t, const void *, intptr_t, int, int, MPIR_Comm *, int ); int MPIDI_CH3_EagerContigShortSend( MPIR_Request **, MPIDI_CH3_Pkt_type_t, const void *, intptr_t, int, int, MPIR_Comm *, int ); int MPIDI_CH3_EagerContigIsend( MPIR_Request **, MPIDI_CH3_Pkt_type_t, const void *, intptr_t, int, int, MPIR_Comm *, int ); int MPIDI_CH3_RndvSend( MPIR_Request **, const void *, MPI_Aint, MPI_Datatype, int, intptr_t, MPI_Aint, int, int, MPIR_Comm *, int ); int MPIDI_CH3_EagerSyncNoncontigSend( MPIR_Request **, const void *, int, MPI_Datatype, intptr_t, int, MPI_Aint, int, int, MPIR_Comm *, int ); int MPIDI_CH3_EagerSyncZero(MPIR_Request **, int, int, MPIR_Comm *, int ); int MPIDI_CH3_SendNoncontig_iov( struct MPIDI_VC *vc, struct MPIR_Request *sreq, void *header, intptr_t hdr_sz ); /* Routines to ack packets, called in the receive routines when a message is matched */ int MPIDI_CH3_EagerSyncAck( MPIDI_VC_t *, MPIR_Request * ); int MPIDI_CH3_RecvFromSelf( MPIR_Request *, void *, MPI_Aint, MPI_Datatype ); int MPIDI_CH3_RecvRndv( MPIDI_VC_t *, MPIR_Request * ); /* Handler routines to continuing after an IOV is processed (assigned to the OnDataAvail field in the device part of a request) */ int MPIDI_CH3_ReqHandler_RecvComplete( MPIDI_VC_t *, MPIR_Request *, int * ); int MPIDI_CH3_ReqHandler_UnpackUEBufComplete( MPIDI_VC_t *, MPIR_Request *, int * ); int MPIDI_CH3_ReqHandler_ReloadIOV( MPIDI_VC_t *, MPIR_Request *, int * ); int MPIDI_CH3_ReqHandler_UnpackSRBufReloadIOV( MPIDI_VC_t *, MPIR_Request *, int * ); int MPIDI_CH3_ReqHandler_UnpackSRBufComplete( MPIDI_VC_t *, MPIR_Request *, int * ); int MPIDI_CH3_ReqHandler_PutDerivedDTRecvComplete( MPIDI_VC_t *, MPIR_Request *, int * ); int MPIDI_CH3_ReqHandler_PutRecvComplete( MPIDI_VC_t *, MPIR_Request *, int * ); int MPIDI_CH3_ReqHandler_AccumRecvComplete( MPIDI_VC_t *, MPIR_Request *, int * ); int MPIDI_CH3_ReqHandler_GaccumRecvComplete( MPIDI_VC_t *, MPIR_Request *, int * ); int MPIDI_CH3_ReqHandler_FOPRecvComplete( MPIDI_VC_t *, MPIR_Request *, int * ); int MPIDI_CH3_ReqHandler_AccumMetadataRecvComplete( MPIDI_VC_t *, MPIR_Request *, int * ); int MPIDI_CH3_ReqHandler_GaccumMetadataRecvComplete( MPIDI_VC_t *, MPIR_Request *, int * ); int MPIDI_CH3_ReqHandler_GetDerivedDTRecvComplete( MPIDI_VC_t *, MPIR_Request *, int * ); int MPIDI_CH3_ReqHandler_PiggybackLockOpRecvComplete( MPIDI_VC_t *, MPIR_Request *, int * ); /* Send Handlers */ int MPIDI_CH3_ReqHandler_SendReloadIOV( MPIDI_VC_t *vc, MPIR_Request *sreq, int *complete ); int MPIDI_CH3_ReqHandler_GetSendComplete( MPIDI_VC_t *, MPIR_Request *, int * ); int MPIDI_CH3_ReqHandler_GaccumSendComplete( MPIDI_VC_t *, MPIR_Request *, int * ); int MPIDI_CH3_ReqHandler_CASSendComplete( MPIDI_VC_t *, MPIR_Request *, int * ); int MPIDI_CH3_ReqHandler_FOPSendComplete( MPIDI_VC_t *, MPIR_Request *, int * ); /* RMA operation request handler */ int MPIDI_CH3_Req_handler_rma_op_complete(MPIR_Request *); #define MPIDI_CH3_GET_EAGER_THRESHOLD(eager_threshold_p, comm, vc) \ do { \ if ((comm)->dev.eager_max_msg_sz != -1) \ *(eager_threshold_p) = (comm)->dev.eager_max_msg_sz; \ else \ *(eager_threshold_p) = (vc)->eager_max_msg_sz; \ } while (0) int MPIDI_CH3I_Progress_register_hook(int (*progress_fn)(int*), int *id); int MPIDI_CH3I_Progress_deregister_hook(int id); int MPIDI_CH3I_Progress_activate_hook(int id); int MPIDI_CH3I_Progress_deactivate_hook(int id); #define MPID_Progress_register_hook(fn_, id_) MPIDI_CH3I_Progress_register_hook(fn_, id_) #define MPID_Progress_deregister_hook(id_) MPIDI_CH3I_Progress_deregister_hook(id_) #define MPID_Progress_activate_hook(id_) MPIDI_CH3I_Progress_activate_hook(id_) #define MPID_Progress_deactivate_hook(id_) MPIDI_CH3I_Progress_deactivate_hook(id_) #endif /* !defined(MPICH_MPIDIMPL_H_INCLUDED) */ # 1871 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidimpl.h" # 8 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpid_coll.h" 2 #undef FUNCNAME #define FUNCNAME MPID_Barrier #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Barrier(MPIR_Comm * comm, MPIR_Errflag_t * errflag) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Barrier_impl(comm, errflag); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Bcast #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Bcast_impl(buffer, count, datatype, root, comm, errflag); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Allreduce #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, MPIR_Errflag_t * errflag) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Allreduce_impl(sendbuf, recvbuf, count, datatype, op, comm, errflag); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Allgather #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm, MPIR_Errflag_t * errflag) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Allgather_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, errflag); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Allgatherv #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPIR_Comm * comm, MPIR_Errflag_t * errflag) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Allgatherv_impl(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, errflag); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Scatter #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Scatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Scatter_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, errflag); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Scatterv #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Scatterv(const void *sendbuf, const int *sendcounts, const int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Scatterv_impl(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, errflag); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Gather #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Gather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Gather_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, errflag); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Gatherv #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Gatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Gatherv_impl(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, errflag); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Alltoall #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm, MPIR_Errflag_t * errflag) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Alltoall_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, errflag); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Alltoallv #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Alltoallv(const void *sendbuf, const int *sendcounts, const int *sdispls, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *rdispls, MPI_Datatype recvtype, MPIR_Comm * comm, MPIR_Errflag_t * errflag) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Alltoallv_impl(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, errflag); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Alltoallw #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Alltoallw(const void *sendbuf, const int sendcounts[], const int sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const int rdispls[], const MPI_Datatype recvtypes[], MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Alltoallw_impl(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm_ptr, errflag); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Reduce #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Reduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm, MPIR_Errflag_t * errflag) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Reduce_impl(sendbuf, recvbuf, count, datatype, op, root, comm, errflag); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Reduce_scatter #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[], MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Reduce_scatter_impl(sendbuf, recvbuf, recvcounts, datatype, op, comm_ptr, errflag); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Reduce_scatter_block #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Reduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm_ptr, MPIR_Errflag_t * errflag) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Reduce_scatter_block_impl(sendbuf, recvbuf, recvcount, datatype, op, comm_ptr, errflag); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Scan #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Scan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, MPIR_Errflag_t * errflag) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Scan_impl(sendbuf, recvbuf, count, datatype, op, comm, errflag); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Exscan #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, MPIR_Errflag_t * errflag) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Exscan_impl(sendbuf, recvbuf, count, datatype, op, comm, errflag); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Neighbor_allgather #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Neighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Neighbor_allgather_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Neighbor_allgatherv #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Neighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPIR_Comm * comm) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Neighbor_allgatherv_impl(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Neighbor_alltoallv #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Neighbor_alltoallv(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPIR_Comm * comm) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Neighbor_alltoallv_impl(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Neighbor_alltoallw #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Neighbor_alltoallw(const void *sendbuf, const int sendcounts[], const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPIR_Comm * comm) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Neighbor_alltoallw_impl(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Neighbor_alltoall #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Neighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Neighbor_alltoall_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Ineighbor_allgather #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Ineighbor_allgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm, MPI_Request * request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ineighbor_allgather_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Ineighbor_allgatherv #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Ineighbor_allgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int displs[], MPI_Datatype recvtype, MPIR_Comm * comm, MPI_Request * request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ineighbor_allgatherv_impl(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Ineighbor_alltoall #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Ineighbor_alltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm, MPI_Request * request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ineighbor_alltoall_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Ineighbor_alltoallv #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Ineighbor_alltoallv(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPIR_Comm * comm, MPI_Request * request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ineighbor_alltoallv_impl(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Ineighbor_alltoallw #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Ineighbor_alltoallw(const void *sendbuf, const int sendcounts[], const MPI_Aint sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const MPI_Aint rdispls[], const MPI_Datatype recvtypes[], MPIR_Comm * comm, MPI_Request * request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ineighbor_alltoallw_impl(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, request); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Ibarrier #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Ibarrier(MPIR_Comm * comm, MPI_Request * request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ibarrier_impl(comm, request); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Ibcast #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Ibcast(void *buffer, int count, MPI_Datatype datatype, int root, MPIR_Comm * comm, MPI_Request * request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ibcast_impl(buffer, count, datatype, root, comm, request); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Iallgather #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Iallgather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm, MPI_Request * request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Iallgather_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Iallgatherv #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Iallgatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPIR_Comm * comm, MPI_Request * request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Iallgatherv_impl(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, request); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Iallreduce #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Iallreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, MPI_Request * request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Iallreduce_impl(sendbuf, recvbuf, count, datatype, op, comm, request); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Ialltoall #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Ialltoall(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, MPIR_Comm * comm, MPI_Request * request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ialltoall_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, request); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Ialltoallv #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Ialltoallv(const void *sendbuf, const int sendcounts[], const int sdispls[], MPI_Datatype sendtype, void *recvbuf, const int recvcounts[], const int rdispls[], MPI_Datatype recvtype, MPIR_Comm * comm, MPI_Request * request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ialltoallv_impl(sendbuf, sendcounts, sdispls, sendtype, recvbuf, recvcounts, rdispls, recvtype, comm, request); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Ialltoallw #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Ialltoallw(const void *sendbuf, const int sendcounts[], const int sdispls[], const MPI_Datatype sendtypes[], void *recvbuf, const int recvcounts[], const int rdispls[], const MPI_Datatype recvtypes[], MPIR_Comm * comm, MPI_Request * request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ialltoallw_impl(sendbuf, sendcounts, sdispls, sendtypes, recvbuf, recvcounts, rdispls, recvtypes, comm, request); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Iexscan #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Iexscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, MPI_Request * request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Iexscan_impl(sendbuf, recvbuf, count, datatype, op, comm, request); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Igather #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Igather(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm, MPI_Request * request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Igather_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Igatherv #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Igatherv(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, const int *recvcounts, const int *displs, MPI_Datatype recvtype, int root, MPIR_Comm * comm, MPI_Request * request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Igatherv_impl(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, root, comm, request); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Ireduce_scatter_block #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Ireduce_scatter_block(const void *sendbuf, void *recvbuf, int recvcount, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, MPI_Request * request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ireduce_scatter_block_impl(sendbuf, recvbuf, recvcount, datatype, op, comm, request); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Ireduce_scatter #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Ireduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[], MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, MPI_Request * request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ireduce_scatter_impl(sendbuf, recvbuf, recvcounts, datatype, op, comm, request); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Ireduce #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Ireduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, int root, MPIR_Comm * comm, MPI_Request * request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Ireduce_impl(sendbuf, recvbuf, count, datatype, op, root, comm, request); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Iscan #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Iscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPIR_Comm * comm, MPI_Request * request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Iscan_impl(sendbuf, recvbuf, count, datatype, op, comm, request); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Iscatter #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Iscatter(const void *sendbuf, int sendcount, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm, MPI_Request * request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Iscatter_impl(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, request); return mpi_errno; } #undef FUNCNAME #define FUNCNAME MPID_Iscatterv #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static inline int MPID_Iscatterv(const void *sendbuf, const int *sendcounts, const int *displs, MPI_Datatype sendtype, void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPIR_Comm * comm, MPI_Request * request) { int mpi_errno = MPI_SUCCESS; mpi_errno = MPIR_Iscatterv_impl(sendbuf, sendcounts, displs, sendtype, recvbuf, recvcount, recvtype, root, comm, request); return mpi_errno; } # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpost.h" 2 /* FIXME: mpidpost.h is included by mpiimpl.h . However, mpiimpl.h should refer only to the ADI3 prototypes and should never include prototypes specific to any particular device. Factor the include files to maintain better modularity by providing mpiimpl.h with only the definitions that it needs */ /* * Channel API prototypes */ /*@ MPIDI_CH3_Progress_start - Mark the beginning of a progress epoch. Input Parameters: . state - pointer to a MPID_Progress_state object Return value: An MPI error code. NOTE: This routine need only be called if the code might call MPIDI_CH3_Progress_wait(). It is normally used as follows example: .vb if (*req->cc_ptr != 0) { MPID_Progress_state state; MPIDI_CH3_Progress_start(&state); { while(*req->cc_ptr != 0) { MPIDI_CH3_Progress_wait(&state); } } MPIDI_CH3_Progress_end(&state); } .ve IMPLEMENTORS: A multi-threaded implementation might save the current value of a request completion counter in the state. @*/ void MPIDI_CH3_Progress_start(MPID_Progress_state * state); /*@ MPIDI_CH3_Progress_wait - Give the channel implementation an opportunity to make progress on outstanding communication requests. Input Parameters: . state - pointer to the same MPID_Progress_state object passed to MPIDI_CH3_Progress_start Return value: An MPI error code. NOTE: MPIDI_CH3_Progress_start/end() need to be called. IMPLEMENTORS: A multi-threaded implementation would return immediately if the a request had been completed between the call to MPIDI_CH3_Progress_start() and MPIDI_CH3_Progress_wait(). This could be implemented by checking a request completion counter in the progress state against a global counter, and returning if they did not match. @*/ int MPIDI_CH3_Progress_wait(MPID_Progress_state * state); /*@ MPIDI_CH3_Progress_end - Mark the end of a progress epoch. Input Parameters: . state - pointer to the same MPID_Progress_state object passed to MPIDI_CH3_Progress_start Return value: An MPI error code. @*/ void MPIDI_CH3_Progress_end(MPID_Progress_state * state); /*@ MPIDI_CH3_Progress_test - Give the channel implementation an opportunity to make progress on outstanding communication requests. Return value: An MPI error code. NOTE: This function implicitly marks the beginning and end of a progress epoch. @*/ int MPIDI_CH3_Progress_test(void); /*@ MPIDI_CH3_Progress_poke - Give the channel implementation a moment of opportunity to make progress on outstanding communication. Return value: An mpi error code. IMPLEMENTORS: This routine is similar to MPIDI_CH3_Progress_test but may not be as thorough in its attempt to satisfy all outstanding communication. @*/ int MPIDI_CH3_Progress_poke(void); int MPIDI_CH3_Open_port(char *port_name); int MPIDI_CH3_Comm_spawn_multiple(int count, char ** commands, char *** argvs, int * maxprocs, MPIR_Info ** info_ptrs, int root, MPIR_Comm * comm_ptr, MPIR_Comm ** intercomm, int * errcodes); int MPIDI_CH3_Comm_accept(char * port_name, int root, MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm); int MPIDI_CH3_Comm_connect(char * port_name, int root, MPIR_Comm * comm_ptr, MPIR_Comm ** newcomm); /* Include definitions from the channel which require items defined by this file (mpidimpl.h) or the file it includes (mpiimpl.h). */ #if 0 /* expanded by -frewrite-includes */ #include "mpidi_ch3_post.h" #endif /* expanded by -frewrite-includes */ # 141 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpost.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_post.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2001 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #if !defined(MPICH_MPIDI_CH3_POST_H_INCLUDED) #define MPICH_MPIDI_CH3_POST_H_INCLUDED #define MPIDI_CH3_Progress_start(progress_state_) \ (progress_state_)->ch.completion_count = OPA_load_int(&MPIDI_CH3I_progress_completion_count); #define MPIDI_CH3_Progress_end(progress_state_) enum { MPIDI_CH3_start_packet_handler_id = 128, MPIDI_CH3_continue_packet_handler_id = 129, MPIDI_CH3_CTS_packet_handler_id = 130, MPIDI_CH3_reload_IOV_or_done_handler_id = 131, MPIDI_CH3_reload_IOV_reply_handler_id = 132 }; int MPIDI_CH3I_Progress(MPID_Progress_state *progress_state, int blocking); #define MPIDI_CH3_Progress_test() MPIDI_CH3I_Progress(NULL, FALSE) #define MPIDI_CH3_Progress_wait(progress_state) MPIDI_CH3I_Progress(progress_state, TRUE) #define MPIDI_CH3_Progress_poke() MPIDI_CH3I_Progress(NULL, FALSE) void MPIDI_CH3I_Posted_recv_enqueued(MPIR_Request *rreq); /* returns non-zero when req has been matched by channel */ int MPIDI_CH3I_Posted_recv_dequeued(MPIR_Request *rreq); /* * Enable optional functionality */ #define MPIDI_CH3_Comm_Spawn MPIDI_CH3_Comm_Spawn #if 0 /* expanded by -frewrite-includes */ #include "mpid_nem_post.h" #endif /* expanded by -frewrite-includes */ # 37 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_post.h" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h" 1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2006 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef MPID_NEM_POST_H #define MPID_NEM_POST_H #if 0 /* expanded by -frewrite-includes */ #include "mpidu_shm.h" #endif /* expanded by -frewrite-includes */ # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h" # 11 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h" struct MPIDI_PG; union MPIDI_CH3_Pkt; /* if local_lmt_pending is true, local_lmt_progress will be called in the progress loop */ extern int MPID_nem_local_lmt_pending; extern int (*MPID_nem_local_lmt_progress)(void); /* FIXME: Do not export these definitions all the way into mpiimpl.h (which will happen if this is included in mpidpost.h or mpidpre.h) */ int MPID_nem_init(int rank, struct MPIDI_PG *pg_p, int has_parent); int MPID_nem_finalize(void); int MPID_nem_vc_init(struct MPIDI_VC *vc); int MPID_nem_vc_destroy(struct MPIDI_VC *vc); int MPID_nem_get_business_card(int myRank, char *value, int length); int MPID_nem_connect_to_root(const char *port_name, struct MPIDI_VC *new_vc); int MPID_nem_lmt_shm_progress(void); int MPID_nem_lmt_dma_progress(void); int MPID_nem_lmt_vmsplice_progress(void); #ifdef ENABLE_CHECKPOINTING extern int MPIDI_nem_ckpt_start_checkpoint; extern int MPIDI_nem_ckpt_finish_checkpoint; int MPIDI_nem_ckpt_init(void); int MPIDI_nem_ckpt_finalize(void); int MPIDI_nem_ckpt_start(void); int MPIDI_nem_ckpt_finish(void); int MPIDI_nem_ckpt_pkthandler_init(int (*pktArray[])(struct MPIDI_VC *vc, union MPIDI_CH3_Pkt *pkt, intptr_t *buflen, MPIR_Request **req ), int arraySize); #endif # 42 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h" /* one-sided */ typedef struct MPID_nem_mpich_win { char *handle; /* shared-memory segment handle */ int proc; /* rank of owner */ void *home_address; /* address of window at owner */ int len; /* size of window */ void *local_address; /* address of window at this process */ } MPID_nem_mpich_win_t; int MPID_nem_mpich_alloc_win (void **buf, int len, MPID_nem_mpich_win_t **win); int MPID_nem_mpich_free_win (MPID_nem_mpich_win_t *win); int MPID_nem_mpich_attach_win (void **buf, MPID_nem_mpich_win_t *remote_win); int MPID_nem_mpich_detach_win (MPID_nem_mpich_win_t *remote_win); int MPID_nem_mpich_serialize_win (void *buf, int buf_len, MPID_nem_mpich_win_t *win, int *len); int MPID_nem_mpich_deserialize_win (void *buf, int buf_len, MPID_nem_mpich_win_t **win); int MPID_nem_mpich_win_put (void *s_buf, void *d_buf, int len, MPID_nem_mpich_win_t *remote_win); int MPID_nem_mpich_win_putv (MPL_IOV **s_iov, int *s_niov, MPL_IOV **d_iov, int *d_niov, MPID_nem_mpich_win_t *remote_win); int MPID_nem_mpich_win_get (void *s_buf, void *d_buf, int len, MPID_nem_mpich_win_t *remote_win); int MPID_nem_mpich_win_getv (MPL_IOV **s_iov, int *s_niov, MPL_IOV **d_iov, int *d_niov, MPID_nem_mpich_win_t *remote_win); int MPID_nem_mpich_register_memory (void *buf, int len); int MPID_nem_mpich_deregister_memory (void *buf, int len); int MPID_nem_mpich_put (void *s_buf, void *d_buf, int len, int proc, int *completion_ctr); int MPID_nem_mpich_putv (MPL_IOV **s_iov, int *s_niov, MPL_IOV **d_iov, int *d_niov, int proc, int *completion_ctr); int MPID_nem_mpich_get (void *s_buf, void *d_buf, int len, int proc, int *completion_ctr); int MPID_nem_mpich_getv (MPL_IOV **s_iov, int *s_niov, MPL_IOV **d_iov, int *d_niov, int proc, int *completion_ctr); #define MPID_nem_mpich_win_put_val(val, d_buf, remote_win) do { \ char *_d_buf = d_buf; \ \ _d_buf += (char *)(remote_win)->local_address - (char *)(remote_win)->home_address; \ \ *(typeof (val) *)_d_buf = val; \ } while (0) #define MPID_nem_mpich_win_get_val(s_buf, val, remote_win) do { \ char *_s_buf = s_buf; \ \ _s_buf += (char *)(remote_win)->local_address - (char *)(remote_win)->home_address; \ \ *(val) = *(typeof (*(val)) *)_s_buf; \ } while (0) #if !defined (MPID_NEM_INLINE) || !MPID_NEM_INLINE int MPID_nem_mpich_send_header(void* buf, int size, struct MPIDI_VC *vc, int *again); int MPID_nem_mpich_sendv(MPL_IOV **iov, int *n_iov, struct MPIDI_VC *vc, int *again); int MPID_nem_mpich_sendv_header(MPL_IOV **iov, int *n_iov, void *ext_header, intptr_t ext_header_sz, struct MPIDI_VC *vc, int *again); void MPID_nem_mpich_send_seg(MPIDU_Segment segment, intptr_t *segment_first, intptr_t segment_sz, struct MPIDI_VC *vc, int *again); void MPID_nem_mpich_send_seg_header(MPIDU_Segment segment, intptr_t *segment_first, intptr_t segment_size, void *header, intptr_t header_sz, void *ext_header, intptr_t ext_header_sz, struct MPIDI_VC *vc, int *again); int MPID_nem_mpich_test_recv(MPID_nem_cell_ptr_t *cell, int *in_fbox, int in_blocking_progress); int MPID_nem_mpich_test_recv_wait(MPID_nem_cell_ptr_t *cell, int *in_fbox, int timeout); int MPID_nem_recv_seqno_matches(MPID_nem_queue_ptr_t qhead) ; int MPID_nem_mpich_blocking_recv(MPID_nem_cell_ptr_t *cell, int *in_fbox); int MPID_nem_mpich_release_cell(MPID_nem_cell_ptr_t cell, struct MPIDI_VC *vc); int MPID_nem_mpich_enqueue_fastbox(int local_rank); int MPID_nem_mpich_dequeue_fastbox(int local_rank); #endif /* MPID_NEM_INLINE */ # 112 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h" #endif /* MPID_NEM_POST_H */ # 115 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpid_nem_post.h" # 38 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_post.h" 2 int MPIDI_CH3I_Register_anysource_notification(void (*enqueue_fn)(MPIR_Request *rreq), int (*dequeue_fn)(MPIR_Request *rreq)); #endif /* !defined(MPICH_MPIDI_CH3_POST_H_INCLUDED) */ # 42 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/channels/nemesis/include/mpidi_ch3_post.h" # 142 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpost.h" 2 #if 0 /* expanded by -frewrite-includes */ #include "mpidu_datatype.h" #endif /* expanded by -frewrite-includes */ # 143 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpost.h" # 144 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpost.h" /* * Request utility macros (public - can be used in MPID macros) */ /* SHMEM: In the case of a single-threaded shmem channel sharing requests between processes, a write barrier must be performed before decrementing the completion counter. This ensures that other fields in the req structure are updated before the completion is signalled. How should that be incorporated into this code from the channel level? */ /* The above comment is accurate, although we do not currently have any channels * that do this. Memory barriers are included in fine-grained multithreaded * versions of the MPIR_cc_incr/decr macros. */ #define MPIDI_CH3U_Request_decrement_cc(req_, incomplete_) \ MPIR_cc_decr((req_)->cc_ptr, incomplete_) #define MPIDI_CH3U_Request_increment_cc(req_, was_incomplete_) \ MPIR_cc_incr((req_)->cc_ptr, was_incomplete_) /* * Device level request management macros */ /* * Device level progress engine macros */ #define MPID_Progress_start(progress_state_) MPIDI_CH3_Progress_start(progress_state_) #define MPID_Progress_wait(progress_state_) MPIDI_CH3_Progress_wait(progress_state_) #define MPID_Progress_end(progress_state_) MPIDI_CH3_Progress_end(progress_state_) #define MPID_Progress_test() MPIDI_CH3_Progress_test() #define MPID_Progress_poke() MPIDI_CH3_Progress_poke() /* Dynamic process support */ int MPID_GPID_GetAllInComm( MPIR_Comm *comm_ptr, int local_size, MPIR_Gpid local_gpids[], int *singlePG ); int MPID_GPID_Get( MPIR_Comm *comm_ptr, int rank, MPIR_Gpid *gpid ); int MPID_GPID_ToLpidArray( int size, MPIR_Gpid gpid[], int lpid[] ); int MPID_Create_intercomm_from_lpids( MPIR_Comm *newcomm_ptr, int size, const int lpids[] ); int MPID_PG_ForwardPGInfo( MPIR_Comm *peer_ptr, MPIR_Comm *comm_ptr, int nPGids, const MPIR_Gpid gpids[], int root ); /* PG_ForwardPGInfo is used as the implementation of the intercomm-create hook that is needed with dynamic processes because of limitations in the current definition of PMI */ #define MPID_ICCREATE_REMOTECOMM_HOOK(_p,_c,_np,_gp,_r) \ MPID_PG_ForwardPGInfo(_p,_c,_np,_gp,_r) /* communicator hooks */ int MPIDI_CH3I_Comm_create_hook(struct MPIR_Comm *); int MPIDI_CH3I_Comm_destroy_hook(struct MPIR_Comm *); #endif /* !defined(MPIDPOST_H_INCLUDED) */ # 198 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpid/ch3/include/mpidpost.h" # 235 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" 2 /* avoid conflicts in source files with old-style "char FCNAME[]" vars */ #undef FUNCNAME #undef FCNAME #endif /* MPIIMPL_INCLUDED */ # 241 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/include/mpiimpl.h" # 9 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpi/coll/red_scat.c" 2 #if 0 /* expanded by -frewrite-includes */ #include "collutil.h" #endif /* expanded by -frewrite-includes */ # 9 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpi/coll/red_scat.c" # 1 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpi/coll/collutil.h" 1 /* -*- Mode: c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * (C) 2011 by Argonne National Laboratory. * See COPYRIGHT in top-level directory. */ #ifndef COLLUTIL_H_INCLUDED #define COLLUTIL_H_INCLUDED /* Returns non-zero if val is a power of two. If ceil_pof2 is non-NULL, it sets *ceil_pof2 to the power of two that is just larger than or equal to val. That is, it rounds up to the nearest power of two. */ static inline int MPIU_is_pof2(int val, int *ceil_pof2) { int pof2 = 1; while (pof2 < val) pof2 *= 2; if (ceil_pof2) *ceil_pof2 = pof2; if (pof2 == val) return 1; else return 0; } /* TODO with a modest amount of work in the handle allocator code we should be * able to encode commutativity in the handle value and greatly simplify this * routine */ /* returns TRUE iff the given op is commutative */ static inline int MPIR_Op_is_commutative(MPI_Op op) { MPIR_Op *op_ptr; if (HANDLE_GET_KIND(op) == HANDLE_KIND_BUILTIN) { return TRUE; } else { MPIR_Op_get_ptr(op, op_ptr); if (op_ptr->kind == MPIR_OP_KIND__USER_NONCOMMUTE) return FALSE; else return TRUE; } } /* Implements the "mirror permutation" of "bits" low-order bits of an integer "x". * * positions 76543210, bits==3 yields 76543012. */ ATTRIBUTE((const)) /* tells the compiler that this func only depends on its args and may be optimized much more aggressively, similar to "pure" */ static inline int MPIU_Mirror_permutation(unsigned int x, int bits) { /* a mask for the high order bits that should be copied as-is */ int high_mask = ~((0x1 << bits) - 1); int retval = x & high_mask; int i; for (i = 0; i < bits; ++i) { unsigned int bitval = (x & (0x1 << i)) >> i; /* 0x1 or 0x0 */ retval |= bitval << ((bits - i) - 1); } return retval; } #endif /* !defined(COLLUTIL_H_INCLUDED) */ # 70 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpi/coll/collutil.h" # 10 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpi/coll/red_scat.c" 2 /* === BEGIN_MPI_T_CVAR_INFO_BLOCK === cvars: - name : MPIR_CVAR_REDSCAT_COMMUTATIVE_LONG_MSG_SIZE category : COLLECTIVE type : int default : 524288 class : device verbosity : MPI_T_VERBOSITY_USER_BASIC scope : MPI_T_SCOPE_ALL_EQ description : >- the long message algorithm will be used if the operation is commutative and the send buffer size is >= this value (in bytes) === END_MPI_T_CVAR_INFO_BLOCK === */ /* -- Begin Profiling Symbol Block for routine MPI_Reduce_scatter */ #if defined(HAVE_PRAGMA_WEAK) #pragma weak MPI_Reduce_scatter = PMPI_Reduce_scatter #elif defined(HAVE_PRAGMA_HP_SEC_DEF) # 33 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpi/coll/red_scat.c" #pragma _HP_SECONDARY_DEF PMPI_Reduce_scatter MPI_Reduce_scatter #elif defined(HAVE_PRAGMA_CRI_DUP) # 35 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpi/coll/red_scat.c" #pragma _CRI duplicate MPI_Reduce_scatter as PMPI_Reduce_scatter #elif defined(HAVE_WEAK_ATTRIBUTE) # 37 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpi/coll/red_scat.c" int MPI_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[], MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) __attribute__((weak,alias("PMPI_Reduce_scatter"))); #endif # 41 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpi/coll/red_scat.c" /* -- End Profiling Symbol Block */ /* Define MPICH_MPI_FROM_PMPI if weak symbols are not supported to build the MPI routines */ #ifndef MPICH_MPI_FROM_PMPI #undef MPI_Reduce_scatter #define MPI_Reduce_scatter PMPI_Reduce_scatter /* Implements the reduce-scatter butterfly algorithm described in J. L. Traff's * "An Improved Algorithm for (Non-commutative) Reduce-Scatter with an * Application" * from EuroPVM/MPI 2005. This function currently only implements support for * the power-of-2, block-regular case (all receive counts are equal). */ #undef FUNCNAME #define FUNCNAME MPIR_Reduce_scatter_noncomm #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) static int MPIR_Reduce_scatter_noncomm(const void *sendbuf, void *recvbuf, const int recvcounts[], MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag) { int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; int comm_size = comm_ptr->local_size; int rank = comm_ptr->rank; int pof2; int log2_comm_size; int i, k; int recv_offset, send_offset; int block_size, total_count, size; MPI_Aint true_extent, true_lb; int buf0_was_inout; void *tmp_buf0; void *tmp_buf1; void *result_ptr; MPIR_CHKLMEM_DECL(3); MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent); pof2 = 1; log2_comm_size = 0; while (pof2 < comm_size) { pof2 <<= 1; ++log2_comm_size; } /* begin error checking */ MPIR_Assert(pof2 == comm_size); /* FIXME this version only works for power of 2 procs */ for (i = 0; i < (comm_size - 1); ++i) { MPIR_Assert(recvcounts[i] == recvcounts[i+1]); } /* end error checking */ /* size of a block (count of datatype per block, NOT bytes per block) */ block_size = recvcounts[0]; total_count = block_size * comm_size; MPIR_CHKLMEM_MALLOC(tmp_buf0, void *, true_extent * total_count, mpi_errno, "tmp_buf0"); MPIR_CHKLMEM_MALLOC(tmp_buf1, void *, true_extent * total_count, mpi_errno, "tmp_buf1"); /* adjust for potential negative lower bound in datatype */ tmp_buf0 = (void *)((char*)tmp_buf0 - true_lb); tmp_buf1 = (void *)((char*)tmp_buf1 - true_lb); /* Copy our send data to tmp_buf0. We do this one block at a time and permute the blocks as we go according to the mirror permutation. */ for (i = 0; i < comm_size; ++i) { mpi_errno = MPIR_Localcopy((char *)(sendbuf == MPI_IN_PLACE ? (const void *)recvbuf : sendbuf) + (i * true_extent * block_size), block_size, datatype, (char *)tmp_buf0 + (MPIU_Mirror_permutation(i, log2_comm_size) * true_extent * block_size), block_size, datatype); if (mpi_errno) MPIR_ERR_POP(mpi_errno); } buf0_was_inout = 1; send_offset = 0; recv_offset = 0; size = total_count; for (k = 0; k < log2_comm_size; ++k) { /* use a double-buffering scheme to avoid local copies */ char *incoming_data = (buf0_was_inout ? tmp_buf1 : tmp_buf0); char *outgoing_data = (buf0_was_inout ? tmp_buf0 : tmp_buf1); int peer = rank ^ (0x1 << k); size /= 2; if (rank > peer) { /* we have the higher rank: send top half, recv bottom half */ recv_offset += size; } else { /* we have the lower rank: recv top half, send bottom half */ send_offset += size; } mpi_errno = MPIC_Sendrecv(outgoing_data + send_offset*true_extent, size, datatype, peer, MPIR_REDUCE_SCATTER_TAG, incoming_data + recv_offset*true_extent, size, datatype, peer, MPIR_REDUCE_SCATTER_TAG, comm_ptr, MPI_STATUS_IGNORE, errflag); if (mpi_errno) { /* for communication errors, just record the error but continue */ *errflag = MPIR_ERR_GET_CLASS(mpi_errno); MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); } /* always perform the reduction at recv_offset, the data at send_offset is now our peer's responsibility */ if (rank > peer) { /* higher ranked value so need to call op(received_data, my_data) */ mpi_errno = MPIR_Reduce_local_impl( incoming_data + recv_offset*true_extent, outgoing_data + recv_offset*true_extent, size, datatype, op ); if (mpi_errno) MPIR_ERR_POP(mpi_errno); } else { /* lower ranked value so need to call op(my_data, received_data) */ MPIR_Reduce_local_impl( outgoing_data + recv_offset*true_extent, incoming_data + recv_offset*true_extent, size, datatype, op); if (mpi_errno) MPIR_ERR_POP(mpi_errno); buf0_was_inout = !buf0_was_inout; } /* the next round of send/recv needs to happen within the block (of size "size") that we just received and reduced */ send_offset = recv_offset; } MPIR_Assert(size == recvcounts[rank]); /* copy the reduced data to the recvbuf */ result_ptr = (char *)(buf0_was_inout ? tmp_buf0 : tmp_buf1) + recv_offset * true_extent; mpi_errno = MPIR_Localcopy(result_ptr, size, datatype, recvbuf, size, datatype); if (mpi_errno) MPIR_ERR_POP(mpi_errno); fn_exit: MPIR_CHKLMEM_FREEALL(); if (mpi_errno_ret) mpi_errno = mpi_errno_ret; else if (*errflag != MPIR_ERR_NONE) MPIR_ERR_SET(mpi_errno, *errflag, "**coll_fail"); return mpi_errno; fn_fail: goto fn_exit; } /* This is the default implementation of reduce_scatter. The algorithm is: Algorithm: MPI_Reduce_scatter If the operation is commutative, for short and medium-size messages, we use a recursive-halving algorithm in which the first p/2 processes send the second n/2 data to their counterparts in the other half and receive the first n/2 data from them. This procedure continues recursively, halving the data communicated at each step, for a total of lgp steps. If the number of processes is not a power-of-two, we convert it to the nearest lower power-of-two by having the first few even-numbered processes send their data to the neighboring odd-numbered process at (rank+1). Those odd-numbered processes compute the result for their left neighbor as well in the recursive halving algorithm, and then at the end send the result back to the processes that didn't participate. Therefore, if p is a power-of-two, Cost = lgp.alpha + n.((p-1)/p).beta + n.((p-1)/p).gamma If p is not a power-of-two, Cost = (floor(lgp)+2).alpha + n.(1+(p-1+n)/p).beta + n.(1+(p-1)/p).gamma The above cost in the non power-of-two case is approximate because there is some imbalance in the amount of work each process does because some processes do the work of their neighbors as well. For commutative operations and very long messages we use we use a pairwise exchange algorithm similar to the one used in MPI_Alltoall. At step i, each process sends n/p amount of data to (rank+i) and receives n/p amount of data from (rank-i). Cost = (p-1).alpha + n.((p-1)/p).beta + n.((p-1)/p).gamma If the operation is not commutative, we do the following: We use a recursive doubling algorithm, which takes lgp steps. At step 1, processes exchange (n-n/p) amount of data; at step 2, (n-2n/p) amount of data; at step 3, (n-4n/p) amount of data, and so forth. Cost = lgp.alpha + n.(lgp-(p-1)/p).beta + n.(lgp-(p-1)/p).gamma Possible improvements: End Algorithm: MPI_Reduce_scatter */ #undef FUNCNAME #define FUNCNAME MPIR_Reduce_scatter_intra #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) /* not declared static because a machine-specific function may call this one in some cases */ int MPIR_Reduce_scatter_intra(const void *sendbuf, void *recvbuf, const int recvcounts[], MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag) { int rank, comm_size, i; MPI_Aint extent, true_extent, true_lb; int *disps; void *tmp_recvbuf, *tmp_results; int mpi_errno = MPI_SUCCESS; int mpi_errno_ret = MPI_SUCCESS; int type_size, dis[2], blklens[2], total_count, nbytes, src, dst; int mask, dst_tree_root, my_tree_root, j, k; int *newcnts, *newdisps, rem, newdst, send_idx, recv_idx, last_idx, send_cnt, recv_cnt; int pof2, old_i, newrank, received; MPI_Datatype sendtype, recvtype; int nprocs_completed, tmp_mask, tree_root, is_commutative; MPIR_Op *op_ptr; MPIR_CHKLMEM_DECL(5); comm_size = comm_ptr->local_size; rank = comm_ptr->rank; /* set op_errno to 0. stored in perthread structure */ { MPIR_Per_thread_t *per_thread = NULL; int err = 0; MPID_THREADPRIV_KEY_GET_ADDR(MPIR_ThreadInfo.isThreaded, MPIR_Per_thread_key, MPIR_Per_thread, per_thread, &err); MPIR_Assert(err == 0); per_thread->op_errno = 0; } MPID_Datatype_get_extent_macro(datatype, extent); MPIR_Type_get_true_extent_impl(datatype, &true_lb, &true_extent); if (HANDLE_GET_KIND(op) == HANDLE_KIND_BUILTIN) { is_commutative = 1; } else { MPIR_Op_get_ptr(op, op_ptr); if (op_ptr->kind == MPIR_OP_KIND__USER_NONCOMMUTE) is_commutative = 0; else is_commutative = 1; } MPIR_CHKLMEM_MALLOC(disps, int *, comm_size * sizeof(int), mpi_errno, "disps"); total_count = 0; for (i=0; i>=1; rem = comm_size - pof2; /* In the non-power-of-two case, all even-numbered processes of rank < 2*rem send their data to (rank+1). These even-numbered processes no longer participate in the algorithm until the very end. The remaining processes form a nice power-of-two. */ if (rank < 2*rem) { if (rank % 2 == 0) { /* even */ mpi_errno = MPIC_Send(tmp_results, total_count, datatype, rank+1, MPIR_REDUCE_SCATTER_TAG, comm_ptr, errflag); if (mpi_errno) { /* for communication errors, just record the error but continue */ *errflag = MPIR_ERR_GET_CLASS(mpi_errno); MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); } /* temporarily set the rank to -1 so that this process does not pariticipate in recursive doubling */ newrank = -1; } else { /* odd */ mpi_errno = MPIC_Recv(tmp_recvbuf, total_count, datatype, rank-1, MPIR_REDUCE_SCATTER_TAG, comm_ptr, MPI_STATUS_IGNORE, errflag); if (mpi_errno) { /* for communication errors, just record the error but continue */ *errflag = MPIR_ERR_GET_CLASS(mpi_errno); MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); } /* do the reduction on received data. since the ordering is right, it doesn't matter whether the operation is commutative or not. */ mpi_errno = MPIR_Reduce_local_impl( tmp_recvbuf, tmp_results, total_count, datatype, op ); /* change the rank */ newrank = rank / 2; } } else /* rank >= 2*rem */ newrank = rank - rem; if (newrank != -1) { /* recalculate the recvcounts and disps arrays because the even-numbered processes who no longer participate will have their result calculated by the process to their right (rank+1). */ MPIR_CHKLMEM_MALLOC(newcnts, int *, pof2*sizeof(int), mpi_errno, "newcnts"); MPIR_CHKLMEM_MALLOC(newdisps, int *, pof2*sizeof(int), mpi_errno, "newdisps"); for (i=0; i> 1; send_idx = recv_idx = 0; last_idx = pof2; while (mask > 0) { newdst = newrank ^ mask; /* find real rank of dest */ dst = (newdst < rem) ? newdst*2 + 1 : newdst + rem; send_cnt = recv_cnt = 0; if (newrank < newdst) { send_idx = recv_idx + mask; for (i=send_idx; i>= 1; } /* copy this process's result from tmp_results to recvbuf */ if (recvcounts[rank]) { mpi_errno = MPIR_Localcopy((char *)tmp_results + disps[rank]*extent, recvcounts[rank], datatype, recvbuf, recvcounts[rank], datatype); if (mpi_errno) MPIR_ERR_POP(mpi_errno); } } /* In the non-power-of-two case, all odd-numbered processes of rank < 2*rem send to (rank-1) the result they calculated for that process */ if (rank < 2*rem) { if (rank % 2) { /* odd */ if (recvcounts[rank-1]) { mpi_errno = MPIC_Send((char *) tmp_results + disps[rank-1]*extent, recvcounts[rank-1], datatype, rank-1, MPIR_REDUCE_SCATTER_TAG, comm_ptr, errflag); if (mpi_errno) { /* for communication errors, just record the error but continue */ *errflag = MPIR_ERR_GET_CLASS(mpi_errno); MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); } } } else { /* even */ if (recvcounts[rank]) { mpi_errno = MPIC_Recv(recvbuf, recvcounts[rank], datatype, rank+1, MPIR_REDUCE_SCATTER_TAG, comm_ptr, MPI_STATUS_IGNORE, errflag); if (mpi_errno) { /* for communication errors, just record the error but continue */ *errflag = MPIR_ERR_GET_CLASS(mpi_errno); MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); } } } } } if (is_commutative && (nbytes >= MPIR_CVAR_REDSCAT_COMMUTATIVE_LONG_MSG_SIZE)) { /* commutative and long message, or noncommutative and long message. use (p-1) pairwise exchanges */ if (sendbuf != MPI_IN_PLACE) { /* copy local data into recvbuf */ mpi_errno = MPIR_Localcopy(((char *)sendbuf+disps[rank]*extent), recvcounts[rank], datatype, recvbuf, recvcounts[rank], datatype); if (mpi_errno) MPIR_ERR_POP(mpi_errno); } /* allocate temporary buffer to store incoming data */ MPIR_CHKLMEM_MALLOC(tmp_recvbuf, void *, recvcounts[rank]*(MPL_MAX(true_extent,extent))+1, mpi_errno, "tmp_recvbuf"); /* adjust for potential negative lower bound in datatype */ tmp_recvbuf = (void *)((char*)tmp_recvbuf - true_lb); for (i=1; i> i; dst_tree_root <<= i; my_tree_root = rank >> i; my_tree_root <<= i; /* At step 1, processes exchange (n-n/p) amount of data; at step 2, (n-2n/p) amount of data; at step 3, (n-4n/p) amount of data, and so forth. We use derived datatypes for this. At each step, a process does not need to send data indexed from my_tree_root to my_tree_root+mask-1. Similarly, a process won't receive data indexed from dst_tree_root to dst_tree_root+mask-1. */ /* calculate sendtype */ blklens[0] = blklens[1] = 0; for (j=0; j comm_size) { nprocs_completed = comm_size - my_tree_root - mask; /* nprocs_completed is the number of processes in this subtree that have all the data. Send data to others in a tree fashion. First find root of current tree that is being divided into two. k is the number of least-significant bits in this process's rank that must be zeroed out to find the rank of the root */ j = mask; k = 0; while (j) { j >>= 1; k++; } k--; tmp_mask = mask >> 1; while (tmp_mask) { dst = rank ^ tmp_mask; tree_root = rank >> k; tree_root <<= k; /* send only if this proc has data and destination doesn't have data. at any step, multiple processes can send if they have the data */ if ((dst > rank) && (rank < tree_root + nprocs_completed) && (dst >= tree_root + nprocs_completed)) { /* send the current result */ mpi_errno = MPIC_Send(tmp_recvbuf, 1, recvtype, dst, MPIR_REDUCE_SCATTER_TAG, comm_ptr, errflag); if (mpi_errno) { /* for communication errors, just record the error but continue */ *errflag = MPIR_ERR_GET_CLASS(mpi_errno); MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); } } /* recv only if this proc. doesn't have data and sender has data */ else if ((dst < rank) && (dst < tree_root + nprocs_completed) && (rank >= tree_root + nprocs_completed)) { mpi_errno = MPIC_Recv(tmp_recvbuf, 1, recvtype, dst, MPIR_REDUCE_SCATTER_TAG, comm_ptr, MPI_STATUS_IGNORE, errflag); received = 1; if (mpi_errno) { /* for communication errors, just record the error but continue */ *errflag = MPIR_ERR_GET_CLASS(mpi_errno); MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); } } tmp_mask >>= 1; k--; } } /* The following reduction is done here instead of after the MPIC_Sendrecv or MPIC_Recv above. This is because to do it above, in the noncommutative case, we would need an extra temp buffer so as not to overwrite temp_recvbuf, because temp_recvbuf may have to be communicated to other processes in the non-power-of-two case. To avoid that extra allocation, we do the reduce here. */ if (received) { if (is_commutative || (dst_tree_root < my_tree_root)) { { mpi_errno = MPIR_Reduce_local_impl( tmp_recvbuf, tmp_results, blklens[0], datatype, op); if (mpi_errno) MPIR_ERR_POP(mpi_errno); mpi_errno = MPIR_Reduce_local_impl( ((char *)tmp_recvbuf + dis[1]*extent), ((char *)tmp_results + dis[1]*extent), blklens[1], datatype, op); if (mpi_errno) MPIR_ERR_POP(mpi_errno); } } else { { mpi_errno = MPIR_Reduce_local_impl( tmp_results, tmp_recvbuf, blklens[0], datatype, op); if (mpi_errno) MPIR_ERR_POP(mpi_errno); mpi_errno = MPIR_Reduce_local_impl( ((char *)tmp_results + dis[1]*extent), ((char *)tmp_recvbuf + dis[1]*extent), blklens[1], datatype, op); if (mpi_errno) MPIR_ERR_POP(mpi_errno); } /* copy result back into tmp_results */ mpi_errno = MPIR_Localcopy(tmp_recvbuf, 1, recvtype, tmp_results, 1, recvtype); if (mpi_errno) MPIR_ERR_POP(mpi_errno); } } MPIR_Type_free_impl(&sendtype); MPIR_Type_free_impl(&recvtype); mask <<= 1; i++; } /* now copy final results from tmp_results to recvbuf */ mpi_errno = MPIR_Localcopy(((char *)tmp_results+disps[rank]*extent), recvcounts[rank], datatype, recvbuf, recvcounts[rank], datatype); if (mpi_errno) MPIR_ERR_POP(mpi_errno); } } fn_exit: MPIR_CHKLMEM_FREEALL(); { MPIR_Per_thread_t *per_thread = NULL; int err = 0; MPID_THREADPRIV_KEY_GET_ADDR(MPIR_ThreadInfo.isThreaded, MPIR_Per_thread_key, MPIR_Per_thread, per_thread, &err); MPIR_Assert(err == 0); if (per_thread->op_errno) mpi_errno = per_thread->op_errno; } if (mpi_errno_ret) mpi_errno = mpi_errno_ret; else if (*errflag != MPIR_ERR_NONE) MPIR_ERR_SET(mpi_errno, *errflag, "**coll_fail"); return mpi_errno; fn_fail: goto fn_exit; } #undef FUNCNAME #define FUNCNAME MPIR_Reduce_scatter_inter #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) /* not declared static because a machine-specific function may call this one in some cases */ int MPIR_Reduce_scatter_inter(const void *sendbuf, void *recvbuf, const int recvcounts[], MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag) { /* Intercommunicator Reduce_scatter. We first do an intercommunicator reduce to rank 0 on left group, then an intercommunicator reduce to rank 0 on right group, followed by local intracommunicator scattervs in each group. */ int rank, mpi_errno, root, local_size, total_count, i; int mpi_errno_ret = MPI_SUCCESS; MPI_Aint true_extent, true_lb = 0, extent; void *tmp_buf=NULL; int *disps=NULL; MPIR_Comm *newcomm_ptr = NULL; MPIR_CHKLMEM_DECL(2); rank = comm_ptr->rank; local_size = comm_ptr->local_size; total_count = 0; for (i=0; iis_low_group) { /* reduce from right group to rank 0*/ root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; mpi_errno = MPIR_Reduce_inter(sendbuf, tmp_buf, total_count, datatype, op, root, comm_ptr, errflag); if (mpi_errno) { /* for communication errors, just record the error but continue */ *errflag = MPIR_ERR_GET_CLASS(mpi_errno); MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); } /* reduce to rank 0 of right group */ root = 0; mpi_errno = MPIR_Reduce_inter(sendbuf, tmp_buf, total_count, datatype, op, root, comm_ptr, errflag); if (mpi_errno) { /* for communication errors, just record the error but continue */ *errflag = MPIR_ERR_GET_CLASS(mpi_errno); MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); } } else { /* reduce to rank 0 of left group */ root = 0; mpi_errno = MPIR_Reduce_inter(sendbuf, tmp_buf, total_count, datatype, op, root, comm_ptr, errflag); if (mpi_errno) { /* for communication errors, just record the error but continue */ *errflag = MPIR_ERR_GET_CLASS(mpi_errno); MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); } /* reduce from right group to rank 0 */ root = (rank == 0) ? MPI_ROOT : MPI_PROC_NULL; mpi_errno = MPIR_Reduce_inter(sendbuf, tmp_buf, total_count, datatype, op, root, comm_ptr, errflag); if (mpi_errno) { /* for communication errors, just record the error but continue */ *errflag = MPIR_ERR_GET_CLASS(mpi_errno); MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); } } /* Get the local intracommunicator */ if (!comm_ptr->local_comm) { mpi_errno = MPII_Setup_intercomm_localcomm( comm_ptr ); if (mpi_errno) MPIR_ERR_POP(mpi_errno); } newcomm_ptr = comm_ptr->local_comm; mpi_errno = MPIR_Scatterv(tmp_buf, recvcounts, disps, datatype, recvbuf, recvcounts[rank], datatype, 0, newcomm_ptr, errflag); if (mpi_errno) { /* for communication errors, just record the error but continue */ *errflag = MPIR_ERR_GET_CLASS(mpi_errno); MPIR_ERR_SET(mpi_errno, *errflag, "**fail"); MPIR_ERR_ADD(mpi_errno_ret, mpi_errno); } fn_exit: MPIR_CHKLMEM_FREEALL(); if (mpi_errno_ret) mpi_errno = mpi_errno_ret; else if (*errflag != MPIR_ERR_NONE) MPIR_ERR_SET(mpi_errno, *errflag, "**coll_fail"); return mpi_errno; fn_fail: goto fn_exit; } /* MPIR_Reduce_Scatter performs an reduce_scatter using point-to-point messages. This is intended to be used by device-specific implementations of reduce_scatter. In all other cases MPIR_Reduce_Scatter_impl should be used. */ #undef FUNCNAME #define FUNCNAME MPIR_Reduce_scatter #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) int MPIR_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[], MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag) { int mpi_errno = MPI_SUCCESS; if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTRACOMM) { /* intracommunicator */ mpi_errno = MPIR_Reduce_scatter_intra(sendbuf, recvbuf, recvcounts, datatype, op, comm_ptr, errflag); if (mpi_errno) MPIR_ERR_POP(mpi_errno); } else { /* intercommunicator */ mpi_errno = MPIR_Reduce_scatter_inter(sendbuf, recvbuf, recvcounts, datatype, op, comm_ptr, errflag); if (mpi_errno) MPIR_ERR_POP(mpi_errno); } fn_exit: return mpi_errno; fn_fail: goto fn_exit; } /* MPIR_Reduce_Scatter_impl should be called by any internal component that would otherwise call MPI_Reduce_Scatter. This differs from MPIR_Reduce_Scatter in that this will call the coll_fns version if it exists. This function replaces NMPI_Reduce_Scatter. */ #undef FUNCNAME #define FUNCNAME MPIR_Reduce_scatter_impl #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) int MPIR_Reduce_scatter_impl(const void *sendbuf, void *recvbuf, const int recvcounts[], MPI_Datatype datatype, MPI_Op op, MPIR_Comm *comm_ptr, MPIR_Errflag_t *errflag) { int mpi_errno = MPI_SUCCESS; if (comm_ptr->coll_fns != NULL && comm_ptr->coll_fns->Reduce_scatter != NULL) { /* --BEGIN USEREXTENSION-- */ mpi_errno = comm_ptr->coll_fns->Reduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm_ptr, errflag); if (mpi_errno) MPIR_ERR_POP(mpi_errno); /* --END USEREXTENSION-- */ } else { mpi_errno = MPIR_Reduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm_ptr, errflag); if (mpi_errno) MPIR_ERR_POP(mpi_errno); } fn_exit: return mpi_errno; fn_fail: goto fn_exit; } #endif # 1096 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpi/coll/red_scat.c" #undef FUNCNAME #define FUNCNAME MPI_Reduce_scatter #undef FCNAME #define FCNAME MPL_QUOTE(FUNCNAME) /*@ MPI_Reduce_scatter - Combines values and scatters the results Input Parameters: + sendbuf - starting address of send buffer (choice) . recvcounts - integer array specifying the number of elements in result distributed to each process. Array must be identical on all calling processes. . datatype - data type of elements of input buffer (handle) . op - operation (handle) - comm - communicator (handle) Output Parameters: . recvbuf - starting address of receive buffer (choice) .N ThreadSafe .N Fortran .N collops .N Errors .N MPI_SUCCESS .N MPI_ERR_COMM .N MPI_ERR_COUNT .N MPI_ERR_TYPE .N MPI_ERR_BUFFER .N MPI_ERR_OP .N MPI_ERR_BUFFER_ALIAS @*/ int MPI_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[], MPI_Datatype datatype, MPI_Op op, MPI_Comm comm) { int mpi_errno = MPI_SUCCESS; MPIR_Comm *comm_ptr = NULL; MPIR_Errflag_t errflag = MPIR_ERR_NONE; MPIR_FUNC_TERSE_STATE_DECL(MPID_STATE_MPI_REDUCE_SCATTER); MPIR_ERRTEST_INITIALIZED_ORDIE(); MPID_THREAD_CS_ENTER(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); MPIR_FUNC_TERSE_COLL_ENTER(MPID_STATE_MPI_REDUCE_SCATTER); /* Validate parameters, especially handles needing to be converted */ # ifdef HAVE_ERROR_CHECKING { MPID_BEGIN_ERROR_CHECKS; { MPIR_ERRTEST_COMM(comm, mpi_errno); } MPID_END_ERROR_CHECKS; } # endif /* HAVE_ERROR_CHECKING */ # 1155 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpi/coll/red_scat.c" /* Convert MPI object handles to object pointers */ MPIR_Comm_get_ptr( comm, comm_ptr ); /* Validate parameters and objects (post conversion) */ # ifdef HAVE_ERROR_CHECKING { MPID_BEGIN_ERROR_CHECKS; { MPIR_Datatype *datatype_ptr = NULL; MPIR_Op *op_ptr = NULL; int i, size, sum; MPIR_Comm_valid_ptr( comm_ptr, mpi_errno, FALSE ); if (mpi_errno != MPI_SUCCESS) goto fn_fail; size = comm_ptr->local_size; /* even in intercomm. case, recvcounts is of size local_size */ sum = 0; for (i=0; irank], mpi_errno); if (comm_ptr->comm_kind == MPIR_COMM_KIND__INTERCOMM) { MPIR_ERRTEST_SENDBUF_INPLACE(sendbuf, sum, mpi_errno); } else if (sendbuf != MPI_IN_PLACE && sum != 0) MPIR_ERRTEST_ALIAS_COLL(sendbuf, recvbuf, mpi_errno) MPIR_ERRTEST_USERBUFFER(recvbuf,recvcounts[comm_ptr->rank],datatype,mpi_errno); MPIR_ERRTEST_USERBUFFER(sendbuf,sum,datatype,mpi_errno); MPIR_ERRTEST_OP(op, mpi_errno); if (HANDLE_GET_KIND(op) != HANDLE_KIND_BUILTIN) { MPIR_Op_get_ptr(op, op_ptr); MPIR_Op_valid_ptr( op_ptr, mpi_errno ); } if (HANDLE_GET_KIND(op) == HANDLE_KIND_BUILTIN) { mpi_errno = ( * MPIR_OP_HDL_TO_DTYPE_FN(op) )(datatype); } if (mpi_errno != MPI_SUCCESS) goto fn_fail; } MPID_END_ERROR_CHECKS; } # endif /* HAVE_ERROR_CHECKING */ # 1212 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpi/coll/red_scat.c" /* ... body of routine ... */ mpi_errno = MPID_Reduce_scatter(sendbuf, recvbuf, recvcounts, datatype, op, comm_ptr, &errflag); if (mpi_errno) goto fn_fail; /* ... end of body of routine ... */ fn_exit: MPIR_FUNC_TERSE_COLL_EXIT(MPID_STATE_MPI_REDUCE_SCATTER); MPID_THREAD_CS_EXIT(GLOBAL, MPIR_THREAD_GLOBAL_ALLFUNC_MUTEX); return mpi_errno; fn_fail: /* --BEGIN ERROR HANDLING-- */ # ifdef HAVE_ERROR_CHECKING { mpi_errno = MPIR_Err_create_code( mpi_errno, MPIR_ERR_RECOVERABLE, FCNAME, __LINE__, MPI_ERR_OTHER, "**mpi_reduce_scatter", "**mpi_reduce_scatter %p %p %p %D %O %C", sendbuf, recvbuf, recvcounts, datatype, op, comm); } # endif # 1235 "/home/pkcoff/bgqofi/project/ofi-bgq/mpi/mpich/src/mpi/coll/red_scat.c" mpi_errno = MPIR_Err_return_comm( comm_ptr, FCNAME, mpi_errno ); goto fn_exit; /* --END ERROR HANDLING-- */ }