diff options
author | Zachary T Welch <zw@superlucidity.net> | 2009-11-14 07:29:16 -0800 |
---|---|---|
committer | Zachary T Welch <zw@superlucidity.net> | 2009-11-14 07:29:16 -0800 |
commit | 4088b1e622cff0673f2859de5ee611da736bdba7 (patch) | |
tree | 7049a500c42efee0071b9838a08e5a84478e7ea3 /src/openocd.h | |
parent | ab3bdfb2cb7b0c16800195951e4ee549cf8e86a5 (diff) |
add openocd.h for top-level declarations
Create src/openocd.h to hold declarations previously made internally
by src/main.c and src/server/server.c. This ensures all functions
are verified to be in-sync at compile time (rather than at link),
making it easier to track down bugs.
Diffstat (limited to 'src/openocd.h')
-rw-r--r-- | src/openocd.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/openocd.h b/src/openocd.h new file mode 100644 index 00000000..1bf6b7e6 --- /dev/null +++ b/src/openocd.h @@ -0,0 +1,39 @@ +/*************************************************************************** + * Copyright (C) 2005 by Dominic Rath <Dominic.Rath@gmx.de> * + * Copyright (C) 2009 by Zachary T Welch <zw@superlucidity.net> * + * * + * 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. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#ifndef OPENOCD_H +#define OPENOCD_H + +/** + * Different applications can define this entry point to override + * the default openocd main function. On most systems, this will be + * defined in src/openocd.c. + * @param argc normally passed from main() + * @param argv normally passed from main() + * @returns return code for main() + */ +int openocd_main(int argc, char *argv[]); + +/// used by the server_loop() function in src/server/server.c +void openocd_sleep_prelude(void); +/// used by the server_loop() function in src/server/server.c +void openocd_sleep_postlude(void); + +#endif |