fixing Phi device upload, adding actions for bidirectionnal git mirrors
Build / build (push) Failing after 58s
Test / build_and_test (push) Failing after 1m6s

This commit is contained in:
2026-07-23 22:26:43 +02:00
parent 9b1b223186
commit 9a2cd20019
11 changed files with 1126 additions and 523 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
#include <Daemon.h>
#include <CommandBuffer.h>
#include <Daemon.h>
#include <Logger.h>
#include <Memory.h>
@@ -50,7 +50,7 @@ scif_epd_t StartDaemon()
return 0;
}
if(scif_listen(endpoint, 1) < 0)
if(scif_listen(endpoint, 16) < 0)
{
PhiLogError("Could not listen to SCIF port");
scif_close(endpoint);
+1 -1
View File
@@ -25,7 +25,7 @@ int HandleAllocMemory(scif_epd_t endpoint, const PhiMessageHeader* header)
if(ReadAll(endpoint, &request, sizeof(request)) < 0)
return -1;
void* memory = malloc((size_t)request.size);
const void* memory = malloc((size_t)request.size);
if(memory == NULL)
{
+29 -3
View File
@@ -1,13 +1,35 @@
#include <errno.h>
#include <pthread.h>
#include <stdint.h>
#include <Daemon.h>
#include <Logger.h>
static void* HandleClient(void* const argument)
{
scif_epd_t client = (scif_epd_t)(intptr_t)argument;
(void)HandlePacket(client);
scif_close(client);
return NULL;
}
int main(void)
{
scif_epd_t endpoint = StartDaemon();
pthread_attr_t client_thread_attributes;
if(endpoint == 0)
return 1;
if(pthread_attr_init(&client_thread_attributes) != 0 ||
pthread_attr_setdetachstate(&client_thread_attributes, PTHREAD_CREATE_DETACHED) != 0)
{
PhiLogError("Could not initialize client thread attributes");
ShutdownDaemon(endpoint);
return 1;
}
for(;;)
{
struct scif_portID peer;
@@ -21,11 +43,15 @@ int main(void)
break;
}
(void)HandlePacket(client);
scif_close(client);
pthread_t client_thread;
if(pthread_create(&client_thread, &client_thread_attributes, HandleClient, (void*)(intptr_t)client) != 0)
{
PhiLogError("Could not create SCIF client thread");
scif_close(client);
}
}
pthread_attr_destroy(&client_thread_attributes);
ShutdownDaemon(endpoint);
return 0;