Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
equeue_stub.c
00001 /* 00002 * Copyright (c) , Arm Limited and affiliates. 00003 * SPDX-License-Identifier: Apache-2.0 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 */ 00017 00018 #include "equeue.h" 00019 #include <stdlib.h> 00020 00021 #include "equeue_stub.h" 00022 00023 equeue_stub_def equeue_stub; 00024 00025 int equeue_create(equeue_t *queue, size_t size) 00026 { 00027 return 0; 00028 } 00029 00030 int equeue_create_inplace(equeue_t *queue, size_t size, void *buffer) 00031 { 00032 return 0; 00033 } 00034 00035 void equeue_destroy(equeue_t *queue) 00036 { 00037 00038 } 00039 00040 void equeue_dispatch(equeue_t *queue, int ms) 00041 { 00042 00043 } 00044 00045 void equeue_break(equeue_t *queue) 00046 { 00047 00048 } 00049 00050 int equeue_call(equeue_t *queue, void (*cb)(void *), void *data) 00051 { 00052 return 0; 00053 } 00054 00055 int equeue_call_every(equeue_t *queue, int ms, void (*cb)(void *), void *data) 00056 { 00057 return 0; 00058 } 00059 00060 void *equeue_alloc(equeue_t *queue, size_t size) 00061 { 00062 return equeue_stub.void_ptr; 00063 } 00064 00065 void equeue_dealloc(equeue_t *queue, void *event) 00066 { 00067 00068 } 00069 00070 void equeue_event_delay(void *event, int ms) 00071 { 00072 00073 } 00074 00075 void equeue_event_period(void *event, int ms) 00076 { 00077 00078 } 00079 00080 void equeue_event_dtor(void *event, void (*dtor)(void *)) 00081 { 00082 00083 } 00084 00085 int equeue_post(equeue_t *queue, void (*cb)(void *), void *event) 00086 { 00087 struct equeue_event *e = (struct equeue_event*)event - 1; 00088 if (cb && equeue_stub.call_cb_immediately) { 00089 cb(e + 1); 00090 return 1; 00091 } 00092 return 0; 00093 } 00094 00095 void equeue_cancel(equeue_t *queue, int id) 00096 { 00097 00098 } 00099 00100 void equeue_background(equeue_t *queue, 00101 void (*update)(void *timer, int ms), void *timer) 00102 { 00103 00104 } 00105 00106 void equeue_chain(equeue_t *queue, equeue_t *target) 00107 { 00108 00109 } 00110 00111 int equeue_call_in(equeue_t *q, int ms, void (*cb)(void*), void *data) { 00112 // The stub does not implement the delay mechanism. 00113 return equeue_post(q, cb, data); 00114 }
Generated on Tue Aug 9 2022 00:37:06 by
1.7.2