title: does the mode bit change when initialising a variable?
body: <p>So I know that a system call (e.g. <code>open, close, read, write</code> etc.) changes the mode bit twice - from user mode to kernel mode to serve the system call request and then back to user mode once it's done.</p>
  
  <p>But if we have for example</p>
  
  <pre><code>int a = open("lol.txt", O_RDONLY);
  </code></pre>
  
  <p>the mode bit will change twice again to serve the <code>open</code> system call, but what about when it assigns it to a variable? Assuming it needs to store the variable into memory, do we have to go back to kernel to serve that request again? i.e. does the mode bit change 2 or 4 times in the above line?</p>