diff mbox series

[v3,05/32] Mini-OS: add EXPORT_SYMBOL() instances to sched.c

Message ID 20231127102523.28003-6-jgross@suse.com (mailing list archive)
State New, archived
Headers show
Series Mini-OS: hide mini-os internal symbols | expand

Commit Message

Jürgen Groß Nov. 27, 2023, 10:24 a.m. UTC
Add the needed instances of EXPORT_SYMBOL() to sched.c.

Signed-off-by: Juergen Gross <jgross@suse.com>
---
V3:
- new patch
---
 arch/x86/sched.c | 5 +++++
 sched.c          | 7 +++++++
 2 files changed, 12 insertions(+)

Comments

Samuel Thibault Nov. 27, 2023, 7:58 p.m. UTC | #1
Juergen Gross, le lun. 27 nov. 2023 11:24:56 +0100, a ecrit:
> Add the needed instances of EXPORT_SYMBOL() to sched.c.
> 
> Signed-off-by: Juergen Gross <jgross@suse.com>

Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

> ---
> V3:
> - new patch
> ---
>  arch/x86/sched.c | 5 +++++
>  sched.c          | 7 +++++++
>  2 files changed, 12 insertions(+)
> 
> diff --git a/arch/x86/sched.c b/arch/x86/sched.c
> index e7b6954e..dabe6fd6 100644
> --- a/arch/x86/sched.c
> +++ b/arch/x86/sched.c
> @@ -142,11 +142,13 @@ unsigned long __local_irq_save(void)
>      local_irq_save(flags);
>      return flags;
>  }
> +EXPORT_SYMBOL(__local_irq_save);
>  
>  void __local_irq_restore(unsigned long flags)
>  {
>      local_irq_restore(flags);
>  }
> +EXPORT_SYMBOL(__local_irq_restore);
>  
>  unsigned long __local_save_flags(void)
>  {
> @@ -155,13 +157,16 @@ unsigned long __local_save_flags(void)
>      local_save_flags(flags);
>      return flags;
>  }
> +EXPORT_SYMBOL(__local_save_flags);
>  
>  void __local_irq_disable(void)
>  {
>      local_irq_disable();
>  }
> +EXPORT_SYMBOL(__local_irq_disable);
>  
>  void __local_irq_enable(void)
>  {
>      local_irq_enable();
>  }
> +EXPORT_SYMBOL(__local_irq_enable);
> diff --git a/sched.c b/sched.c
> index 6f89ea4d..e162cb60 100644
> --- a/sched.c
> +++ b/sched.c
> @@ -128,6 +128,7 @@ void schedule(void)
>          }
>      }
>  }
> +EXPORT_SYMBOL(schedule);
>  
>  struct thread* create_thread(char *name, void (*function)(void *), void *data)
>  {
> @@ -147,6 +148,7 @@ struct thread* create_thread(char *name, void (*function)(void *), void *data)
>      local_irq_restore(flags);
>      return thread;
>  }
> +EXPORT_SYMBOL(create_thread);
>  
>  #ifdef HAVE_LIBC
>  static struct _reent callback_reent;
> @@ -184,6 +186,7 @@ struct _reent *__getreent(void)
>  #endif
>      return _reent;
>  }
> +EXPORT_SYMBOL(__getreent);
>  #endif
>  
>  void exit_thread(void)
> @@ -205,12 +208,14 @@ void exit_thread(void)
>          printk("schedule() returned!  Trying again\n");
>      }
>  }
> +EXPORT_SYMBOL(exit_thread);
>  
>  void block(struct thread *thread)
>  {
>      thread->wakeup_time = 0LL;
>      clear_runnable(thread);
>  }
> +EXPORT_SYMBOL(block);
>  
>  void msleep(uint32_t millisecs)
>  {
> @@ -219,12 +224,14 @@ void msleep(uint32_t millisecs)
>      clear_runnable(thread);
>      schedule();
>  }
> +EXPORT_SYMBOL(msleep);
>  
>  void wake(struct thread *thread)
>  {
>      thread->wakeup_time = 0LL;
>      set_runnable(thread);
>  }
> +EXPORT_SYMBOL(wake);
>  
>  void idle_thread_fn(void *unused)
>  {
> -- 
> 2.35.3
>
diff mbox series

Patch

diff --git a/arch/x86/sched.c b/arch/x86/sched.c
index e7b6954e..dabe6fd6 100644
--- a/arch/x86/sched.c
+++ b/arch/x86/sched.c
@@ -142,11 +142,13 @@  unsigned long __local_irq_save(void)
     local_irq_save(flags);
     return flags;
 }
+EXPORT_SYMBOL(__local_irq_save);
 
 void __local_irq_restore(unsigned long flags)
 {
     local_irq_restore(flags);
 }
+EXPORT_SYMBOL(__local_irq_restore);
 
 unsigned long __local_save_flags(void)
 {
@@ -155,13 +157,16 @@  unsigned long __local_save_flags(void)
     local_save_flags(flags);
     return flags;
 }
+EXPORT_SYMBOL(__local_save_flags);
 
 void __local_irq_disable(void)
 {
     local_irq_disable();
 }
+EXPORT_SYMBOL(__local_irq_disable);
 
 void __local_irq_enable(void)
 {
     local_irq_enable();
 }
+EXPORT_SYMBOL(__local_irq_enable);
diff --git a/sched.c b/sched.c
index 6f89ea4d..e162cb60 100644
--- a/sched.c
+++ b/sched.c
@@ -128,6 +128,7 @@  void schedule(void)
         }
     }
 }
+EXPORT_SYMBOL(schedule);
 
 struct thread* create_thread(char *name, void (*function)(void *), void *data)
 {
@@ -147,6 +148,7 @@  struct thread* create_thread(char *name, void (*function)(void *), void *data)
     local_irq_restore(flags);
     return thread;
 }
+EXPORT_SYMBOL(create_thread);
 
 #ifdef HAVE_LIBC
 static struct _reent callback_reent;
@@ -184,6 +186,7 @@  struct _reent *__getreent(void)
 #endif
     return _reent;
 }
+EXPORT_SYMBOL(__getreent);
 #endif
 
 void exit_thread(void)
@@ -205,12 +208,14 @@  void exit_thread(void)
         printk("schedule() returned!  Trying again\n");
     }
 }
+EXPORT_SYMBOL(exit_thread);
 
 void block(struct thread *thread)
 {
     thread->wakeup_time = 0LL;
     clear_runnable(thread);
 }
+EXPORT_SYMBOL(block);
 
 void msleep(uint32_t millisecs)
 {
@@ -219,12 +224,14 @@  void msleep(uint32_t millisecs)
     clear_runnable(thread);
     schedule();
 }
+EXPORT_SYMBOL(msleep);
 
 void wake(struct thread *thread)
 {
     thread->wakeup_time = 0LL;
     set_runnable(thread);
 }
+EXPORT_SYMBOL(wake);
 
 void idle_thread_fn(void *unused)
 {