Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2933770imm; Thu, 24 May 2018 19:21:21 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqP2n9+UfSdsolhlAwxbQGheAVXKJ6mtJRlhhKuKv8/1KcMfZkanRaCurk+bZVXWtJaqPJa X-Received: by 2002:a63:338c:: with SMTP id z134-v6mr409704pgz.171.1527214881003; Thu, 24 May 2018 19:21:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527214880; cv=none; d=google.com; s=arc-20160816; b=Jhi5zqFh5sb81FJy8Sb90pvLG5A7sejY0fAWGU7H9XqBkcJv5fSzK+z9ASEA10Ip/a yjZQWsTEobFbbpzV8lXRjzn6UgIj6/ARjQnxhoM6497t1vTXD5FNqjYaVOf2CShJio+S VIuEbl1hJy/6QqTCBFYhUBuPStQYBWdwtOncBOYDK62i2038kX3gQDL1a4UY9rxNvIhD R8QXNZbUPRIXLqScWOePRnEvPoSOfBGbhA2S6KYxkitEZ4LiJW7/zB6Y/GEdLj8GEg3D DKXUZpBYjDxAXlkF4DTLSWC8BUq+6vIr9cSvV2qTbgM1UkkzjC9sE+09F+Jzv4G+PH8W YboQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date :arc-authentication-results; bh=sOem1celjOkBDE5CeVuOb1iAlBZrvBg0ahlWFcjnrEk=; b=SE5rdenzSttpvo5JASIe0vp3JlD9RnzRsLTuWq8pIo1NGCeTVaWzW4kfyavcVG1cFB k5mj+iHw2BgYBXkTPQ+O0yk67BBfssSYmNvtE/6oXLz6XNVQBqjclDMFDIwO6GmBLbGr hcDZ865pnz2oy5fRm3CDrdxxWQc6yS5JO2H+2uYm0hbwNYKb9WDgFaa0J/poL8D5mcf7 8axPSvfS2UN6/9SrlYzx691CC9OlsoB1vrBdrXAarI6+0ZEH1XaWcFpbPwsJ83aJqPmU hK+pneHNi/GygnaTmc4j1LB/AZUmt9kMGQlsQmryXolKJIcB/pJBrm5fHLE0JGSVb8iT TtnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5-v6si21348298pli.129.2018.05.24.19.21.06; Thu, 24 May 2018 19:21:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S970863AbeEXPLE (ORCPT + 99 others); Thu, 24 May 2018 11:11:04 -0400 Received: from mga17.intel.com ([192.55.52.151]:18348 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S970839AbeEXPLD (ORCPT ); Thu, 24 May 2018 11:11:03 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 May 2018 08:11:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,436,1520924400"; d="scan'208";a="58173451" Received: from sofia.sh.intel.com (HELO sofia) ([10.239.147.112]) by fmsmga001.fm.intel.com with ESMTP; 24 May 2018 08:11:01 -0700 Date: Thu, 24 May 2018 23:10:14 +0800 From: "Liu, Changcheng" To: jiangshanlai@gmail.com, tj@kernel.org Cc: linux-kernel@vger.kernel.org Subject: define struct workqueue_struct in C file Message-ID: <20180524151013.GA175207@sofia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, I have one confusion about workqueue_struct: 1) Why struct workqueue_struct is defined in C file instead of header file? I'm trying to print "workqueue_struct:name" field in one external build module. "workqueue_struct:name" can't be accessed directly. 2) struct work_struct is defined in "workqueue.h", could struct workqueue_struct also be defined in it? --Thanks Changcheng