threads: kill clang warnings about struct/class Thread
authorBrian Norris <banorris@uci.edu>
Wed, 14 Aug 2013 05:16:20 +0000 (22:16 -0700)
committerBrian Norris <banorris@uci.edu>
Wed, 14 Aug 2013 05:18:08 +0000 (22:18 -0700)
commit26010e1410faa0dcefc8d384872bc0210cc0be92
treefec5fa8d6ebe62a1b0ea52f0b090ea924854e199
parent8e70d2b46a3e66a95d13f091f92450a0c05fe54f
threads: kill clang warnings about struct/class Thread

We just need an opaque pointer for C, so we can retain the type safety
for C++ by conditionally compiling a '__thread_identifier' type as
'class Thread' for C++.

The warning:

  clang++ -MMD -MF .threads.o.d -fPIC -c threads.cc -Wall -g -O3 -Iinclude -I.
  In file included from schedule.cc:4:
  ./threads-model.h:41:1: warning: 'Thread' defined as a class here but previously declared as a struct [-Wmismatched-tags]
  class Thread {
  ^
  include/threads.h:9:1: note: did you mean class here?
  struct Thread; /* actually, class; but this is safe */
  ^~~~~~
  class
include/threads.h