*参照元 [#x80b0fef]
#backlinks

*説明 [#t644fb05]
-パス: [[linux-4.4.1/drivers/media/v4l2-core/videobuf2-core.c]]

-FIXME: これは何?
--説明


**引数 [#mbe19b32]
-struct vb2_queue
--
--[[linux-4.4.1/vb2_queue]]


**返り値 [#f88ea557]
-int
--


**参考 [#gd60b3a3]


*実装 [#wefb4cd7]
 /**
  * vb2_core_queue_init() - initialize a videobuf2 queue
  * @q:          videobuf2 queue; this structure should be allocated in driver
  *
  * The vb2_queue structure should be allocated by the driver. The driver is
  * responsible of clearing it's content and setting initial values for some
  * required entries before calling this function.
  * q->ops, q->mem_ops, q->type and q->io_modes are mandatory. Please refer
  * to the struct vb2_queue description in include/media/videobuf2-core.h
  * for more information.
  */
 int vb2_core_queue_init(struct vb2_queue *q)
 {
         /*
          * Sanity check
          */
         if (WARN_ON(!q)                   ||
             WARN_ON(!q->ops)              ||
             WARN_ON(!q->mem_ops)          ||
             WARN_ON(!q->type)             ||
             WARN_ON(!q->io_modes)         ||
             WARN_ON(!q->ops->queue_setup) ||
             WARN_ON(!q->ops->buf_queue))
                 return -EINVAL;
 
-
--[[linux-4.4.1/WARN_ON()]]

         INIT_LIST_HEAD(&q->queued_list);
         INIT_LIST_HEAD(&q->done_list);
         spin_lock_init(&q->done_lock);
         mutex_init(&q->mmap_lock);
         init_waitqueue_head(&q->done_wq);
 
-
--[[linux-4.4.1/INIT_LIST_HEAD()]]
--[[linux-4.4.1/spin_lock_init()]]
--[[linux-4.4.1/mutex_init()]]
--[[linux-4.4.1/init_waitqueue_head()]]

         if (q->buf_struct_size == 0)
                 q->buf_struct_size = sizeof(struct vb2_buffer);
 
-
--[[linux-4.4.1/vb2_buffer]]

         return 0;
 }
 EXPORT_SYMBOL_GPL(vb2_core_queue_init);
-
--[[linux-4.4.1/EXPORT_SYMBOL_GPL()]]


*コメント [#j96e2aba]


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS