Commit 6501432e authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files

upgrade PLPA to 1.3.2

parent 8d0fff2f
if HAVE_PLPA if HAVE_PLPA
SUBDIRS = plpa-1.1 SUBDIRS = plpa-1.3.2
endif endif
bin_PROGRAMS = htop bin_PROGRAMS = htop
...@@ -38,7 +38,7 @@ SUFFIXES = .h ...@@ -38,7 +38,7 @@ SUFFIXES = .h
BUILT_SOURCES = $(myhtopheaders) BUILT_SOURCES = $(myhtopheaders)
htop_SOURCES = $(myhtopheaders) $(myhtopsources) config.h debug.h htop_SOURCES = $(myhtopheaders) $(myhtopsources) config.h debug.h
if HAVE_PLPA if HAVE_PLPA
htop_LDADD = $(top_builddir)/plpa-1.1/src/libplpa_included.la htop_LDADD = $(top_builddir)/plpa-1.3.2/src/libplpa/libplpa_included.la
endif endif
profile: profile:
......
m4_include(plpa-1.1/plpa.m4) m4_include(plpa-1.3.2/plpa.m4)
...@@ -97,8 +97,8 @@ fi ...@@ -97,8 +97,8 @@ fi
AC_CHECK_FILE($PROCDIR/stat,,AC_MSG_ERROR(Cannot find /proc/stat. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help.)) AC_CHECK_FILE($PROCDIR/stat,,AC_MSG_ERROR(Cannot find /proc/stat. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help.))
AC_CHECK_FILE($PROCDIR/meminfo,,AC_MSG_ERROR(Cannot find /proc/meminfo. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help.)) AC_CHECK_FILE($PROCDIR/meminfo,,AC_MSG_ERROR(Cannot find /proc/meminfo. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help.))
PLPA_INCLUDED(plpa-1.1) PLPA_INCLUDED
PLPA_INIT(plpa_happy=yes, plpa_happy=no) PLPA_INIT([./plpa-1.3.2], [plpa_happy=yes], [plpa_happy=no])
AM_CONDITIONAL([HAVE_PLPA], [test "$plpa_happy" = "yes"]) AM_CONDITIONAL([HAVE_PLPA], [test "$plpa_happy" = "yes"])
if test "$plpa_happy" = "yes"; then if test "$plpa_happy" = "yes"; then
AC_DEFINE([HAVE_PLPA], [1], [Have plpa]) AC_DEFINE([HAVE_PLPA], [1], [Have plpa])
......
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
#
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = plpa-1.1
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
AUTHORS
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/plpa-1.1/plpa.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h \
$(top_builddir)/plpa-1.1/src/plpa_config.h \
$(top_builddir)/plpa-1.1/src/plpa.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = src
DIST_SUBDIRS = $(SUBDIRS)
EXTRA_DIST = README VERSION LICENSE AUTHORS plpa.m4
all: all-recursive
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plpa-1.1/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu plpa-1.1/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles,
# (1) if the variable is set in `config.status', edit `config.status'
# (which will cause the Makefiles to be regenerated when you run `make');
# (2) otherwise, pass the desired values on the `make' command line.
$(RECURSIVE_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
@failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
rev=''; for subdir in $$list; do \
if test "$$subdir" = "."; then :; else \
rev="$$subdir $$rev"; \
fi; \
done; \
rev="$$rev ."; \
target=`echo $@ | sed s/-recursive//`; \
for subdir in $$rev; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
distdir=`$(am__cd) $(distdir) && pwd`; \
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
(cd $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$top_distdir" \
distdir="$$distdir/$$subdir" \
am__remove_distdir=: \
am__skip_length_check=: \
distdir) \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-recursive
all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-recursive
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
info: info-recursive
info-am:
install-data-am:
install-dvi: install-dvi-recursive
install-exec-am:
install-html: install-html-recursive
install-info: install-info-recursive
install-man:
install-pdf: install-pdf-recursive
install-ps: install-ps-recursive
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
install-strip
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am check check-am clean clean-generic clean-libtool \
ctags ctags-recursive distclean distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
This is a stripped-down version of the PLPA 1.1 package, adapted to
be embedded in the htop code base. For the full PLPA package, go to
http://www.open-mpi.org/projects/plpa/. Copyright notice for PLPA
follows below.
-- Hisham Muhammad, htop author. March 2008.
===========================================================================
This is the Portable Linux Processor Affinity (PLPA) package
(pronounced "pli-pa"). It is intended for developers who wish to use
Linux processor affinity via the sched_setaffinity() and
sched_getaffinity() library calls, but don't want to wade through the
morass of 3 different APIs that have been offered through the life of
these calls in various Linux distributions and glibc versions.
Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
University Research and Technology
Corporation. All rights reserved.
Copyright (c) 2004-2005 The Regents of the University of California.
All rights reserved.
Copyright (c) 2006-2008 Cisco Systems, Inc. All rights reserved.
$COPYRIGHT$
See LICENSE file for a rollup of all copyright notices.
$HEADER$
===========================================================================
# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
#
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights
# reserved.
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2006-2007 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
# See which mode we're building in
@PLPA_BUILD_STANDALONE_TRUE@am__append_1 = libplpa.la
@PLPA_BUILD_STANDALONE_TRUE@am__append_2 = $(public_headers)
@PLPA_BUILD_STANDALONE_FALSE@am__append_3 = libplpa_included.la
@PLPA_BUILD_STANDALONE_FALSE@am__append_4 = $(public_headers)
subdir = plpa-1.1/src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/plpa.h.in $(srcdir)/plpa_config.h.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/plpa-1.1/plpa.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h plpa_config.h plpa.h
CONFIG_CLEAN_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
libplpa_la_LIBADD =
am__objects_1 = plpa_api_probe.lo plpa_dispatch.lo plpa_runtime.lo \
plpa_map.lo
am_libplpa_la_OBJECTS = $(am__objects_1)
libplpa_la_OBJECTS = $(am_libplpa_la_OBJECTS)
@PLPA_BUILD_STANDALONE_TRUE@am_libplpa_la_rpath = -rpath $(libdir)
libplpa_included_la_LIBADD =
am_libplpa_included_la_OBJECTS = $(am__objects_1)
libplpa_included_la_OBJECTS = $(am_libplpa_included_la_OBJECTS)
@PLPA_BUILD_STANDALONE_FALSE@am_libplpa_included_la_rpath =
DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(libplpa_la_SOURCES) $(libplpa_included_la_SOURCES)
DIST_SOURCES = $(libplpa_la_SOURCES) $(libplpa_included_la_SOURCES)
nodist_includeHEADERS_INSTALL = $(INSTALL_HEADER)
HEADERS = $(nodist_include_HEADERS) $(nodist_noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
# Defaults
lib_LTLIBRARIES = $(am__append_1)
noinst_LTLIBRARIES = $(am__append_3)
nodist_include_HEADERS = $(am__append_2)
nodist_noinst_HEADERS = $(am__append_4)
# Note that this file is generated by configure, so we don't want to
# ship it in the tarball. Hence the "nodist_" prefixes to the HEADERS
# macros, below.
public_headers = plpa.h
# The sources
plpa_sources = \
plpa_internal.h \
plpa_api_probe.c \
plpa_dispatch.c \
plpa_runtime.c \
plpa_map.c
libplpa_la_SOURCES = $(plpa_sources)
libplpa_included_la_SOURCES = $(plpa_sources)
all: plpa_config.h plpa.h
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES:
.SUFFIXES: .c .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plpa-1.1/src/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu plpa-1.1/src/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
plpa_config.h: stamp-h2
@if test ! -f $@; then \
rm -f stamp-h2; \
$(MAKE) $(AM_MAKEFLAGS) stamp-h2; \
else :; fi
stamp-h2: $(srcdir)/plpa_config.h.in $(top_builddir)/config.status
@rm -f stamp-h2
cd $(top_builddir) && $(SHELL) ./config.status plpa-1.1/src/plpa_config.h
$(srcdir)/plpa_config.h.in: $(am__configure_deps)
cd $(top_srcdir) && $(AUTOHEADER)
rm -f stamp-h2
touch $@
plpa.h: stamp-h3
@if test ! -f $@; then \
rm -f stamp-h3; \
$(MAKE) $(AM_MAKEFLAGS) stamp-h3; \
else :; fi
stamp-h3: $(srcdir)/plpa.h.in $(top_builddir)/config.status
@rm -f stamp-h3
cd $(top_builddir) && $(SHELL) ./config.status plpa-1.1/src/plpa.h
distclean-hdr:
-rm -f plpa_config.h stamp-h2 plpa.h stamp-h3
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
if test -f $$p; then \
f=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
else :; fi; \
done
uninstall-libLTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
p=$(am__strip_dir) \
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
done
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
clean-noinstLTLIBRARIES:
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libplpa.la: $(libplpa_la_OBJECTS) $(libplpa_la_DEPENDENCIES)
$(LINK) $(am_libplpa_la_rpath) $(libplpa_la_OBJECTS) $(libplpa_la_LIBADD) $(LIBS)
libplpa_included.la: $(libplpa_included_la_OBJECTS) $(libplpa_included_la_DEPENDENCIES)
$(LINK) $(am_libplpa_included_la_rpath) $(libplpa_included_la_OBJECTS) $(libplpa_included_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plpa_api_probe.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plpa_dispatch.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plpa_map.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plpa_runtime.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
install-nodist_includeHEADERS: $(nodist_include_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
@list='$(nodist_include_HEADERS)'; for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f=$(am__strip_dir) \
echo " $(nodist_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
$(nodist_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
done
uninstall-nodist_includeHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(nodist_include_HEADERS)'; for p in $$list; do \
f=$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
rm -f "$(DESTDIR)$(includedir)/$$f"; \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) plpa_config.h.in plpa.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) plpa_config.h.in plpa.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) plpa_config.h.in plpa.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) plpa_config.h.in plpa.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& cd $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) $$here
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES) $(HEADERS) plpa_config.h plpa.h
installdirs:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
clean-noinstLTLIBRARIES mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-hdr distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-nodist_includeHEADERS
install-dvi: install-dvi-am
install-exec-am: install-libLTLIBRARIES
install-html: install-html-am
install-info: install-info-am
install-man:
install-pdf: install-pdf-am
install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-libLTLIBRARIES uninstall-nodist_includeHEADERS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \
ctags distclean distclean-compile distclean-generic \
distclean-hdr distclean-libtool distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-libLTLIBRARIES \
install-man install-nodist_includeHEADERS install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-libLTLIBRARIES \
uninstall-nodist_includeHEADERS
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
...@@ -14,4 +14,4 @@ ...@@ -14,4 +14,4 @@
SUBDIRS = src SUBDIRS = src
DIST_SUBDIRS = $(SUBDIRS) DIST_SUBDIRS = $(SUBDIRS)
EXTRA_DIST = README VERSION LICENSE AUTHORS plpa.m4 EXTRA_DIST = README VERSION LICENSE AUTHORS autogen.sh
Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
University Research and Technology
Corporation. All rights reserved.
Copyright (c) 2004-2005 The Regents of the University of California.
All rights reserved.
Copyright (c) 2006-2010 Cisco Systems, Inc. All rights reserved.
$COPYRIGHT$
Additional copyrights may follow
$HEADER$
===========================================================================
This file contains the main features as well as overviews of specific
bug fixes (and other actions) for each version of PLPA since
version 1.0.
1.3.2
-----
- Removed a clause from AMD's license notice in plpa_map.c by
direction from Barry S. Newberger, Ph.D., Assistant General Counsel,
Advanced Micro Devices, Inc. per a Red Hat licensing concern
(initiated at https://bugzilla.redhat.com/show_bug.cgi?id=530230).
Removing this clause alleviates Red Hat's concern, even though this
resolution not shown on the above-cited bugzilla ticket.
- Julian Seward noticed that PLPA's use of the Valgrind API in the
affinity API probe was incorrect and suggested an improvement. Even
though we're ramping down PLPA development, I couldn't really ignore
the Valgrind author's suggestion!
1.3.1
-----
- Fixed bug identified by Eugene Loh at Sun; plpa-taskset -c ranges
were accidentally excluding the processor ID at the top of the
range.
- For standalone PLPA builds, the .so library is now versioned
according to the GNU Libtool guidelines.
1.3
---
- Added --with-valgrind support that allows building support for
Valgrind into PLPA (i.e., tell Valgrind to not warn about things
that we know are ok).
1.2
---
- Allow mapping from simple/contiguous processor, socket, and core
numbers to the corresponding back-end Linux ID (and clean up
documentation references between "X number" and "X ID", where X is
one of processor, socket, core).
- Support CPU hot plugging.
- Add explicit control over the PLPA topology information cache.
1.1.1
-----
- Ensure that --enable-included also disables executables by default.
Thanks to Brian Curtis for identifying the problem and supplying a
patch.
- Add ENABLE_EXECUTABLES m4 macro to allow behavior in m4
configuration analogous to "--enable-included --enable-executables".
1.1
---
- New command: plpa-taskset. It is intended as a drop-in replacement
for the "taskset" command, except it also understands sockets and
cores. See "plpa-taskset --help" for more details
- Renamed "plpa_info" to "plpa-info".
- Added PLPA_{MAJOR|MINOR|RELEASE}_VERSION integer macros in plpa.h.
This release, they have the values of 1, 1, and 0, respectively.
- Add new API functions to map from (socket,core) back and forth from
the Linux virtual processor ID. Thanks to AMD for the initial code
contribution that made this possible. See the documentation for
plpa_map_to_processor_id() as a starting point for more
information.
- Various fixes to "included" mode.
1.0.5
-----
- Fix an issue where the PLPA get/set affinity functions would only
operate on the current process; the PID argument to these functions
was effectively ignored.
1.0.4
-----
- Fix some 64 bit issues. Thanks to David Creasy for reporting the
problems.
- Fix plpa.h to be C++-friendly. Thanks to Emmanuel Paris for
pointing out this problem.
1.0.3
-----
- Resolve some sizing / units ambiguities that mistakenly did not make
it into 1.0.1. Thanks to Bert Wesarg for pointing these problems out.
1.0.2
-----
- Ensure that plpa_sched_[set|get]affinity() returns 0 upon success.
Thanks to David Creasy for bringing this to our attention.
1.0.1
-----
- Specify that cpusetsize should be in units of bytes and add some
missing "* 8"'s in plpa_dispatch.c.
1.0
---
- Initial release.
0.9a2
-----
- Change the back-end type of the plpa_bitmask_t to unsigned long
instead of unsigned char to avoid an endian problem.
- No longer attempt to set the affinity in plpa_api_probe() to avoid a
possible race condition (setting it after getting it).
- Fix PLPA_CPU_ZERO macro. Thanks to Bogdan Costescu for pointing
this out.
0.9a1
-----
Initial public release.
This diff is collapsed.
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
# <major>.<minor>.<release>. If release is zero, then it is omitted. # <major>.<minor>.<release>. If release is zero, then it is omitted.
major=1 major=1
minor=1 minor=3
release=0 release=2
# greek is used for alpha or beta release tags. If it is non-empty, # greek is used for alpha or beta release tags. If it is non-empty,
# it will be appended to the version number. It does not have to be # it will be appended to the version number. It does not have to be
...@@ -33,4 +33,20 @@ want_svn=0 ...@@ -33,4 +33,20 @@ want_svn=0
# distribution tarball is being made from an SVN checkout, the value # distribution tarball is being made from an SVN checkout, the value
# of svn_r in this file is replaced with the output of "svnversion". # of svn_r in this file is replaced with the output of "svnversion".
svn_r=r147:149 svn_r=r264
# The shared library version of PLPA's public library. This version
# is maintained in accordance with the "Library Interface Versions"
# chapter from the GNU Libtool documentation. PLPA v<=1.3 reported
# version 0:0:0; the next release after v1.3 will explicitly set its
# .so version numbers according to the rules in the Libtool
# documentation. Notes:
# 1. Since version numbers are associated with *releases*, the version
# number maintained on the PLPA SVN trunk (and developer branches) is
# always 0:0:0.
# 2. Version numbers are described in the Libtool current:revision:age
# format.
libplpa_so_version=0:1:0
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
# Corporation. All rights reserved. # Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California. # Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved. # All rights reserved.
# Copyright (c) 2006-2008 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2004-2008 High Performance Computing Center Stuttgart,
# University of Stuttgart. All rights reserved.
# Copyright (c) 2006-2009 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$ # $COPYRIGHT$
# #
# Additional copyrights may follow # Additional copyrights may follow
...@@ -15,29 +17,53 @@ ...@@ -15,29 +17,53 @@
# Main PLPA m4 macro, to be invoked by the user # Main PLPA m4 macro, to be invoked by the user
# #
# Expects two paramters: # Expects two or three paramters:
# 1. What to do upon success # 1. Configuration prefix (optional; if not specified, "." is assumed)
# 2. What to do upon failure # 2. What to do upon success
# 3. What to do upon failure
# #
AC_DEFUN([PLPA_INIT],[ AC_DEFUN([PLPA_INIT],[
# If we used the 2 param variant of PLPA_INIT, then assume the
# config prefix is ".". Otherwise, it's $1.
m4_ifval([$3],
[_PLPA_INIT_COMPAT([$1], [$2], [$3])],
[AC_MSG_WARN([The 2-argument form of the PLPA INIT m4 macro is deprecated])
AC_MSG_WARN([It was removed starting with PLPA v1.2])
AC_MSG_ERROR([Cannot continue])])
])dnl
#-----------------------------------------------------------------------
# Do the main work for PLPA_INIT
#
# Expects three paramters:
# 1. Configuration prefix
# 2. What to do upon success
# 3. What to do upon failure
#
AC_DEFUN([_PLPA_INIT_COMPAT],[
AC_REQUIRE([_PLPA_INTERNAL_SETUP]) AC_REQUIRE([_PLPA_INTERNAL_SETUP])
AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AM_PROG_LEX])
AC_REQUIRE([AC_PROG_YACC])
m4_define([plpa_config_prefix],[$1])
# Check for syscall() # Check for syscall()
AC_CHECK_FUNC([syscall], [happy=1], [happy=0]) AC_CHECK_FUNC([syscall], [plpa_config_happy=1], [plpa_config_happy=0])
# Look for syscall.h # Look for syscall.h
if test "$happy" = 1; then if test "$plpa_config_happy" = 1; then
AC_CHECK_HEADER([sys/syscall.h], [happy=1], [happy=0]) AC_CHECK_HEADER([sys/syscall.h], [plpa_config_happy=1], [plpa_config_happy=0])
fi fi
# Look for unistd.h # Look for unistd.h
if test "$happy" = 1; then if test "$plpa_config_happy" = 1; then
AC_CHECK_HEADER([unistd.h], [happy=1], [happy=0]) AC_CHECK_HEADER([unistd.h], [plpa_config_happy=1], [plpa_config_happy=0])
fi fi
# Check for __NR_sched_setaffinity # Check for __NR_sched_setaffinity
if test "$happy" = 1; then if test "$plpa_config_happy" = 1; then
AC_MSG_CHECKING([for __NR_sched_setaffinity]) AC_MSG_CHECKING([for __NR_sched_setaffinity])
if test "$plpa_emulate" = "yes"; then if test "$plpa_emulate" = "yes"; then
AC_MSG_RESULT([emulated]) AC_MSG_RESULT([emulated])
...@@ -49,15 +75,15 @@ AC_DEFUN([PLPA_INIT],[ ...@@ -49,15 +75,15 @@ AC_DEFUN([PLPA_INIT],[
#endif #endif
int i = 1;], int i = 1;],
[AC_MSG_RESULT([yes]) [AC_MSG_RESULT([yes])
happy=1], plpa_config_happy=1],
[AC_MSG_RESULT([no]) [AC_MSG_RESULT([no])
happy=0]) plpa_config_happy=0])
fi fi
fi fi
# Check for __NR_sched_getaffinity (probably overkill, but what # Check for __NR_sched_getaffinity (probably overkill, but what
# the heck?) # the heck?)
if test "$happy" = 1; then if test "$plpa_config_happy" = 1; then
AC_MSG_CHECKING([for __NR_sched_getaffinity]) AC_MSG_CHECKING([for __NR_sched_getaffinity])
if test "$plpa_emulate" = "yes"; then if test "$plpa_emulate" = "yes"; then
AC_MSG_RESULT([emulated]) AC_MSG_RESULT([emulated])
...@@ -69,32 +95,32 @@ int i = 1;], ...@@ -69,32 +95,32 @@ int i = 1;],
#endif #endif
int i = 1;], int i = 1;],
[AC_MSG_RESULT([yes]) [AC_MSG_RESULT([yes])
happy=1], plpa_config_happy=1],
[AC_MSG_RESULT([no]) [AC_MSG_RESULT([no])
happy=0]) plpa_config_happy=0])
fi fi
fi fi
# If all was good, do the real init # If all was good, do the real init
AS_IF([test "$happy" = "1"], AS_IF([test "$plpa_config_happy" = "1"],
[_PLPA_INIT($1, $2)], [_PLPA_INIT($2, $3)],
[$2]) [$3])
PLPA_DO_AM_CONDITIONALS PLPA_DO_AM_CONDITIONALS
AC_CONFIG_FILES( AC_CONFIG_FILES(
plpa_config_prefix[/Makefile] plpa_config_prefix[/Makefile]
plpa_config_prefix[/src/Makefile] plpa_config_prefix[/src/Makefile]
plpa_config_prefix[/src/libplpa/Makefile]
) )
# Cleanup # Cleanup
unset happy unset plpa_config_happy
])dnl ])dnl
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
# Build PLPA as a standalone package # Build PLPA as a standalone package
AC_DEFUN([PLPA_STANDALONE],[ AC_DEFUN([PLPA_STANDALONE],[
m4_define([plpa_config_prefix],[.])
AC_REQUIRE([_PLPA_INTERNAL_SETUP]) AC_REQUIRE([_PLPA_INTERNAL_SETUP])
plpa_mode=standalone plpa_mode=standalone
])dnl ])dnl
...@@ -103,7 +129,11 @@ AC_DEFUN([PLPA_STANDALONE],[ ...@@ -103,7 +129,11 @@ AC_DEFUN([PLPA_STANDALONE],[
# Build PLPA as an included package # Build PLPA as an included package
AC_DEFUN([PLPA_INCLUDED],[ AC_DEFUN([PLPA_INCLUDED],[
m4_define([plpa_config_prefix],[$1]) m4_ifval([$1],
[AC_MSG_WARN([The 1-argument form of the PLPA INCLUDED m4 macro is deprecated])
AC_MSG_WARN([It was removed starting with PLPA v1.2])
AC_MSG_ERROR([Cannot continue])])
AC_REQUIRE([_PLPA_INTERNAL_SETUP]) AC_REQUIRE([_PLPA_INTERNAL_SETUP])
plpa_mode=included plpa_mode=included
PLPA_DISABLE_EXECUTABLES PLPA_DISABLE_EXECUTABLES
...@@ -137,6 +167,14 @@ AC_DEFUN([PLPA_DISABLE_EXECUTABLES],[ ...@@ -137,6 +167,14 @@ AC_DEFUN([PLPA_DISABLE_EXECUTABLES],[
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
# Disable building the executables
AC_DEFUN([PLPA_ENABLE_EXECUTABLES],[
AC_REQUIRE([_PLPA_INTERNAL_SETUP])
plpa_executables=yes
])dnl
#-----------------------------------------------------------------------
# Specify the symbol prefix # Specify the symbol prefix
AC_DEFUN([PLPA_SET_SYMBOL_PREFIX],[ AC_DEFUN([PLPA_SET_SYMBOL_PREFIX],[
AC_REQUIRE([_PLPA_INTERNAL_SETUP]) AC_REQUIRE([_PLPA_INTERNAL_SETUP])
...@@ -148,26 +186,37 @@ AC_DEFUN([PLPA_SET_SYMBOL_PREFIX],[ ...@@ -148,26 +186,37 @@ AC_DEFUN([PLPA_SET_SYMBOL_PREFIX],[
# Internals # Internals
AC_DEFUN([_PLPA_INTERNAL_SETUP],[ AC_DEFUN([_PLPA_INTERNAL_SETUP],[
AC_ARG_ENABLE([plpa_emulate], AC_ARG_ENABLE([emulate],
AC_HELP_STRING([--enable-plpa-emulate], AC_HELP_STRING([--enable-emulate],
[Emulate __NR_sched_setaffinity and __NR_sched_getaffinity, to allow building on non-Linux systems (for testing)])) [Emulate __NR_sched_setaffinity and __NR_sched_getaffinity, to allow building on non-Linux systems (for testing)]))
if test "$enable_plpa_emulate" = "yes"; then if test "$enable_emulate" = "yes"; then
plpa_emulate=yes plpa_emulate=yes
else else
plpa_emulate=no plpa_emulate=no
fi fi
dnl Hisham Muhammad: don't expose flags to htop's configure # Build and install the executables or no?
dnl AC_ARG_ENABLE([executables],
dnl # Included mode, or standalone? AC_HELP_STRING([--disable-executables],
dnl AC_ARG_ENABLE([included-mode], [Using --disable-executables disables building and installing the PLPA executables]))
dnl AC_HELP_STRING([--enable-included-mode], if test "$enable_executables" = "yes" -o "$enable_executables" = ""; then
dnl [Using --enable-included-mode puts the PLPA into "included" mode. The default is --disable-included-mode, meaning that the PLPA is in "standalone" mode.])) plpa_executables=yes
dnl if test "$enable_included_mode" = "yes"; then else
plpa_executables=no
fi
# Included mode, or standalone?
AC_ARG_ENABLE([included-mode],
AC_HELP_STRING([--enable-included-mode],
[Using --enable-included-mode puts the PLPA into "included" mode. The default is --disable-included-mode, meaning that the PLPA is in "standalone" mode.]))
if test "$enable_included_mode" = "yes"; then
plpa_mode=included plpa_mode=included
dnl else if test "$enable_executables" = ""; then
dnl plpa_mode=standalone plpa_executables=no
dnl fi fi
else
plpa_mode=standalone
fi
dnl JMS: No fortran bindings yet dnl JMS: No fortran bindings yet
dnl # Fortran bindings, or no? dnl # Fortran bindings, or no?
...@@ -180,30 +229,30 @@ dnl else ...@@ -180,30 +229,30 @@ dnl else
dnl plpa_fortran=no dnl plpa_fortran=no
dnl fi dnl fi
dnl Hisham Muhammad: don't expose flags to htop's configure # Change the symbol prefix?
dnl AC_ARG_WITH([plpa-symbol-prefix],
dnl # Build and install the executables or no? AC_HELP_STRING([--with-plpa-symbol-prefix=STRING],
dnl AC_ARG_ENABLE([executables], [STRING can be any valid C symbol name. It will be prefixed to all public PLPA symbols. Default: "plpa_"]))
dnl AC_HELP_STRING([--disable-executables], if test "$with_plpa_symbol_prefix" = ""; then
dnl [Using --disable-executables disables building and installing the PLPA executables]))
dnl if test "$enable_executables" = "yes" -o "$enable_executables" = ""; then
dnl plpa_executables=yes
dnl else
plpa_executables=no
dnl fi
dnl Hisham Muhammad: don't expose flags to htop's configure
dnl
dnl # Change the symbol prefix?
dnl AC_ARG_WITH([plpa-symbol-prefix],
dnl AC_HELP_STRING([--with-plpa-symbol-prefix=STRING],
dnl [STRING can be any valid C symbol name. It will be prefixed to all public PLPA symbols. Default: "plpa_"]))
dnl if test "$with_plpa_symbol_prefix" = ""; then
plpa_symbol_prefix_value=plpa_ plpa_symbol_prefix_value=plpa_
dnl else else
dnl plpa_symbol_prefix_value=$with_plpa_symbol_prefix plpa_symbol_prefix_value=$with_plpa_symbol_prefix
dnl fi fi
# Debug mode?
AC_ARG_ENABLE([debug],
AC_HELP_STRING([--enable-debug],
[Using --enable-debug enables various maintainer-level debugging controls. This option is not recomended for end users.]))
if test "$enable_debug" = "yes"; then
plpa_debug=1
plpa_debug_msg="enabled"
elif test "$enable_debug" = "" -a -d .svn; then
plpa_debug=1
plpa_debug_msg="enabled (SVN checkout default)"
else
plpa_debug=0
plpa_debug_msg="disabled"
fi
])dnl ])dnl
#----------------------------------------------------------------------- #-----------------------------------------------------------------------
...@@ -216,6 +265,11 @@ AC_DEFUN([_PLPA_INIT],[ ...@@ -216,6 +265,11 @@ AC_DEFUN([_PLPA_INIT],[
AC_MSG_CHECKING([for PLPA building mode]) AC_MSG_CHECKING([for PLPA building mode])
AC_MSG_RESULT([$plpa_mode]) AC_MSG_RESULT([$plpa_mode])
# Debug mode?
AC_MSG_CHECKING([if want PLPA maintainer support])
AC_DEFINE_UNQUOTED(PLPA_DEBUG, [$plpa_debug], [Whether we are in debugging more or not])
AC_MSG_RESULT([$plpa_debug_msg])
# We need to set a path for header, etc files depending on whether # We need to set a path for header, etc files depending on whether
# we're standalone or included. this is taken care of by PLPA_INCLUDED. # we're standalone or included. this is taken care of by PLPA_INCLUDED.
...@@ -226,8 +280,8 @@ AC_DEFUN([_PLPA_INIT],[ ...@@ -226,8 +280,8 @@ AC_DEFUN([_PLPA_INIT],[
# becomes the "main" config header file. Any AM_CONFIG_HEADERs # becomes the "main" config header file. Any AM_CONFIG_HEADERs
# after that (plpa.h) will only have selective #defines replaced, # after that (plpa.h) will only have selective #defines replaced,
# not the entire file. # not the entire file.
AM_CONFIG_HEADER(plpa_config_prefix[/src/plpa_config.h]) AM_CONFIG_HEADER(plpa_config_prefix[/src/libplpa/plpa_config.h])
AM_CONFIG_HEADER(plpa_config_prefix[/src/plpa.h]) AM_CONFIG_HEADER(plpa_config_prefix[/src/libplpa/plpa.h])
# What prefix are we using? # What prefix are we using?
AC_MSG_CHECKING([for PLPA symbol prefix]) AC_MSG_CHECKING([for PLPA symbol prefix])
...@@ -240,6 +294,42 @@ AC_DEFUN([_PLPA_INIT],[ ...@@ -240,6 +294,42 @@ AC_DEFUN([_PLPA_INIT],[
[The PLPA symbol prefix in all caps]) [The PLPA symbol prefix in all caps])
AC_MSG_RESULT([$plpa_symbol_prefix_value]) AC_MSG_RESULT([$plpa_symbol_prefix_value])
# Build with valgrind support if we can find it, unless it was
# explicitly disabled
AC_ARG_WITH([valgrind],
[AC_HELP_STRING([--with-valgrind(=DIR)],
[Directory where the valgrind software is installed])])
CPPFLAGS_save="$CPPFLAGS"
valgrind_happy=no
AS_IF([test "$with_valgrind" != "no"],
[AS_IF([test ! -z "$with_valgrind" -a "$with_valgrind" != "yes"],
[CPPFLAGS="$CPPFLAGS -I$with_valgrind/include"])
AC_CHECK_HEADERS([valgrind/valgrind.h],
[AC_MSG_CHECKING([for VALGRIND_CHECK_MEM_IS_ADDRESSABLE])
AC_LINK_IFELSE(AC_LANG_PROGRAM([[
#include "valgrind/memcheck.h"
]],
[[char buffer = 0xff;
VALGRIND_CHECK_MEM_IS_ADDRESSABLE(&buffer, sizeof(buffer));]]),
[AC_MSG_RESULT([yes])
valgrind_happy=yes],
[AC_MSG_RESULT([no])
AC_MSG_WARN([Need Valgrind version 3.2.0 or later.])],
[AC_MSG_RESULT([cross-compiling; assume yes...?])
AC_MSG_WARN([PLPA will fail to compile if you do not have Valgrind version 3.2.0 or later])
valgrind_happy=yes]),
],
[AC_MSG_WARN([valgrind.h not found])])
AS_IF([test "$valgrind_happy" = "no" -a "x$with_valgrind" != "x"],
[AC_MSG_WARN([Valgrind support requested but not possible])
AC_MSG_ERROR([Cannot continue])])])
AS_IF([test "$valgrind_happy" = "no"],
[CPPFLAGS="$CPPFLAGS_save"
valgrind_define=0],
[valgrind_define=1])
AC_DEFINE_UNQUOTED([PLPA_WANT_VALGRIND_SUPPORT], [$valgrind_define],
[Whether we want Valgrind support or not])
dnl JMS: No fortran bindings yet dnl JMS: No fortran bindings yet
dnl # Check for fortran dnl # Check for fortran
dnl AC_MSG_CHECKING([whether to build PLPA Fortran API]) dnl AC_MSG_CHECKING([whether to build PLPA Fortran API])
......
#
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
# University Research and Technology
# Corporation. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
#
# $HEADER$
#
SUBDIRS = libplpa
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# University of Stuttgart. All rights reserved. # University of Stuttgart. All rights reserved.
# Copyright (c) 2004-2005 The Regents of the University of California. # Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved. # All rights reserved.
# Copyright (c) 2006-2007 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2006-2009 Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$ # $COPYRIGHT$
# #
# Additional copyrights may follow # Additional copyrights may follow
...@@ -32,6 +32,7 @@ public_headers = plpa.h ...@@ -32,6 +32,7 @@ public_headers = plpa.h
if PLPA_BUILD_STANDALONE if PLPA_BUILD_STANDALONE
lib_LTLIBRARIES += libplpa.la lib_LTLIBRARIES += libplpa.la
nodist_include_HEADERS += $(public_headers) nodist_include_HEADERS += $(public_headers)
libplpa_la_LDFLAGS = -version-info $(libplpa_so_version)
else else
noinst_LTLIBRARIES += libplpa_included.la noinst_LTLIBRARIES += libplpa_included.la
nodist_noinst_HEADERS += $(public_headers) nodist_noinst_HEADERS += $(public_headers)
...@@ -47,3 +48,20 @@ plpa_sources = \ ...@@ -47,3 +48,20 @@ plpa_sources = \
libplpa_la_SOURCES = $(plpa_sources) libplpa_la_SOURCES = $(plpa_sources)
libplpa_included_la_SOURCES = $(plpa_sources) libplpa_included_la_SOURCES = $(plpa_sources)
# Add a hook to run *after* the header file has been installed out to
# the target location. It changes the pesky PACKAGE_* macros that
# autoconf automatically generates (and there is no way of turning
# off) into PLPA_PACKAGE_* in order to make <plpa.h> safe to include
# with other files.
if PLPA_BUILD_STANDALONE
install-data-hook:
sed -e 's/define PACKAGE/define PLPA_PACKAGE/' \
$(DESTDIR)$(includedir)/plpa.h \
> $(DESTDIR)$(includedir)/plpa.h.install
cp $(DESTDIR)$(includedir)/plpa.h.install \
$(DESTDIR)$(includedir)/plpa.h
rm -f $(DESTDIR)$(includedir)/plpa.h.install
chmod 0644 $(DESTDIR)$(includedir)/plpa.h
endif
...@@ -32,6 +32,16 @@ ...@@ -32,6 +32,16 @@
* function with a different prefix than "plpa_" when the * function with a different prefix than "plpa_" when the
* --enable-included-mode and --with-plpa-symbol-prefix options are * --enable-included-mode and --with-plpa-symbol-prefix options are
* supplied to PLPA's configure script. * supplied to PLPA's configure script.
*
* Note that this header file differentiates between a
* processor/socket/core ID and a processor/socket/core number. The
* "ID" is the integer that is used by Linux to identify that entity.
* These integers may or may not be contiguous. The "number" is a
* contiguous set of integers starting with 0 and going to (count-1),
* where (count) is the number of processors, sockets, and cores
* (where the count of cores is dependent upon the socket). Hence,
* "number" is a human convenience, and "ID" is the actual Linux
* identifier.
*/ */
#ifndef PLPA_H #ifndef PLPA_H
...@@ -156,7 +166,8 @@ int PLPA_NAME(api_probe)(PLPA_NAME(api_type_t) *api_type); ...@@ -156,7 +166,8 @@ int PLPA_NAME(api_probe)(PLPA_NAME(api_type_t) *api_type);
/* Set processor affinity. Use the PLPA_CPU_* macros to set the /* Set processor affinity. Use the PLPA_CPU_* macros to set the
cpuset value. The same rules and restrictions about pid apply as cpuset value. The same rules and restrictions about pid apply as
they do for the sched_setaffinity(2) system call. Returns 0 upon they do for the sched_setaffinity(2) system call. Bits set in the
CPU mask correspond to Linux processor IDs. Returns 0 upon
success. */ success. */
int PLPA_NAME(sched_setaffinity)(pid_t pid, size_t cpusetsize, int PLPA_NAME(sched_setaffinity)(pid_t pid, size_t cpusetsize,
const PLPA_NAME(cpu_set_t) *cpuset); const PLPA_NAME(cpu_set_t) *cpuset);
...@@ -164,6 +175,7 @@ int PLPA_NAME(sched_setaffinity)(pid_t pid, size_t cpusetsize, ...@@ -164,6 +175,7 @@ int PLPA_NAME(sched_setaffinity)(pid_t pid, size_t cpusetsize,
/* Get processor affinity. Use the PLPA_CPU_* macros to analyze the /* Get processor affinity. Use the PLPA_CPU_* macros to analyze the
returned value of cpuset. The same rules and restrictions about returned value of cpuset. The same rules and restrictions about
pid apply as they do for the sched_getaffinity(2) system call. pid apply as they do for the sched_getaffinity(2) system call.
Bits set in the CPU mask corresopnd to Linux processor IDs.
Returns 0 upon success. */ Returns 0 upon success. */
int PLPA_NAME(sched_getaffinity)(pid_t pid, size_t cpusetsize, int PLPA_NAME(sched_getaffinity)(pid_t pid, size_t cpusetsize,
PLPA_NAME(cpu_set_t) *cpuset); PLPA_NAME(cpu_set_t) *cpuset);
...@@ -173,34 +185,106 @@ int PLPA_NAME(sched_getaffinity)(pid_t pid, size_t cpusetsize, ...@@ -173,34 +185,106 @@ int PLPA_NAME(sched_getaffinity)(pid_t pid, size_t cpusetsize,
available if supported == 1 and the function returns 0. */ available if supported == 1 and the function returns 0. */
int PLPA_NAME(have_topology_information)(int *supported); int PLPA_NAME(have_topology_information)(int *supported);
/* Map (socket,core) tuple to virtual processor ID. processor_id is /* Map (socket_id,core_id) tuple to virtual processor ID. processor_id is
then suitable for use with the PLPA_CPU_* macros, probably leading then suitable for use with the PLPA_CPU_* macros, probably leading
to a call to plpa_sched_setaffinity(). Returns 0 upon success. */ to a call to plpa_sched_setaffinity(). Returns 0 upon success. */
int PLPA_NAME(map_to_processor_id)(int socket, int core, int *processor_id); int PLPA_NAME(map_to_processor_id)(int socket_id, int core_id,
int *processor_id);
/* Map processor_id to (socket,core) tuple. The processor_id input is /* Map processor_id to (socket_id,core_id) tuple. The processor_id input is
usually obtained from the return from the plpa_sched_getaffinity() usually obtained from the return from the plpa_sched_getaffinity()
call, using PLPA_CPU_ISSET to find individual bits in the map that call, using PLPA_CPU_ISSET to find individual bits in the map that
were set/unset. plpa_map_to_socket_core() can map the bit indexes were set/unset. plpa_map_to_socket_core() can map the bit indexes
to a socket/core tuple. Returns 0 upon success. */ to a socket/core tuple. Returns 0 upon success. */
int PLPA_NAME(map_to_socket_core)(int processor_id, int *socket, int *core); int PLPA_NAME(map_to_socket_core)(int processor_id,
int *socket_id, int *core_id);
/* Return the max processor ID. Returns both the number of processors /* This function is deprecated and will disappear in a future release.
(cores) in a system and the maximum Linux virtual processor ID It is exactly equivalent to calling
(because it may be higher than the number of processors if there plpa_get_processor_data(PLPA_COUNT_ALL, num_processors,
are "holes" in the available Linux virtual processor IDs). Returns max_processor_id). */
0 upon success. */
int PLPA_NAME(get_processor_info)(int *num_processors, int *max_processor_id); int PLPA_NAME(get_processor_info)(int *num_processors, int *max_processor_id);
/* Typedefs for specifying which processors / sockets / cores to count
in get_processor_data() and get_processor_id() */
typedef enum {
/* Only count online processors */
PLPA_NAME_CAPS(COUNT_ONLINE),
/* Only count offline processors */
PLPA_NAME_CAPS(COUNT_OFFLINE),
/* Count all processors (online and offline) */
PLPA_NAME_CAPS(COUNT_ALL)
} PLPA_NAME(count_specification_t);
/* Returns both the number of processors in a system and the maximum
Linux virtual processor ID (because it may be higher than the
number of processors if there are "holes" in the available Linux
virtual processor IDs). The count_spec argument specifies whether
to count all processors, only online processors, or only offline
processors. Returns 0 upon success. */
int PLPA_NAME(get_processor_data)(PLPA_NAME(count_specification_t) count_spec,
int *num_processors, int *max_processor_id);
/* Returns the Linux processor ID for the Nth processor. For example,
if the Linux processor IDs have "holes", use this function to say
"give me the Linux processor ID of the 4th processor." count_spec
specifies whether to count online, offline, or all processors when
looking for the processor_num'th processor. Returns 0 upon
success. */
int PLPA_NAME(get_processor_id)(int processor_num,
PLPA_NAME(count_specification_t) count_spec,
int *processor_id);
/* Check to see if a given Linux processor ID exists / is online.
Returns 0 on success. */
int PLPA_NAME(get_processor_flags)(int processor_id, int *exists, int *online);
/* Returns both the number of sockets in the system and the maximum /* Returns both the number of sockets in the system and the maximum
socket ID number (in case there are "holes" in the list of available socket ID number (in case there are "holes" in the list of available
socket IDs). Returns 0 upon sucess. */ socket IDs). Returns 0 upon sucess. */
int PLPA_NAME(get_socket_info)(int *num_sockets, int *max_socket_id); int PLPA_NAME(get_socket_info)(int *num_sockets, int *max_socket_id);
/* Returns the Linux socket ID for the Nth socket. For example, if
the socket IDs have "holes", use this function to say "give me the
Linux socket ID of the 2nd socket." Linux does not specify the
socket/core tuple information for offline processors, so a
plpa_count_specification_t parameter is not used here. Returns 0
upon success. */
int PLPA_NAME(get_socket_id)(int socket_num, int *socket_id);
/* Return both the number of cores and the max code ID for a given /* Return both the number of cores and the max code ID for a given
socket (in case there are "holes" in the list of available core socket (in case there are "holes" in the list of available core
IDs). Returns 0 upon success. */ IDs). Returns 0 upon success. */
int PLPA_NAME(get_core_info)(int socket, int *num_cores, int *max_core_id); int PLPA_NAME(get_core_info)(int socket_id, int *num_cores, int *max_core_id);
/* Given a specific socket, returns the Linux core ID for the Nth
core. For example, if the core IDs have "holes", use this function
to say "give me the Linux core ID of the 4th core on socket ID 7."
Linux does not specify the socket/core tuple information for
offline processors, so a plpa_count_specification_t parameter is
not used here. Returns 0 upon success. Returns 0 upon success. */
int PLPA_NAME(get_core_id)(int socket_id, int core_num, int *core_id);
/* Check to see if a given Linux (socket_id,core_id) tuple exists / is
online. Returns 0 on success. */
int PLPA_NAME(get_core_flags)(int socket_id, int core_id,
int *exists, int *online);
/* Typedefs for specifying the cache behavior via
plpa_set_cache_behavior() */
typedef enum {
/* Use the cache (default behavior); fills the cache right now if
it's not already full */
PLPA_NAME_CAPS(CACHE_USE),
/* Never use the cache; always look up the information in
the kernel */
PLPA_NAME_CAPS(CACHE_IGNORE),
/* Refresh the cache right now */
PLPA_NAME_CAPS(CACHE_REFRESH)
} PLPA_NAME(cache_behavior_t);
/* Set PLPA's cache behavior. Returns 0 upon success. */
int PLPA_NAME(set_cache_behavior)(PLPA_NAME(cache_behavior_t));
/* Shut down PLPA. This function releases resources used by the PLPA. /* Shut down PLPA. This function releases resources used by the PLPA.
It should be the last PLPA function invoked, or can be used to It should be the last PLPA function invoked, or can be used to
......
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
#include <sys/syscall.h> #include <sys/syscall.h>
#include <unistd.h> #include <unistd.h>
#if PLPA_WANT_VALGRIND_SUPPORT
#include "valgrind/memcheck.h"
#endif
/* Cache, just to make things a little more efficient */ /* Cache, just to make things a little more efficient */
static PLPA_NAME(api_type_t) cache = PLPA_NAME_CAPS(PROBE_UNSET); static PLPA_NAME(api_type_t) cache = PLPA_NAME_CAPS(PROBE_UNSET);
...@@ -40,7 +44,20 @@ int PLPA_NAME(api_probe_init)(void) ...@@ -40,7 +44,20 @@ int PLPA_NAME(api_probe_init)(void)
size_t tmp = (0 != rc) ? ((size_t) rc) : len; size_t tmp = (0 != rc) ? ((size_t) rc) : len;
/* Pass mask=NULL, expect errno==EFAULT if tmp was OK /* Pass mask=NULL, expect errno==EFAULT if tmp was OK
as a length */ as a length */
#if PLPA_WANT_VALGRIND_SUPPORT
/* Lie to Valgrind and say that this memory is addressible
so that we don't get a false positive here -- we *know*
that 0 is unaddressible; that's the whole point of this
test (to see what error NR_sched_set_affinity will
return). So let's not see a warning from Valgrind from
something that we know is wrong. :-) */
VALGRIND_MAKE_MEM_DEFINED(0, len);
#endif
rc = syscall(__NR_sched_setaffinity, 0, tmp, NULL); rc = syscall(__NR_sched_setaffinity, 0, tmp, NULL);
#if PLPA_WANT_VALGRIND_SUPPORT
VALGRIND_MAKE_MEM_UNDEFINED(0, len);
VALGRIND_MAKE_MEM_NOACCESS(0, len);
#endif
if ((rc < 0) && (errno == EFAULT)) { if ((rc < 0) && (errno == EFAULT)) {
cache = PLPA_NAME_CAPS(PROBE_OK); cache = PLPA_NAME_CAPS(PROBE_OK);
PLPA_NAME(len) = tmp; PLPA_NAME(len) = tmp;
......
...@@ -48,6 +48,9 @@ ...@@ -48,6 +48,9 @@
/* Define to 1 if you have the <unistd.h> header file. */ /* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H #undef HAVE_UNISTD_H
/* Define to 1 if you have the <valgrind/valgrind.h> header file. */
#undef HAVE_VALGRIND_VALGRIND_H
/* Define to the sub-directory in which libtool stores uninstalled libraries. /* Define to the sub-directory in which libtool stores uninstalled libraries.
*/ */
#undef LT_OBJDIR #undef LT_OBJDIR
...@@ -70,7 +73,7 @@ ...@@ -70,7 +73,7 @@
/* Define to the version of this package. */ /* Define to the version of this package. */
#undef PACKAGE_VERSION #undef PACKAGE_VERSION
/* Whether we're in debugging mode or not */ /* Whether we are in debugging more or not */
#undef PLPA_DEBUG #undef PLPA_DEBUG
/* Major version of PLPA */ /* Major version of PLPA */
...@@ -88,6 +91,9 @@ ...@@ -88,6 +91,9 @@
/* The PLPA symbol prefix in all caps */ /* The PLPA symbol prefix in all caps */
#undef PLPA_SYM_PREFIX_CAPS #undef PLPA_SYM_PREFIX_CAPS
/* Whether we want Valgrind support or not */
#undef PLPA_WANT_VALGRIND_SUPPORT
/* Define to 1 if you have the ANSI C header files. */ /* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS #undef STDC_HEADERS
......
...@@ -106,11 +106,7 @@ int PLPA_NAME(sched_setaffinity)(pid_t pid, size_t cpusetsize, ...@@ -106,11 +106,7 @@ int PLPA_NAME(sched_setaffinity)(pid_t pid, size_t cpusetsize,
/* Return 0 upon success. According to /* Return 0 upon success. According to
http://www.open-mpi.org/community/lists/plpa-users/2006/02/0016.php, http://www.open-mpi.org/community/lists/plpa-users/2006/02/0016.php,
all the kernel implementations return >= 0 upon success. */ all the kernel implementations return >= 0 upon success. */
if (ret >= 0) { return (ret >= 0) ? 0 : ret;
return 0;
} else {
return ret;
}
break; break;
case PLPA_NAME_CAPS(PROBE_NOT_SUPPORTED): case PLPA_NAME_CAPS(PROBE_NOT_SUPPORTED):
...@@ -180,11 +176,7 @@ int PLPA_NAME(sched_getaffinity)(pid_t pid, size_t cpusetsize, ...@@ -180,11 +176,7 @@ int PLPA_NAME(sched_getaffinity)(pid_t pid, size_t cpusetsize,
/* Return 0 upon success. According to /* Return 0 upon success. According to
http://www.open-mpi.org/community/lists/plpa-users/2006/02/0016.php, http://www.open-mpi.org/community/lists/plpa-users/2006/02/0016.php,
all the kernel implementations return >= 0 upon success. */ all the kernel implementations return >= 0 upon success. */
if (ret >= 0) { return (ret >= 0) ? 0 : ret;
return 0;
} else {
return ret;
}
break; break;
case PLPA_NAME_CAPS(PROBE_NOT_SUPPORTED): case PLPA_NAME_CAPS(PROBE_NOT_SUPPORTED):
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* All rights reserved. * All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California. * Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved. * All rights reserved.
* Copyright (c) 2007 Cisco Systems, Inc. All rights reserved. * Copyright (c) 2007-2008 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$ * $COPYRIGHT$
* *
* Additional copyrights may follow * Additional copyrights may follow
...@@ -23,14 +23,8 @@ extern int PLPA_NAME(initialized); ...@@ -23,14 +23,8 @@ extern int PLPA_NAME(initialized);
/* Cached size of the affinity buffers that the kernel expects */ /* Cached size of the affinity buffers that the kernel expects */
extern size_t PLPA_NAME(len); extern size_t PLPA_NAME(len);
/* Setup topology information */
int PLPA_NAME(map_init)(void);
/* Setup API type */ /* Setup API type */
int PLPA_NAME(api_probe_init)(void); int PLPA_NAME(api_probe_init)(void);
/* Free all mapping memory */
void PLPA_NAME(map_finalize)(void);
#endif /* PLPA_INTERNAL_H */ #endif /* PLPA_INTERNAL_H */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment