diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2024-02-26 22:13:22 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2024-02-26 22:13:22 (GMT) |
commit | 35971d2bea4733d2f7631c22c61e22d07f7478af (patch) | |
tree | efb328b26264abe6df2cdd753b67dfa60b07814f /src | |
parent | f65fdbad3ae0b2accfe324f996eef0c193ad9dfc (diff) |
Let the OS schedule the scan process.
Diffstat (limited to 'src')
-rw-r--r-- | src/analysis/scan/scanner.c | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/src/analysis/scan/scanner.c b/src/analysis/scan/scanner.c index f320f93..02a93fa 100644 --- a/src/analysis/scan/scanner.c +++ b/src/analysis/scan/scanner.c @@ -482,7 +482,7 @@ bool g_content_scanner_add_rule(GContentScanner *scanner, GScanRule *rule) * Remarques : - * * * ******************************************************************************/ -#include <sched.h> + GScanContext *g_content_scanner_analyze(GContentScanner *scanner, GScanOptions *options, GBinContent *content) { GScanContext *result; /* Bilan global à retourner */ @@ -493,38 +493,6 @@ GScanContext *g_content_scanner_analyze(GContentScanner *scanner, GScanOptions * GScanRule *rule; /* Règle à consulter */ const char *name; /* Désignation de la règle */ -#if 0 // FIXME - - int policy; - struct sched_param sp; - - - policy = sched_getscheduler(0); - /* - switch(policy) { - case SCHED_OTHER: printf("SCHED_OTHER\n"); break; - case SCHED_RR: printf("SCHED_RR\n"); break; - case SCHED_FIFO: printf("SCHED_FIFO\n"); break; - default: printf("Unknown...\n"); - } - - int policy; - ... - if((policy = sched_getscheduler(0) == -1)) { - fprintf(stderr, ... - } - */ - - - if(policy == SCHED_OTHER) { - sp.sched_priority = sched_get_priority_max(SCHED_FIFO); - sched_setscheduler(0, SCHED_FIFO, &sp); - } - -#endif - - - /* Préparations... */ result = g_scan_context_new(options); |