)]}'
{
  "commit": "a703f185b16dd96ef9f4c9d7b89222cf09db0600",
  "tree": "62eeae96e00dc54f93eea52023aaa268859d07d1",
  "parents": [
    "37494a148e1ae6599a68fa5e33a8d907c2c2ab2c"
  ],
  "author": {
    "name": "Barret Rhoden",
    "email": "brho@cs.berkeley.edu",
    "time": "Mon Dec 17 11:04:57 2018 -0500"
  },
  "committer": {
    "name": "Barret Rhoden",
    "email": "brho@cs.berkeley.edu",
    "time": "Tue Dec 18 15:30:28 2018 -0500"
  },
  "message": "kth: Remove irq_state from sem_.*irqsave\u0027s interface\n\nIf disable_irqsave() and enable_irqsave() are in the same function, you\ndon\u0027t need to have the state passed in.\n\nI stumbled on this while looking into whether or not CVs could drop the\nirqstate as well.  The short version is \u0027no\u0027.\n\nOur kernel CVs just use spinlocks.  The particular lock and use case of\nthe CVs is up to our caller, so whether or not that lock is used from\nIRQ context is beyond our control.\n\nIt would be nice to be able to use the functionality of\nspin_lock_irqsave() to track whether or not we need to restore IRQs when\nwe return.  However, we unlock and relock that spinlock during the\nprocess of waiting and restarting.  At that point, any information about\nwhether or not we should reenable IRQs is gone.  Thus we need to track\nit with irqstate.\n\nNote that the cv_wait code tracks whether or not IRQs were enabled *at\nthe moment*, but we also need to know if IRQs were enabled at the point\nof the cv_lock_irqsave() and to carry that information over to\ncv_unlock_irqsave().\n\nAlso, none of the CV callers are from IRQ ctx anymore.  At most, all are\nfrom RKMs.  When analyzing CVs, we only care about the wakeup side too\n- you\u0027re not allowed to sleep from IRQ context.  And no one even calls\nsem_.*irqsave().\n\nI considered removing the CV irqsave functions (and sems), but given the\nflux in alarm code, there might come a time where we kick CVs from IRQ\ncontext again, to include immediate kernel messages.\n\nSigned-off-by: Barret Rhoden \u003cbrho@cs.berkeley.edu\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3a4bdb5713a182b0dd913113cea324c67862fd04",
      "old_mode": 33188,
      "old_path": "kern/include/kthread.h",
      "new_id": "115b552cb18be6ec2cda9e8cbf0d435315b7aac3",
      "new_mode": 33188,
      "new_path": "kern/include/kthread.h"
    },
    {
      "type": "modify",
      "old_id": "f407f1df1d46d22541d4212c03baa3ff45d6a3c6",
      "old_mode": 33188,
      "old_path": "kern/src/kthread.c",
      "new_id": "c5be33797f3278233b0d6a9891a4308fe20baba6",
      "new_mode": 33188,
      "new_path": "kern/src/kthread.c"
    }
  ]
}
