Skip to content

Conversation

@omercsbn
Copy link
Owner

@omercsbn omercsbn commented Aug 9, 2025

Summary

  • add internal prototypes in scheduler to prevent implicit declarations
  • replace duplicate actor typedef with forward declaration

Testing

  • make kernel (fails: unknown type name paging_context_t)

https://chatgpt.com/codex/tasks/task_e_6897d3a2dd24832c90f95ffcfcf47647

This comment was marked as outdated.

@omercsbn omercsbn requested a review from Copilot August 9, 2025 23:38
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes forward declarations in the scheduler system by adding internal function prototypes and replacing a duplicate typedef with a proper forward declaration.

  • Adds internal function prototypes to prevent implicit function declarations in scheduler.c
  • Replaces duplicate actor_t typedef with proper forward declaration of struct actor_context

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
kernel/kernel.h Replaces typedef with forward declaration for actor_context struct
kernel/core/scheduler.c Adds internal function prototypes to prevent implicit declarations

static void scheduler_remove_from_ready_queue(struct actor_context* actor);
static void actor_create_kernel_actor(void);
static bool actor_add_message(struct actor_context* actor, message_t* message);
static void actor_clear_message_queue(struct actor_context* actor);
Copy link

Copilot AI Aug 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function prototype for message_allocate should include a parameter to indicate if allocation failed, or the function should be documented to clarify error handling behavior. Consider adding a comment about how allocation failure is handled.

Suggested change
static void actor_clear_message_queue(struct actor_context* actor);
static void actor_clear_message_queue(struct actor_context* actor);
// Allocates a message from the pool. Returns NULL if allocation fails; caller must check for NULL.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants