diff --git a/binfmt/binfmt_execsymtab.c b/binfmt/binfmt_execsymtab.c index ceb532d94c..09a36bfce7 100644 --- a/binfmt/binfmt_execsymtab.c +++ b/binfmt/binfmt_execsymtab.c @@ -1,7 +1,7 @@ /**************************************************************************** * binfmt/binfmt_execsymtab.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -41,6 +41,7 @@ #include +#include #include #include @@ -116,10 +117,10 @@ void exec_getsymtab(FAR const struct symtab_s **symtab, FAR int *nsymbols) * size are returned as a single atomic operation. */ - flags = irqsave(); + flags = enter_critical_section(); *symtab = g_exec_symtab; *nsymbols = g_exec_nsymbols; - irqrestore(flags); + leave_critical_section(flags); } /**************************************************************************** @@ -147,10 +148,10 @@ void exec_setsymtab(FAR const struct symtab_s *symtab, int nsymbols) * size are set as a single atomic operation. */ - flags = irqsave(); + flags = enter_critical_section(); g_exec_symtab = symtab; g_exec_nsymbols = nsymbols; - irqrestore(flags); + leave_critical_section(flags); } #endif /* CONFIG_LIBC_EXECFUNCS */ \ No newline at end of file diff --git a/binfmt/binfmt_schedunload.c b/binfmt/binfmt_schedunload.c index b9c6a9d6d1..f9da1349f6 100644 --- a/binfmt/binfmt_schedunload.c +++ b/binfmt/binfmt_schedunload.c @@ -1,7 +1,7 @@ /**************************************************************************** * binfmt/binfmt_schedunload.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013, 2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -43,6 +43,7 @@ #include #include +#include #include #include @@ -105,10 +106,10 @@ static void unload_list_add(pid_t pid, FAR struct binary_s *bin) * interrupts. */ - flags = irqsave(); + flags = enter_critical_section(); bin->flink = g_unloadhead; g_unloadhead = bin; - irqrestore(flags); + leave_critical_section(flags); } /**************************************************************************** @@ -313,13 +314,13 @@ int schedule_unload(pid_t pid, FAR struct binary_s *bin) /* Emergency removal from the list */ - flags = irqsave(); + flags = enter_critical_section(); if (unload_list_remove(pid) != bin) { blldbg("ERROR: Failed to remove structure\n"); } - irqrestore(flags); + leave_critical_section(flags); goto errout; }