You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

48 lines
1.1 KiB

  1. /**
  2. * xrdp: A Remote Desktop Protocol server.
  3. *
  4. * Copyright (C) Laxmikant Rashinkar 2004-2014
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the "License");
  7. * you may not use this file except in compliance with the License.
  8. * You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. *
  18. * FIFO implementation to store pointer to data struct
  19. */
  20. #ifndef _FIFO_H
  21. #define _FIFO_H
  22. #include "arch.h"
  23. typedef struct user_data USER_DATA;
  24. struct user_data
  25. {
  26. USER_DATA *next;
  27. void *item;
  28. };
  29. typedef struct fifo
  30. {
  31. USER_DATA *head;
  32. USER_DATA *tail;
  33. int auto_free;
  34. } FIFO;
  35. FIFO * fifo_create(void);
  36. void fifo_delete(FIFO *self);
  37. int fifo_add_item(FIFO *self, void *item);
  38. void * fifo_remove_item(FIFO *self);
  39. int fifo_is_empty(FIFO *self);
  40. #endif