Преглед на файлове

siglongjmp: document why this function just calls longjmp

Rich Felker преди 5 месеца
родител
ревизия
008f737ddf
променени са 1 файла, в които са добавени 5 реда и са изтрити 0 реда
  1. 5 0
      src/signal/siglongjmp.c

+ 5 - 0
src/signal/siglongjmp.c

@@ -5,5 +5,10 @@
 
 _Noreturn void siglongjmp(sigjmp_buf buf, int ret)
 {
+	/* If sigsetjmp was called with nonzero savemask flag, the address
+	 * longjmp will return to is inside of sigsetjmp. The signal mask
+	 * will then be restored in the returned-to context instead of here,
+	 * which matters if the context we are returning from may not have
+	 * sufficient stack space for signal delivery. */
 	longjmp(buf, ret);
 }