RPV Event driven kernel
Loading...
Searching...
No Matches
service_s Struct Reference

Service descriptor structure. More...

#include <service.h>

Data Fields

const char * s_name
 Null-terminated service name string.
 
void(*const svc_main )(void)
 Service entry function.
 

Detailed Description

Service descriptor structure.

Represents a statically registered system service. Service instances are typically placed in a dedicated linker section and discovered during system services runtime.

Each service provides:

  • A unique service name
  • An entry function (svc_main)
Note
Service objects are expected to reside in read-only memory.

Field Documentation

◆ s_name

const char* s_name

Null-terminated service name string.

Identifies the service. Must remain valid for the lifetime of the system.

◆ svc_main

void(*const svc_main) (void)

Service entry function.

Main execution function of the service.

Precondition
  • Must not be NULL.
  • Must not return unless explicitly allowed by design.
Warning
When executed in kernel context, the implementation must be bounded and non-blocking unless explicitly designed as a long-running service. The kernel invokes svc_main() periodically. The periodicity is kernel scheduler implementation defined

The documentation for this struct was generated from the following file: