看板 FB_hackers 關於我們 聯絡資訊
Hello All, =20 I was looking at the code that creates a new process (fork) with a single thread coming out on the other side. I can't figure out a couple of things. =20 1. Why is the md_spinlock_count for the new thread set to 1 and not to 0. This happens in cpu_fork and cpu_set_upcall under the amd64 tree. 2. If this was the "per-cpu" idle thread and the AP was booting up (running init_secondary) why does it grab sched_lock and call spinlock_exit. It would seem simpler to set the count of the idle thread to 0 and not have to call spinlock_exit. The only answer I can come up with is the fact that a non-zero spinlock_count prevents interrupts from getting disabled/renabled to some unknown value? =20 Thanks Ravi Murty _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"