ahci_dragonfly.c (d9345d3a) ahci_dragonfly.c (ae8e83e6)
1/*
2 * Copyright (c) 2009 The DragonFly Project. All rights reserved.
3 *
4 * This code is derived from software contributed to The DragonFly Project
5 * by Matthew Dillon <dillon@backplane.com>
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 279 unchanged lines hidden (view full) ---

288
289 /*
290 * Then loop on the helper core.
291 */
292 mask = ap->ap_signal;
293 while ((mask & AP_SIGF_STOP) == 0) {
294 atomic_clear_int(&ap->ap_signal, mask);
295 ahci_port_thread_core(ap, mask);
1/*
2 * Copyright (c) 2009 The DragonFly Project. All rights reserved.
3 *
4 * This code is derived from software contributed to The DragonFly Project
5 * by Matthew Dillon <dillon@backplane.com>
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 279 unchanged lines hidden (view full) ---

288
289 /*
290 * Then loop on the helper core.
291 */
292 mask = ap->ap_signal;
293 while ((mask & AP_SIGF_STOP) == 0) {
294 atomic_clear_int(&ap->ap_signal, mask);
295 ahci_port_thread_core(ap, mask);
296 crit_enter();
297 tsleep_interlock(&ap->ap_thread);
296 tsleep_interlock(&ap->ap_thread, 0);
298 if (ap->ap_signal == 0)
299 tsleep(&ap->ap_thread, PINTERLOCKED, "ahport", 0);
297 if (ap->ap_signal == 0)
298 tsleep(&ap->ap_thread, PINTERLOCKED, "ahport", 0);
300 crit_exit();
301 mask = ap->ap_signal;
302 }
303 ap->ap_thread = NULL;
304}
299 mask = ap->ap_signal;
300 }
301 ap->ap_thread = NULL;
302}