1
0
Fork 0
forked from nuttx/nuttx-update

coredump:Move private functions to internal header files

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
anjiahao 2024-07-09 23:01:57 +08:00 committed by Xiang Xiao
parent 4ec4c5e1b4
commit 9e868cadfb
5 changed files with 63 additions and 27 deletions

View file

@ -54,28 +54,4 @@ int coredump_set_memory_region(FAR const struct memory_region_s *region);
int coredump_add_memory_region(FAR const void *ptr, size_t size);
/****************************************************************************
* Name: coredump_initialize
*
* Description:
* Initialize the coredump facility. Called once and only from
* nx_start_application.
*
****************************************************************************/
int coredump_initialize(void);
/****************************************************************************
* Name: coredump_dump
*
* Description:
* Do coredump of the task specified by pid.
*
* Input Parameters:
* pid - The task/thread ID of the thread to dump
*
****************************************************************************/
void coredump_dump(pid_t pid);
#endif /* __INCLUDE_NUTTX_COREDUMP_H */

View file

@ -34,7 +34,6 @@
#include <nuttx/arch.h>
#include <nuttx/board.h>
#include <nuttx/coredump.h>
#include <nuttx/fs/fs.h>
#include <nuttx/init.h>
#include <nuttx/nuttx.h>
@ -52,6 +51,7 @@
#include "sched/sched.h"
#include "wqueue/wqueue.h"
#include "init/init.h"
#include "misc/coredump.h"
#ifdef CONFIG_ETC_ROMFS
# include <nuttx/drivers/ramdisk.h>

View file

@ -31,6 +31,7 @@
#include <nuttx/cache.h>
#include <nuttx/coredump.h>
#include <nuttx/compiler.h>
#include <nuttx/fs/fs.h>
#include <nuttx/irq.h>
#include <nuttx/init.h>
#include <nuttx/irq.h>
@ -58,6 +59,7 @@
#include "irq/irq.h"
#include "sched/sched.h"
#include "group/group.h"
#include "coredump.h"
/****************************************************************************
* Pre-processor Definitions

View file

@ -24,11 +24,11 @@
* Included Files
****************************************************************************/
#include <nuttx/binfmt/binfmt.h>
#include <nuttx/coredump.h>
#include <syslog.h>
#include <debug.h>
#include "coredump.h"
/****************************************************************************
* Private Data
****************************************************************************/

58
sched/misc/coredump.h Normal file
View file

@ -0,0 +1,58 @@
/****************************************************************************
* sched/misc/coredump.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*
****************************************************************************/
#ifndef __SCHED_MISC_COREDUMP_H
#define __SCHED_MISC_COREDUMP_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/coredump.h>
/****************************************************************************
* Public Function Prototypes
****************************************************************************/
/****************************************************************************
* Name: coredump_initialize
*
* Description:
* Initialize the coredump facility. Called once and only from
* nx_start_application.
*
****************************************************************************/
int coredump_initialize(void);
/****************************************************************************
* Name: coredump_dump
*
* Description:
* Do coredump of the task specified by pid.
*
* Input Parameters:
* pid - The task/thread ID of the thread to dump
*
****************************************************************************/
void coredump_dump(pid_t pid);
#endif /* __SCHED_MISC_COREDUMP_H */