diff options
author | Bruno Haible <bruno@clisp.org> | 2019-07-15 02:36:10 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-07-15 02:36:10 +0200 |
commit | 3fdb19cf7a5c3c4ada691fdb9d8e01701c747298 (patch) | |
tree | 02fc733152bbbaa921b137ee341868562c9fc84c /modules/sched | |
parent | f76440c5c82def5a6e7541b224d9a5b794b689a1 (diff) | |
download | gnulib-3fdb19cf7a5c3c4ada691fdb9d8e01701c747298.tar.gz |
sched_yield: New module.
* lib/sched.in.h: Add _GL_FUNCDECL_RPL, _GL_WARN_ON_USE placeholders.
(sched_yield): New declaration.
* lib/sched_yield.c: New file.
* m4/sched_yield.m4: New file.
* m4/sched_h.m4 (gl_SCHED_H): Require gl_SCHED_H_DEFAULTS. Arrange to
provide a replacement sched.h always. Test whether sched_yield is
declared.
(gl_SCHED_MODULE_INDICATOR, gl_SCHED_H_DEFAULTS): New macros.
* modules/sched (Depends-on): Add snippet/c++defs, snippet/warn-on-use.
(Makefile.am): Provide a replacement sched.h always. Substitute
GNULIB_SCHED_YIELD, HAVE_SCHED_YIELD, REPLACE_SCHED_YIELD,
_GL_FUNCDECL_RPL, _GL_WARN_ON_USE.
* modules/sched_yield: New file.
* doc/posix-functions/sched_yield.texi: Mention the new module.
Diffstat (limited to 'modules/sched')
-rw-r--r-- | modules/sched | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/modules/sched b/modules/sched index b6f285234b..0b6bcae569 100644 --- a/modules/sched +++ b/modules/sched @@ -7,17 +7,18 @@ m4/sched_h.m4 Depends-on: include_next +snippet/c++defs +snippet/warn-on-use configure.ac: gl_SCHED_H Makefile.am: -BUILT_SOURCES += $(SCHED_H) +BUILT_SOURCES += sched.h # We need the following in order to create a replacement for <sched.h> when # the system doesn't have one. -if GL_GENERATE_SCHED_H -sched.h: sched.in.h $(top_builddir)/config.status +sched.h: sched.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ @@ -28,13 +29,14 @@ sched.h: sched.in.h $(top_builddir)/config.status -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SCHED_H''@|$(NEXT_SCHED_H)|g' \ -e 's|@''HAVE_STRUCT_SCHED_PARAM''@|$(HAVE_STRUCT_SCHED_PARAM)|g' \ + -e 's/@''GNULIB_SCHED_YIELD''@/$(GNULIB_SCHED_YIELD)/g' \ + -e 's|@''HAVE_SCHED_YIELD''@|$(HAVE_SCHED_YIELD)|g' \ + -e 's|@''REPLACE_SCHED_YIELD''@|$(REPLACE_SCHED_YIELD)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/sched.in.h; \ } > $@-t && \ mv $@-t $@ -else -sched.h: $(top_builddir)/config.status - rm -f $@ -endif MOSTLYCLEANFILES += sched.h sched.h-t Include: |