2
0

get_thread_size.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /* get_thread_size.c -- trivial program to determine stack frame size
  2. * for a Linux kernel thread, given a configured source tree.
  3. *
  4. * Copyright (C) 2006-2023 wolfSSL Inc.
  5. *
  6. * This file is part of wolfSSL.
  7. *
  8. * wolfSSL is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * wolfSSL is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
  21. */
  22. #ifndef __KERNEL__
  23. #define __KERNEL__
  24. #endif
  25. #include <linux/kconfig.h>
  26. #include <linux/kernel.h>
  27. #include <linux/kthread.h>
  28. extern int dprintf(int fd, const char *format, ...);
  29. int main(__maybe_unused int argc, __maybe_unused char **argv) {
  30. dprintf(1, "%lu\n",THREAD_SIZE);
  31. return 0;
  32. }