| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d9705ed commit 8238e03
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,8 +1,6 @@ | |||
| 1 | 1 | // Map Operations Semantics Demo for KernelScript | |
| 2 | 2 | // Demonstrates advanced map operation analysis, concurrent access safety, | |
| 3 | 3 | // and global map sharing validation capabilities | |
| 4 | - // | ||
| 5 | - // NOTE: This file uses advanced language features not yet implemented in KernelScript. | ||
| 6 | 4 | ||
| 7 | 5 | include "xdp.kh" | |
| 8 | 6 | include "tc.kh" | |
@@ -21,7 +19,6 @@ struct Statistics { | |||
| 21 | 19 | ||
| 22 | 20 | struct PerCpuData { | |
| 23 | 21 | local_counter: u64, | |
| 24 | - temp_storage: u8[64], | ||
| 25 | 22 | } | |
| 26 | 23 | ||
| 27 | 24 | // Global maps shared across multiple programs with the new simplified syntax | |
@@ -44,7 +41,6 @@ var sequential_data : array<u32, ArrayElement>(1024) | |||
| 44 | 41 | struct Event { | |
| 45 | 42 | timestamp: u64, | |
| 46 | 43 | event_type: u32, | |
| 47 | - data: u8[32], | ||
| 48 | 44 | } | |
| 49 | 45 | ||
| 50 | 46 | struct ArrayElement { | |
@@ -75,7 +71,6 @@ struct ArrayElement { | |||
| 75 | 71 | } else { | |
| 76 | 72 | percpu_data[cpu_id] = PerCpuData { | |
| 77 | 73 | local_counter: 1, | |
| 78 | - temp_storage: [0], | ||
| 79 | 74 | } | |
| 80 | 75 | } | |
| 81 | 76 | ||
@@ -131,7 +126,6 @@ fn event_logger(ctx: *trace_event_raw_sys_enter) -> i32 { | |||
| 131 | 126 | // Successfully reserved space - populate event data inline | |
| 132 | 127 | reserved->timestamp = 123456 // Fake timestamp | |
| 133 | 128 | reserved->event_type = ctx->id // Use syscall ID from sys_enter context | |
| 134 | - reserved->data = [0] // Simplified data | ||
| 135 | 129 | ||
| 136 | 130 | // Submit the populated event | |
| 137 | 131 | event_stream.submit(reserved) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments