From owner-svn-src-all@freebsd.org Mon Oct 19 10:54:25 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B948A18199; Mon, 19 Oct 2015 10:54:25 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 69DDC1A89; Mon, 19 Oct 2015 10:54:25 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9JAsOn1051897; Mon, 19 Oct 2015 10:54:24 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9JAsOBT051896; Mon, 19 Oct 2015 10:54:24 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201510191054.t9JAsOBT051896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Oct 2015 10:54:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289564 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Oct 2015 10:54:25 -0000 Author: hselasky Date: Mon Oct 19 10:54:24 2015 New Revision: 289564 URL: https://svnweb.freebsd.org/changeset/base/289564 Log: Merge LinuxKPI changes from DragonflyBSD: - Added support for multiple new Linux functions. - Properly implement DEFINE_WAIT() and init_waitqueue_head() macros. - Removed FreeBSD specific __wait_queue_head structure definition. Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/wait.h Modified: head/sys/ofed/include/linux/wait.h ============================================================================== --- head/sys/ofed/include/linux/wait.h Mon Oct 19 10:49:15 2015 (r289563) +++ head/sys/ofed/include/linux/wait.h Mon Oct 19 10:54:24 2015 (r289564) @@ -39,15 +39,18 @@ #include #include -struct __wait_queue_head { +typedef struct { +} wait_queue_t; + +typedef struct { unsigned int wchan; -}; -typedef struct __wait_queue_head wait_queue_head_t; +} wait_queue_head_t; -#define init_waitqueue_head(x) +#define init_waitqueue_head(x) \ + do { } while (0) static inline void -__wake_up(struct __wait_queue_head *q, int all) +__wake_up(wait_queue_head_t *q, int all) { int wakeup_swapper; void *c; @@ -108,6 +111,23 @@ do { \ -_error; \ }) -#define DEFINE_WAIT(x) +static inline int +waitqueue_active(wait_queue_head_t *q) +{ + return 0; /* XXX: not really implemented */ +} + +#define DEFINE_WAIT(name) \ + wait_queue_t name = {} + +static inline void +prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state) +{ +} + +static inline void +finish_wait(wait_queue_head_t *q, wait_queue_t *wait) +{ +} #endif /* _LINUX_WAIT_H_ */