Merge remote-tracking branch 'upstream/master' into csharp_new_api

pull/578/head
Jan Tattermusch 10 years ago
commit 603aec9e70
  1. 38
      INSTALL
  2. 2
      Makefile
  3. 4
      include/grpc++/client_context.h
  4. 2
      include/grpc++/server_context.h
  5. 19
      include/grpc/grpc.h
  6. 2
      templates/Makefile.template
  7. 11
      tools/run_tests/run_tests.py

@ -95,6 +95,44 @@ will need clang and its instrumented libc++:
# apt-get install clang libc++-dev
Mac-specific notes:
-------------------
For a Mac system, git is not available by default. You will first need to
install Xcode from the Mac AppStore and then run the following command from a
terminal:
$ sudo xcode-select --install
You should also install "port" following the instructions at
https://www.macports.org . This will reside in /opt/local/bin/port for
most Mac installations. Do the "git submodule" command listed above.
Then execute the following for all the needed build dependencies
$ sudo /opt/local/bin/port install autoconf automake libtool gflags cmake
$ mkdir ~/gtest
$ svn checkout http://googletest.googlecode.com/svn/trunk/ gtest-svn
$ mkdir mybuild
$ cd mybuild
$ cmake ../gtest-svn
$ make
$ make gtest.a gtest_main.a
$ sudo cp libgtest.a libgtest_main.a /opt/local/lib
$ sudo mkdir /opt/local/include/gtest
$ sudo cp -pr ../gtest-svn/include/gtest /opt/local/include/gtest
We will also need to make openssl and install it appropriately
$ cd <git directory>
$ cd third_party/openssl
$ sudo make install
$ cd ../../
If you are going to make changes and need to regenerate the projects file,
you will need to install certain modules for python.
$ sudo easy_install simplejson mako
A word on OpenSSL
-----------------

@ -177,7 +177,9 @@ LDFLAGS += -g -fPIC
INCLUDES = . include $(GENDIR)
ifeq ($(SYSTEM),Darwin)
INCLUDES += /usr/local/ssl/include /opt/local/include
LIBS = m z
LDFLAGS += -L/usr/local/ssl/lib -L/opt/local/lib
else
LIBS = rt m z pthread
LDFLAGS += -pthread

@ -81,12 +81,12 @@ class ClientContext {
void AddMetadata(const grpc::string &meta_key,
const grpc::string &meta_value);
std::multimap<grpc::string, grpc::string> GetServerInitialMetadata() {
const std::multimap<grpc::string, grpc::string>& GetServerInitialMetadata() {
GPR_ASSERT(initial_metadata_received_);
return recv_initial_metadata_;
}
std::multimap<grpc::string, grpc::string> GetServerTrailingMetadata() {
const std::multimap<grpc::string, grpc::string>& GetServerTrailingMetadata() {
// TODO(yangg) check finished
return trailing_metadata_;
}

@ -76,7 +76,7 @@ class ServerContext final {
void AddInitialMetadata(const grpc::string& key, const grpc::string& value);
void AddTrailingMetadata(const grpc::string& key, const grpc::string& value);
std::multimap<grpc::string, grpc::string> client_metadata() {
const std::multimap<grpc::string, grpc::string>& client_metadata() {
return client_metadata_;
}

@ -354,10 +354,18 @@ typedef struct grpc_op {
} data;
} grpc_op;
/* Initialize the grpc library */
/* Initialize the grpc library.
It is not safe to call any other grpc functions before calling this.
(To avoid overhead, little checking is done, and some things may work. We
do not warrant that they will continue to do so in future revisions of this
library). */
void grpc_init(void);
/* Shut down the grpc library */
/* Shut down the grpc library.
No memory is used by grpc after this call returns, nor are any instructions
executing within the grpc library.
Prior to calling, all application owned grpc objects must have been
destroyed. */
void grpc_shutdown(void);
grpc_completion_queue *grpc_completion_queue_create(void);
@ -386,7 +394,12 @@ grpc_event *grpc_completion_queue_pluck(grpc_completion_queue *cq, void *tag,
void grpc_event_finish(grpc_event *event);
/* Begin destruction of a completion queue. Once all possible events are
drained it's safe to call grpc_completion_queue_destroy. */
drained then grpc_completion_queue_next will start to produce
GRPC_QUEUE_SHUTDOWN events only. At that point it's safe to call
grpc_completion_queue_destroy.
After calling this function applications should ensure that no
NEW work is added to be published on this completion queue. */
void grpc_completion_queue_shutdown(grpc_completion_queue *cq);
/* Destroy a completion queue. The caller must ensure that the queue is

@ -194,7 +194,9 @@ LDFLAGS += -g -fPIC
INCLUDES = . include $(GENDIR)
ifeq ($(SYSTEM),Darwin)
INCLUDES += /usr/local/ssl/include /opt/local/include
LIBS = m z
LDFLAGS += -L/usr/local/ssl/lib -L/opt/local/lib
else
LIBS = rt m z pthread
LDFLAGS += -pthread

@ -62,15 +62,18 @@ class SimpleConfig(object):
# ValgrindConfig: compile with some CONFIG=config, but use valgrind to run
class ValgrindConfig(object):
def __init__(self, config, tool):
def __init__(self, config, tool, args=[]):
self.build_config = config
self.tool = tool
self.args = args
self.maxjobs = 2 * multiprocessing.cpu_count()
self.allow_hashing = False
def job_spec(self, binary, hash_targets):
return jobset.JobSpec(cmdline=['valgrind', '--tool=%s' % self.tool, binary],
hash_targets=None)
return jobset.JobSpec(cmdline=['valgrind', '--tool=%s' % self.tool] +
self.args + [binary],
shortname='valgrind %s' % binary,
hash_targets=None)
class CLanguage(object):
@ -144,7 +147,7 @@ _CONFIGS = {
'asan': SimpleConfig('asan', environ={
'ASAN_OPTIONS': 'detect_leaks=1:color=always:suppressions=tools/tsan_suppressions.txt'}),
'gcov': SimpleConfig('gcov'),
'memcheck': ValgrindConfig('valgrind', 'memcheck'),
'memcheck': ValgrindConfig('valgrind', 'memcheck', ['--leak-check=full']),
'helgrind': ValgrindConfig('dbg', 'helgrind')
}

Loading…
Cancel
Save