diff options
| author | Garrett D'Amore <garrett@damore.org> | 2016-12-22 01:05:43 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2016-12-22 01:05:43 -0800 |
| commit | b92672e20420683e73bfc017956ac6ef2b6b793b (patch) | |
| tree | fb110918430e41a3751ea63801f8acb7c21b7db9 /src/core/panic.h | |
| parent | 0283e8bbef80d42fda1cd9b21e4d14673c3641b8 (diff) | |
| download | nng-b92672e20420683e73bfc017956ac6ef2b6b793b.tar.gz nng-b92672e20420683e73bfc017956ac6ef2b6b793b.tar.bz2 nng-b92672e20420683e73bfc017956ac6ef2b6b793b.zip | |
Logic for socket shutdown, cleanup, and draining figured out.
There's work to do still, but I've left clear indications of the
design in comments. Some ugly mysteries are now solved.
Diffstat (limited to 'src/core/panic.h')
| -rw-r--r-- | src/core/panic.h | 46 |
1 files changed, 21 insertions, 25 deletions
diff --git a/src/core/panic.h b/src/core/panic.h index 88ddb7b0..323d64a1 100644 --- a/src/core/panic.h +++ b/src/core/panic.h @@ -1,33 +1,29 @@ -/* - * Copyright 2016 Garrett D'Amore <garrett@damore.org> - * - * This software is supplied under the terms of the MIT License, a - * copy of which should be located in the distribution where this - * file was obtained (LICENSE.txt). A copy of the license may also be - * found online at https://opensource.org/licenses/MIT. - */ +// +// Copyright 2016 Garrett D'Amore <garrett@damore.org> +// +// This software is supplied under the terms of the MIT License, a +// copy of which should be located in the distribution where this +// file was obtained (LICENSE.txt). A copy of the license may also be +// found online at https://opensource.org/licenses/MIT. +// #ifndef CORE_PANIC_H #define CORE_PANIC_H -/* - * nni_panic is used to terminate the process with prejudice, and - * should only be called in the face of a critical programming error, - * or other situation where it would be unsafe to attempt to continue. - * As this crashes the program, it should never be used when factors outside - * the program can cause it, such as receiving protocol errors, or running - * out of memory. Its better in those cases to return an error to the - * program and let the caller handle the error situation. - */ +// nni_panic is used to terminate the process with prejudice, and +// should only be called in the face of a critical programming error, +// or other situation where it would be unsafe to attempt to continue. +// As this crashes the program, it should never be used when factors outside +// the program can cause it, such as receiving protocol errors, or running +// out of memory. Its better in those cases to return an error to the +// program and let the caller handle the error situation. extern void nni_panic(const char *, ...); -/* - * nni_println is used to print output to a debug console. This should only - * be used in the most dire of circumstances -- such as during an assertion - * failure that is going to cause the program to crash. After the string is - * emitted, a new line character is emitted, so the string should not - * include one. - */ +// nni_println is used to print output to a debug console. This should only +// be used in the most dire of circumstances -- such as during an assertion +// failure that is going to cause the program to crash. After the string is +// emitted, a new line character is emitted, so the string should not +// include one. extern void nni_println(const char *); -#endif /* CORE_PANIC_H */ +#endif // CORE_PANIC_H |
