1

I want to create a system call which gives the number of times every system call was done, since a certain switch was tripped. I.e, I want to define a certain variable (let's name it 'counting'). When the variable 'counting' is on ('counting' is being switched between 0 for OFF and 1 for ON by a different system call, but leave THAT thing for now), I want my system call to print a list of all the system calls and the number of times they have been done, since "counting" was last set to ON (a value of 1). If the variable 'counting' is set to OFF, then I want this system call to display no list, or just display some message that "Counting hasn't started yet" or "Counting has not been turned on" or whatever. How can I proceed with this?

  • 1
    maybe create a array and change the array values when something has switched. for example: when I make the system call open_door, then it would change its array value to down or 1 or what ever you want. if you want to count how many times it has been called then do the same thing but just add the number. Please tell me if Im not clear. – Insane Miner Mar 25 '21 at 08:22
  • 1
    @InsaneMiner thanks your answer was pretty useful. – Chonkie Mongol May 11 '21 at 17:12
  • Glad i could help @Chonkie Mongol – Insane Miner May 12 '21 at 04:08

0 Answers0