]> git.ipfire.org Git - thirdparty/bird.git/commit
Config: Make the parser and lexer reentrant.
authorMaria Jan Matejka <mq@jmq.cz>
Mon, 13 Aug 2018 09:41:27 +0000 (11:41 +0200)
committerJan Maria Matejka <mq@ucw.cz>
Fri, 14 Sep 2018 12:44:45 +0000 (14:44 +0200)
commitf93315c417da0ea8d29618cf64a7d9338ca35b58
tree4186b5d561feb04ecb4669ce74715537e1f60f75
parent64c5ad58d276d8a0463aa9ad2b34f75b7d1f4108
Config: Make the parser and lexer reentrant.

This is part of the multithreading journey. The parser and lexer were
using loads of global variables and all of these are now packed into
struct cf_context and others.

Note that the config API has changed:

* cfg_alloc[zu]?(size) is now cf_alloc[zu]?(ctx, size)
* cf_error(msg, ...) is now cf_error(ctx, msg, ...)
* config_parse() and cli_parse() are now called differently
* there is a brand new CF_CTX section in *.Y files which participates
  in struct cf_context construction
59 files changed:
Makefile.in
conf/Makefile
conf/cf-lex.l
conf/conf.c
conf/conf.h
conf/confbase.Y
conf/flowspec.Y
conf/gen_context.m4 [new file with mode: 0644]
conf/gen_keywords.m4
conf/gen_parser.m4
conf/parser.h [new file with mode: 0644]
conf/symbols.c [new file with mode: 0644]
filter/config.Y
filter/f-util.c
filter/f-util.h [new file with mode: 0644]
filter/filter.c
filter/filter.h
filter/tree.c
lib/flowspec.c
lib/flowspec.h
nest/bfd.h
nest/cli.c
nest/cmds.h
nest/config.Y
nest/proto.c
nest/protocol.h
nest/route.h
nest/rt-dev.c
nest/rt-show.c
nest/rt-table.c
proto/babel/babel.c
proto/babel/config.Y
proto/bfd/bfd.c
proto/bfd/config.Y
proto/bgp/bgp.c
proto/bgp/config.Y
proto/ospf/config.Y
proto/ospf/ospf.c
proto/ospf/ospf.h
proto/pipe/config.Y
proto/pipe/pipe.c
proto/radv/config.Y
proto/radv/radv.c
proto/rip/config.Y
proto/rip/rip.c
proto/rpki/config.Y
proto/rpki/rpki.c
proto/rpki/rpki.h
proto/static/config.Y
proto/static/static.c
sysdep/bsd/krt-sock.Y
sysdep/unix/Makefile
sysdep/unix/conf.c [new file with mode: 0644]
sysdep/unix/config.Y
sysdep/unix/krt.Y
sysdep/unix/krt.c
sysdep/unix/krt.h
sysdep/unix/main.c
sysdep/unix/unix.h