Skip to content

Commit

Permalink
Patch svn r35208
Browse files Browse the repository at this point in the history
  • Loading branch information
gejun committed Sep 3, 2017
1 parent 3ee0f36 commit d5b9080
Show file tree
Hide file tree
Showing 67 changed files with 648 additions and 79 deletions.
14 changes: 13 additions & 1 deletion src/base/object_pool.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
// bthread - A M:N threading library to make applications more concurrent.
// Copyright (c) 2011 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Author: Ge,Jun ([email protected])
// Date: Sun Jul 13 15:04:18 CST 2014
Expand Down
14 changes: 13 additions & 1 deletion src/base/object_pool_inl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
// bthread - A M:N threading library to make applications more concurrent.
// Copyright (c) 2011 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Author: Ge,Jun ([email protected])
// Date: Sun Jul 13 15:04:18 CST 2014
Expand Down
14 changes: 13 additions & 1 deletion src/base/resource_pool.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
// bthread - A M:N threading library to make applications more concurrent.
// Copyright (c) 2011 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Author: Ge,Jun ([email protected])
// Date: Sun Jul 13 15:04:18 CST 2014
Expand Down
14 changes: 13 additions & 1 deletion src/base/resource_pool_inl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
// bthread - A M:N threading library to make applications more concurrent.
// Copyright (c) 2011 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Author: Ge,Jun ([email protected])
// Date: Sun Jul 13 15:04:18 CST 2014
Expand Down
14 changes: 13 additions & 1 deletion src/bthread/bthread.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
// bthread - A M:N threading library to make applications more concurrent.
// Copyright (c) 2012 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2012 baidu-rpc authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Author: Ge,Jun ([email protected])
// Date: Tue Jul 10 17:40:58 CST 2012
Expand Down
14 changes: 13 additions & 1 deletion src/bthread/bthread.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
// bthread - A M:N threading library to make applications more concurrent.
// Copyright (c) 2012 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2012 baidu-rpc authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Author: Ge,Jun ([email protected])
// Date: Tue Jul 10 17:40:58 CST 2012
Expand Down
14 changes: 13 additions & 1 deletion src/bthread/butex.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
// bthread - A M:N threading library to make applications more concurrent.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Author: Ge,Jun ([email protected])
// Date: Tue Jul 22 17:30:12 CST 2014
Expand Down
14 changes: 13 additions & 1 deletion src/bthread/butex.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
// bthread - A M:N threading library to make applications more concurrent.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Author: Ge,Jun ([email protected])
// Date: Tue Jul 22 17:30:12 CST 2014
Expand Down
14 changes: 13 additions & 1 deletion src/bthread/comlog_initializer.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
// bthread - A M:N threading library to make applications more concurrent.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Author: Ge,Jun ([email protected])
// Date: Mon Sep 15 10:51:15 CST 2014
Expand Down
14 changes: 13 additions & 1 deletion src/bthread/condition_variable.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
// bthread - A M:N threading library to make applications more concurrent.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Author: Ge,Jun ([email protected])
// Date: Sun Aug 3 12:46:15 CST 2014
Expand Down
14 changes: 13 additions & 1 deletion src/bthread/condition_variable.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
// bthread - A M:N threading library to make applications more concurrent.
// Copyright (c) 2015 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2015 baidu-rpc authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Author: Zhangyi Chen ([email protected])
// Date: 2015/12/14 21:26:26
Expand Down
14 changes: 13 additions & 1 deletion src/bthread/countdown_event.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
// bthread - A M:N threading library to make applications more concurrent.
// Copyright (c) 2016 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2016 baidu-rpc authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Author: Zhangyi Chen ([email protected])
// Date: 2016/06/03 13:15:24
Expand Down
14 changes: 13 additions & 1 deletion src/bthread/countdown_event.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
// bthread - A M:N threading library to make applications more concurrent.
// Copyright (c) 2016 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2016 baidu-rpc authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Author: Zhangyi Chen ([email protected])
// Date: 2016/06/03 13:06:40
Expand Down
14 changes: 13 additions & 1 deletion src/bthread/errno.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
// bthread - A M:N threading library to make applications more concurrent.
// Copyright (c) 2010 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Author: Ge,Jun ([email protected])
// Date: Wed Jul 30 11:47:19 CST 2014
Expand Down
14 changes: 13 additions & 1 deletion src/bthread/errno.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
// bthread - A M:N threading library to make applications more concurrent.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Author: Ge,Jun ([email protected])
// Date: Wed Jul 30 11:47:19 CST 2014
Expand Down
14 changes: 13 additions & 1 deletion src/bthread/execution_queue.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
// bthread - A M:N threading library to make applications more concurrent.
// Copyright (c) 2016 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2016 baidu-rpc authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Author: Zhangyi Chen ([email protected])
// Date: 2016/04/16 18:43:24
Expand Down
14 changes: 13 additions & 1 deletion src/bthread/execution_queue.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
// bthread - A M:N threading library to make applications more concurrent.
// Copyright (c) 2015 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2015 baidu-rpc authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Author: Zhangyi Chen ([email protected])
// Date: 2015/10/23 18:16:16
Expand Down
14 changes: 13 additions & 1 deletion src/bthread/execution_queue_inl.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
// bthread - A M:N threading library to make applications more concurrent.
// Copyright (c) 2015 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2015 baidu-rpc authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Author: Zhangyi Chen ([email protected])
// Date: 2015/10/27 17:39:48
Expand Down
14 changes: 13 additions & 1 deletion src/bthread/fd.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
// bthread - A M:N threading library to make applications more concurrent.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Author: Ge,Jun ([email protected])
// Date: Thu Aug 7 18:56:27 CST 2014
Expand Down
20 changes: 14 additions & 6 deletions src/bthread/id.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
// bthread - A M:N threading library to make applications more concurrent.
// Copyright (c) 2014 Baidu.com, Inc. All Rights Reserved
// Copyright (c) 2014 baidu-rpc authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Author: Ge,Jun ([email protected])
// Date: Sun Aug 3 12:46:15 CST 2014
Expand Down Expand Up @@ -432,11 +444,7 @@ int bthread_id_lock_and_reset_range_verbose(
meta->mutex.lock();
} else { // bthread_id_about_to_destroy was called.
meta->mutex.unlock();
// Strictly, EPERM is better here. However it requires us to
// modify many callsites in RPC, and returning EPERM does not
// make differences except for logging, thus we keep this
// change transparent to RPC right now.
return EINVAL/*note*/;
return EPERM;
}
}
meta->mutex.unlock();
Expand Down
Loading

0 comments on commit d5b9080

Please sign in to comment.