• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

external/gbm_gralloc


Commit MetaInfo

Revisão468f7f4fe1eb0e319ce001b1ff6b4d5ef7bd178d (tree)
Hora2017-09-12 00:11:25
AutorRob Herring <robh@kern...>
CommiterRob Herring

Mensagem de Log

kill off gralloc_gbm_get_pid

Caching getpid() calls seems pointless, so remove the added
complexity and just use getpid() directly when needed.

Signed-off-by: Rob Herring <robh@kernel.org>

Mudança Sumário

Diff

--- a/gralloc_gbm.cpp
+++ b/gralloc_gbm.cpp
@@ -54,8 +54,6 @@ struct gralloc_gbm_bo_t {
5454 int locked_for;
5555 };
5656
57-static int32_t gralloc_gbm_pid = 0;
58-
5957 static uint32_t get_gbm_format(int format)
6058 {
6159 uint32_t fmt;
@@ -299,17 +297,6 @@ struct gbm_device *gbm_dev_create(void)
299297 }
300298
301299 /*
302- * Return the pid of the process.
303- */
304-static int gralloc_gbm_get_pid(void)
305-{
306- if (unlikely(!gralloc_gbm_pid))
307- android_atomic_write((int32_t) getpid(), &gralloc_gbm_pid);
308-
309- return gralloc_gbm_pid;
310-}
311-
312-/*
313300 * Register a buffer handle.
314301 */
315302 int gralloc_gbm_handle_register(buffer_handle_t _handle, struct gbm_device *gbm)
@@ -324,7 +311,7 @@ int gralloc_gbm_handle_register(buffer_handle_t _handle, struct gbm_device *gbm)
324311 if (!bo)
325312 return -EINVAL;
326313
327- handle->data_owner = gralloc_gbm_get_pid();
314+ handle->data_owner = getpid();
328315 handle->data = bo;
329316
330317 return 0;
@@ -393,7 +380,7 @@ struct gralloc_gbm_handle_t *gralloc_gbm_bo_create(struct gbm_device *gbm,
393380 return NULL;
394381 }
395382
396- handle->data_owner = gralloc_gbm_get_pid();
383+ handle->data_owner = getpid();
397384 handle->data = bo;
398385
399386 return handle;