diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2010-01-18 11:02:36 +0800 |
---|---|---|
committer | Chia-I Wu <olvaffe@gmail.com> | 2010-01-18 11:02:36 +0800 |
commit | 02d9e0cb9e8f143628a384dc20a659861926ca8e (patch) | |
tree | 747827f88b1aac44bc540c812f56600773523ba4 | |
parent | fd95e0d5b446018eeba9e4884c43513813c70aae (diff) |
Detail a possible simplification for lock_resource/unlock_resource.
-rw-r--r-- | DESIGN | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -32,6 +32,16 @@ Issues lock/unlock a bad name. But it does has the benefit to track the access to the resources. + The prototypes of lock_resource/unlock_resource is designed for flexibility. + It allows future extension without breaking the ABI. If that is not a + concern (see issue 5), + + void *(*lock_resource)(res_type, void *res); + void (*unlock_resource)(res_type, void *res); + + suffice. And struct st_*_resouce can be removed. It is a possible + simplification. + Another approach is to provide a single lookup_resource call, and make functions like eglCreatePbufferFromClientBuffer, which requires a real locking mechanism, special cases. |